Skip to content

Instantly share code, notes, and snippets.

@0x000000AC
Last active November 7, 2015 17:21
Show Gist options
  • Save 0x000000AC/84e30895c34a4855f074 to your computer and use it in GitHub Desktop.
Save 0x000000AC/84e30895c34a4855f074 to your computer and use it in GitHub Desktop.
#!/usr/bin/python
# Used on Pyton 2.7.10
# You need Image from Python Image Library (PIL) and stepic packages
import stepic
from PIL import Image
img = Image.open("sample-graphic.jpg")
img.show()
stegImg = stepic.encode(img, "Some super secret infoz")
stegImg.save("steg.png", "PNG")
img2 = Image.open("steg.png")
img2.show()
unStegMsg = stepic.decode(img2)
print unStegMsg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment