Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- img_bytes = open("IPB_stego.png", 'rb').read()
- data = ""
- for b in img_bytes[55920:]:
- binary = bin(b)[2:].zfill(8)
- data += binary[-1]
- decoded = ""
- for i in range(0, len(data), 8):
- byte = data[i:i+8]
- if len(byte) == 8:
- decoded += chr(int(byte, 2))
- print("Decoded data:", decoded)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement