mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-06-28 03:06:14 +02:00
Reorganization of all modules.
This commit is contained in:
parent
e0bed8ba52
commit
872a5546fc
23 changed files with 77 additions and 43 deletions
|
@ -25,7 +25,7 @@ __date__ = "$Date: 2016/03/18 $"
|
|||
__license__ = "GPLv3"
|
||||
|
||||
try:
|
||||
from stegano import slsb
|
||||
from stegano import lsb
|
||||
except:
|
||||
print("Install Stegano: sudo pip install Stegano")
|
||||
|
||||
|
@ -68,7 +68,7 @@ if options.hide:
|
|||
elif options.secret_message == "" and options.secret_file != "":
|
||||
secret = tools.binary2base64(options.secret_file)
|
||||
|
||||
img_encoded = slsb.hide(options.input_image_file, secret)
|
||||
img_encoded = lsb.hide(options.input_image_file, secret)
|
||||
try:
|
||||
img_encoded.save(options.output_image_file)
|
||||
except Exception as e:
|
||||
|
@ -76,7 +76,7 @@ if options.hide:
|
|||
print(e)
|
||||
|
||||
elif options.reveal:
|
||||
secret = slsb.reveal(options.input_image_file)
|
||||
secret = lsb.reveal(options.input_image_file)
|
||||
if options.secret_binary != "":
|
||||
data = tools.base642binary(secret)
|
||||
with open(options.secret_binary, "w") as f:
|
|
@ -25,7 +25,7 @@ __date__ = "$Date: 2016/03/18 $"
|
|||
__license__ = "GPLv3"
|
||||
|
||||
try:
|
||||
from stegano import slsbset
|
||||
from stegano import lsbset
|
||||
except:
|
||||
print("Install stegano: sudo pip install Stegano")
|
||||
|
||||
|
@ -74,7 +74,7 @@ if options.hide:
|
|||
elif options.secret_message == "" and options.secret_file != "":
|
||||
secret = tools.binary2base64(options.secret_file)
|
||||
|
||||
img_encoded = slsbset.hide(options.input_image_file, secret, options.generator_function)
|
||||
img_encoded = lsbset.hide(options.input_image_file, secret, options.generator_function)
|
||||
try:
|
||||
img_encoded.save(options.output_image_file)
|
||||
except Exception as e:
|
||||
|
@ -83,7 +83,7 @@ if options.hide:
|
|||
|
||||
elif options.reveal:
|
||||
try:
|
||||
secret = slsbset.reveal(options.input_image_file, options.generator_function)
|
||||
secret = lsbset.reveal(options.input_image_file, options.generator_function)
|
||||
except IndexError:
|
||||
print("Impossible to detect message.")
|
||||
exit(0)
|
Loading…
Add table
Add a link
Reference in a new issue