Загрузить файлы в «/»

This commit is contained in:
2026-03-30 14:05:26 +00:00
parent c20569a329
commit b2c4cad256
4 changed files with 91 additions and 0 deletions

30
script.py Normal file
View 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
View 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

Binary file not shown.

BIN
www.PNG Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 753 KiB