Giter VIP home page Giter VIP logo

steganobit's Introduction

Steganobit

Before and after

Two really simple python scripts to encrypt and decrypt text into images, by translating a text file into ascii, translating the ascii into binary, using every pixel as a binary value container and adding an offset to the pixel's RGB values of the containers which store a 1.

By configuring the script to use a high offset (as shown above) you make it possible to decrypt messages based on only the result, by just use of eyesight and educated guesses of which pixels should be 0's and which should be 1's. By configuring the script to use a low offset, but when still using an image where the original color is easy obtainable (for example a totally black image), the image is decryptable with some basic tools (color picker, another python script, etc). By configuring the script to use a low offset and using some random picture, using some advanced AI trained on the same type of pictures and iterating over different possibilities it might still be possible to retrieve the message encrypted in the image. Only by using random noise as an original image, you are certain the original image is needed to be able to decrypt the message in the output image. But of course you should never use this to encrypt anything serious anyway.

Table of Contents

Background

This project is a result of wanting to hide a little easter egg in the icon of my personal website (which is still under construction by the time of writing). The name is simply a concatenation of steganograpy and bitmap, because at first I was only planning to support bitmaps (but the pillow library is awesome).

Install

  1. Download and install Python 3.6+.
  2. Install the pillow library.
  3. Clone this repository.

Usage

  1. Configure the settings.json to your liking.
  2. Run encrypt.py to encrypt
  3. (OPTIONAL) Run decrypt.py to decrypt messages in the obtained output.

Settings

data: The path to the txt file of the message to be encrypted.
inputImage: The path to the input image.
outputImage: The path to the output image.
offset: The RGB offset for each pixel which stores a 1 (negative values are allowed).
overflow: Allow overflow for RGB values. If true and the new R value is 256, it will become 0.

License

MIT

steganobit's People

Contributors

meesg avatar

Watchers

 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.