Skip to content

Commit

Permalink
Merge pull request #6 from SST-CTF/Stan
Browse files Browse the repository at this point in the history
Finishing touches. Edited README + added .jpeg extension
  • Loading branch information
staslyakhov authored Nov 9, 2016
2 parents c5cd465 + 78008c2 commit ae49581
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
29 changes: 15 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,29 @@ bits.
##### Encoding:
Usage: steglsb -e [cover_image] [secret_image] [output_image_name]

Notes: The images need to have a file extension [.jpg/.png].
Notes: The images need to have a file extension [.jpg/.jpeg/.png].
The cover image should be larger than the secret image.

##### Decoding:
Usage: steglsb -d [encoded_image] [output_image_name]

Notes: The images need to have a file extension [.jpg/.png].
Notes: The images need to have a file extension [.jpg/.jpeg/.png].


##### Examples:
Encoding example: The goal is to insert 'topsecret.jpg' into the image 'cover.png' located in the 'example' folder
Type the following command: './steglsb -e example/cover.png example/topsecret.jpg output.png'
The program will ask you to input the desired amount of Least Significant Bits, enter an integer between 1 and 8
program will run and create the file 'output.png' which will look like 'cover.png'
It will have topsecret.jpg hidden inside of it.
## Usage Examples:
Encoding Example: Insert 'secret.jpg' into the image 'cover.png' located in the 'example' folder
Type the following command: './steglsb -e example/cover.png example/secret.jpg output.png'
The program will ask you to input the desired amount of Least Significant Bits
Enter an integer between 1 and 8 (Recommended: 2)
The program will run and create the file 'output.png'
'output.png' will look like 'cover.png' but contain 'secret.jpg'

Decoding example: The goal is to find a secret image in sststeg.png (It is possible to reverse our previously created 'output.png' this way)
Type the following command: './steglsb -d example/sststeg.png secret.png'
The program will ask to input a desired amount of Least Sgnificant Bits.
Enter an integer between 1 and 8 (Trial and error, different images use different amounts of LSB)
The example image 'sststeg.png' is hidden in 2 LSB.
The program will run, and a 'secret.png' file will be created in the main directory which will contain the secret image.
Decoding Example: There is a secret image in hidden.png
Type the following command: './steglsb -d example/hidden.png secret.png'
The program will ask to input a desired amount of Least Significant Bits
Enter an integer between 1 and 8 (Recommended: 2)
The secret image is hidden in the last 2 LSBs.
A 'secret.png' file will be created containing the secret image.


## Dependencies
Expand Down
File renamed without changes
File renamed without changes
6 changes: 3 additions & 3 deletions steglsb.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def get_number_bits():

def check_extension(argv):
for args in argv[2:]:
if not args.lower().endswith(('.png','.jpg')):
if not args.lower().endswith(('.png','.jpg','.jpeg')):
print("Error processing image names. Please check to see valid extensions were provided.")
sys.exit()

Expand All @@ -106,14 +106,14 @@ def help():
Encoding:
Usage: steglsb -e [cover_image] [secret_image] [output_image_name]
Notes: The images need to have a file extension [.jpg/.png].
Notes: The images need to have a file extension [.jpg/.jpeg/.png].
The images should be the same dimensions.
(The program only takes the overlapping dimensions.)
Decoding:
Usage: steglsb -d [encoded_image] [output_image_name]
Notes: The images need to have a file extension [.jpg/.png].
Notes: The images need to have a file extension [.jpg/.jpeg/.png].
Each mode of steglsb [-d/-e] asks the user for a number of bits.
Expand Down

0 comments on commit ae49581

Please sign in to comment.