Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Web Penetration Testing Cookbook

You're reading from   Python Web Penetration Testing Cookbook Over 60 indispensable Python recipes to ensure you always have the right code on hand for web application testing

Arrow left icon
Product type Paperback
Published in Jun 2015
Publisher
ISBN-13 9781784392932
Length 224 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (11) Chapters Close

Preface 1. Gathering Open Source Intelligence FREE CHAPTER 2. Enumeration 3. Vulnerability Identification 4. SQL Injection 5. Web Header Manipulation 6. Image Analysis and Manipulation 7. Encryption and Encoding 8. Payloads and Shells 9. Reporting Index

Hiding a message using LSB steganography

In this recipe, we are going to create an image that hides another, using LSB steganography methods. This is one of the most common forms of steganography. As it's no good just having a means to hide the data, we will also be writing a script to extract the hidden data too.

Getting ready

All of the image work we will encounter in the chapter will make use of the Python Image Library (PIL). To install the Python image libraries by using PIP on Linux, use the following command:

$ pip install PIL

If you are installing it on Windows, you may have to use the installers that is available at http://www.pythonware.com/products/pil/.

Just make sure that you get the right installer for your Python version.

It is worth noting that PIL has been superseded with a newer version PILLOW. But for our needs, PIL will be fine.

How to do it…

Images are created up by pixels, each of those pixels is made up of red, green, and blue (RGB) values (for color images anyway...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime