Загрузить файлы в «/»
This commit is contained in:
30
script.py
Normal file
30
script.py
Normal file
@@ -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')
|
||||
61
stegano_image_LSB.py
Normal file
61
stegano_image_LSB.py
Normal file
@@ -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()
|
||||
BIN
steghide.tar
Normal file
BIN
steghide.tar
Normal file
Binary file not shown.
Reference in New Issue
Block a user