mirror of
https://github.com/cedricbonhomme/Stegano.git
synced 2025-05-12 17:18:30 +02:00
Last time I said it works? I was kidding. Try this.
This commit is contained in:
parent
96a65a45a2
commit
b3cb1d5f69
5 changed files with 12 additions and 10 deletions
2
basic.py
2
basic.py
|
@ -1,4 +1,4 @@
|
|||
#! /usr/local/bin/python
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Stéganô - Stéganô is a basic Python Steganography module.
|
||||
|
|
4
lsb-s.py
4
lsb-s.py
|
@ -1,4 +1,4 @@
|
|||
#! /usr/local/bin/python
|
||||
#!/usr/bin/env python
|
||||
#-*- coding: utf-8 -*-
|
||||
|
||||
# Stéganô - Stéganô is a basic Python Steganography module.
|
||||
|
@ -174,7 +174,7 @@ if __name__ == '__main__':
|
|||
img = Image.open(options.input_image_file)
|
||||
secret = reveal(img)
|
||||
if options.secret_binary != "":
|
||||
data = base64.b64decode(secret)
|
||||
data = tools.base642binary(secret)
|
||||
with open(options.secret_binary, "w") as f:
|
||||
f.write(data)
|
||||
else:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/local/bin/python
|
||||
#!/usr/bin/env python
|
||||
#-*- coding: utf-8 -*-
|
||||
|
||||
# Stéganô - Stéganô is a basic Python Steganography module.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /usr/local/bin/python
|
||||
#!/usr/bin/env python
|
||||
#-*- coding: utf-8 -*-
|
||||
|
||||
# Stéganô - Stéganô is a basic Python Steganography module.
|
||||
|
|
12
tools.py
12
tools.py
|
@ -1,4 +1,4 @@
|
|||
#! /usr/local/bin/python
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Stéganô - Stéganô is a basic Python Steganography module.
|
||||
|
@ -24,6 +24,8 @@ __version__ = "$Revision: 0.1 $"
|
|||
__date__ = "$Date: 2010/10/01 $"
|
||||
__license__ = "GPLv3"
|
||||
|
||||
import base64
|
||||
|
||||
def a2bits(chars):
|
||||
"""
|
||||
Converts a string to its bits representation as a string of 0's and 1's.
|
||||
|
@ -100,8 +102,8 @@ def base642binary(b64_fname):
|
|||
Convert a printable file to a binary file.
|
||||
"""
|
||||
# Read base64 string
|
||||
fin = open(b64_fname, "r")
|
||||
b64_str = fin.read()
|
||||
fin.close()
|
||||
#fin = open(b64_fname, "r")
|
||||
#b64_str = fin.read()
|
||||
#fin.close()
|
||||
# Decode base64 string to original binary sound object
|
||||
return base64.b64decode(b64_str)
|
||||
return base64.b64decode(b64_fname)
|
Loading…
Add table
Reference in a new issue