O'Reilly logo

Mastering Python for Networking and Security by Jose Manuel Ortega

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Steganography with Stepic

Stepic provides a Python module and a command-line interface to hide arbitrary data within images. It slightly modifies the colours of the pixels in the image to store the data.

To set up stepic, just install it with the pip install stepic command.

Stepic’s Steganographer class is the main class of the module,where we can see the methods available for encoding and decoding data in images:

In the following script, compatible with python version 2.x, we can see the implementation of these functions.

You can find the following code in the  stepic.py file inside the steganography folder:

# stepic - Python image steganography ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required