Giter Site home page Giter Site logo

stegopy's Introduction

StegoPy

Русский

Статья со скриншотами на OverNull - https://onull.nl/stegopy

English

Theory

StegoPy - Steganography with Python3 LSB algorithm with some improvements. The cryptography algorithm can choose the balance itself. A blue channel of pixels is used for encoding. Pixels are used, from x|y = 0 and from left to right.

Balance - the number of least significant bits of the pixel that are involved in the encoding. The maximum is 4, the minimum is 1. With increasing cryptographic strength and the number of pixels involved decreases. Therefore, I advise you to use 1. And if the text does not fit, but you still want to cram the large text into a small image, then you can use 2 or 3.

The peculiarity of the balance system is that for a certain text, balance 3 can be more stable than 1. I also examine balances on the same text, I noticed that often the pixels do not even change, mainly with a balance of 1. But it also depends on the text.

When encoding text in an image, it is pre-encrypted with the DES algorithm, so no matter how you try, you cannot encode the same text with the same key.

After encoding, the key will be saved in the ** key.dat ** file, the image with the text in the file ** out.png ** The key consists of three parts, for example: 2$400$KJhkiGlGKkghk/FffdD=

Shared by the character '$'. First - 2 is the balance. The second - 400 is the number of pixels involved and at the end is the key to the DES cipher. Over time, pixel randomization will be added, which will make the algorithm even more stable, as well as change the structure of the key.

Install

Requirements:

> git clone https://github.com/eBind/StegoPy
> cd StegoPy
> pip3 install -r requirements.txt

Started in Linux:

> ./stegopy.py [arguments]

In Windows or Termux:

> python3 stegopy.py [arguments]
Encoding
> ./stegopy.py -e in.jpg data.txt

-e - action type, encoding in.jpg - target image data.txt - file with your text

Enter a need balance. Out image out.png, key in key.dat

Deconding
> ./stegopy.py -d out.png

-d - action type, decoding out.png - encoded image

Enter a key. Decoded data saved in out.txt

stegopy's People

Contributors

securityhigh avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.