Advertisement
EaterSun

Extract Offset LSB

Nov 27th, 2024 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.32 KB | Cybersecurity | 0 0
  1. img_bytes = open("IPB_stego.png", 'rb').read()
  2.  
  3. data = ""
  4. for b in img_bytes[55920:]:
  5.     binary = bin(b)[2:].zfill(8)  
  6.     data += binary[-1]
  7.  
  8. decoded = ""
  9. for i in range(0, len(data), 8):
  10.     byte = data[i:i+8]
  11.     if len(byte) == 8:  
  12.         decoded += chr(int(byte, 2))
  13.  
  14. print("Decoded data:", decoded)
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement