diff --git a/script.py b/script.py new file mode 100644 index 0000000..3b60138 --- /dev/null +++ b/script.py @@ -0,0 +1,30 @@ +from stegano import lsb + +text = ''' + +The hacker sat in front of the screen +And looked at his scheme. +"Too bad," he sighed, +"I don't have a good disguise." +He wanted to change his face +To hide from the law. +But the law was far away, +The law was at home near the computer. +The hacker turned on his computer, +Loaded his schemes onto it. +And sent them to himself, +Only this time as images. +Now they won't find him, +Because no one knows about the secret. +He hid his files +Within different images. + +''' + + +img = lsb.hide( + image='www.PNG', + message=text +) + +img.save('f.png') \ No newline at end of file diff --git a/stegano_image_LSB.py b/stegano_image_LSB.py new file mode 100644 index 0000000..7315e1d --- /dev/null +++ b/stegano_image_LSB.py @@ -0,0 +1,61 @@ +from stegano import lsb + +class auth(): + def __init__(self): + global username + username = input('Enter USERNAME: ') + + if len(username.split()) > 0: + main() + else: + exit() + + +class main(): + def __init__(self): + menu = ''' + [1] - спрятать сообщение в изображении + [2] - показать спрятанное сообщение + [3] - спрятать сообщение в изображении (с подписью) + ''' + print(menu) + + cmd = input('CMD: ') + + if cmd == '1': + image = input('Введите абсолютный путь до файла PNG or JPG: ') + msg = input('Введите секретное сообщение: ') + + if len(image.split()) > 0 and len(msg.split()) > 0: + sc_img = lsb.hide(image, msg) + sc_img.save('secret_image.png') + print('Сообщение было спрятано в secret_image.png') + + else: + exit() + + elif cmd == '2': + image = input('Введите абсолютный путь до файла PNG or JPG: ') + + if len(image.split()) > 0: + sc_message = lsb.reveal(image) + print(f'Секретное сообщение:\n{sc_message}') + + else: + exit() + + elif cmd == '3': + image = input('Введите абсолютный путь до файла PNG or JPG: ') + msg = input('Введите секретное сообщение: ') + + if len(image.split()) > 0 and len(msg.split()) > 0: + sc_img = lsb.hide(image, message=f'{msg}\n\nby {username}') + sc_img.save('secret_image.png') + print('Сообщение было спрятано в secret_image.png') + + else: + exit() + + +if __name__ == '__main__': + auth() \ No newline at end of file diff --git a/steghide.tar b/steghide.tar new file mode 100644 index 0000000..002fb98 Binary files /dev/null and b/steghide.tar differ diff --git a/www.PNG b/www.PNG new file mode 100644 index 0000000..6061f7f Binary files /dev/null and b/www.PNG differ