Spaces:
Runtime error
Runtime error
Update stegan.py
Browse files
stegan.py
CHANGED
|
@@ -41,6 +41,11 @@ def decode(image_name,txt=None):
|
|
| 41 |
if decoded_data[-5:] == "=====":
|
| 42 |
break
|
| 43 |
p = decoded_data[:-5].split("#",1)[1].split("#",1)[0]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
#if p == resultd:
|
| 45 |
#this = decoded_data[:-5].split("#",1)[0].split("'",1)[1]
|
| 46 |
#base = bytes(this, 'utf-8')
|
|
|
|
| 41 |
if decoded_data[-5:] == "=====":
|
| 42 |
break
|
| 43 |
p = decoded_data[:-5].split("#",1)[1].split("#",1)[0]
|
| 44 |
+
enc_in = base64.b64decode(p)
|
| 45 |
+
with open("encrypted_data1.bin", "wb") as file:
|
| 46 |
+
file.write(enc_in)
|
| 47 |
+
file.close()
|
| 48 |
+
|
| 49 |
#if p == resultd:
|
| 50 |
#this = decoded_data[:-5].split("#",1)[0].split("'",1)[1]
|
| 51 |
#base = bytes(this, 'utf-8')
|