mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-05-13 01:18:31 +02:00
Minor bugfix.
This commit is contained in:
parent
12497ce88d
commit
2f34fac27c
2 changed files with 5 additions and 5 deletions
4
lsb-s.py
4
lsb-s.py
|
@ -137,7 +137,7 @@ if __name__ == '__main__':
|
||||||
|
|
||||||
# Non binary secret message to hide
|
# Non binary secret message to hide
|
||||||
parser.add_option("-m", "--secret-message", dest="secret_message",
|
parser.add_option("-m", "--secret-message", dest="secret_message",
|
||||||
help="Your secret message to hide(non binary).")
|
help="Your secret message to hide (non binary).")
|
||||||
|
|
||||||
# Binary secret to hide (OGG, executable, etc.)
|
# Binary secret to hide (OGG, executable, etc.)
|
||||||
parser.add_option("-f", "--secret-file", dest="secret_file",
|
parser.add_option("-f", "--secret-file", dest="secret_file",
|
||||||
|
@ -156,7 +156,7 @@ if __name__ == '__main__':
|
||||||
if sys.argv[1] == "hide":
|
if sys.argv[1] == "hide":
|
||||||
if options.secret_message != "" and options.secret_file == "":
|
if options.secret_message != "" and options.secret_file == "":
|
||||||
secret = options.secret_message
|
secret = options.secret_message
|
||||||
elif options.secret_message == "" and options.secret_file =! "":
|
elif options.secret_message == "" and options.secret_file != "":
|
||||||
secret = tools.binary2base64(options.secret_file)
|
secret = tools.binary2base64(options.secret_file)
|
||||||
|
|
||||||
img = Image.open(options.input_image_file)
|
img = Image.open(options.input_image_file)
|
||||||
|
|
2
tools.py
2
tools.py
|
@ -89,7 +89,7 @@ def binary2base64(binary_file, output_file):
|
||||||
fin.close()
|
fin.close()
|
||||||
|
|
||||||
# Encode binary to base64 string (printable)
|
# Encode binary to base64 string (printable)
|
||||||
return b64_data = base64.b64encode(binary_data)
|
return base64.b64encode(binary_data)
|
||||||
|
|
||||||
"""fout = open(output_file, "w")
|
"""fout = open(output_file, "w")
|
||||||
fout.write(b64_data)
|
fout.write(b64_data)
|
||||||
|
|
Loading…
Add table
Reference in a new issue