From 2f34fac27cc5de71d394e5e59211262f746ff3f3 Mon Sep 17 00:00:00 2001 From: cedricbonhomme Date: Wed, 6 Oct 2010 08:48:30 +0200 Subject: [PATCH] Minor bugfix. --- lsb-s.py | 6 +++--- tools.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lsb-s.py b/lsb-s.py index def9830..a37ecdc 100755 --- a/lsb-s.py +++ b/lsb-s.py @@ -137,7 +137,7 @@ if __name__ == '__main__': # Non binary secret message to hide 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.) parser.add_option("-f", "--secret-file", dest="secret_file", @@ -156,7 +156,7 @@ if __name__ == '__main__': if sys.argv[1] == "hide": if options.secret_message != "" and options.secret_file == "": 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) img = Image.open(options.input_image_file) @@ -175,4 +175,4 @@ if __name__ == '__main__': with open(options.secret_binary, "w") as f: f.write(data) else: - print secret \ No newline at end of file + print secret diff --git a/tools.py b/tools.py index dbc5ae5..3f30be2 100755 --- a/tools.py +++ b/tools.py @@ -89,7 +89,7 @@ def binary2base64(binary_file, output_file): fin.close() # Encode binary to base64 string (printable) - return b64_data = base64.b64encode(binary_data) + return base64.b64encode(binary_data) """fout = open(output_file, "w") fout.write(b64_data) @@ -104,4 +104,4 @@ def base642binary(b64_fname): b64_str = fin.read() fin.close() # Decode base64 string to original binary sound object - return base64.b64decode(b64_str) \ No newline at end of file + return base64.b64decode(b64_str)