GithubHelp home page GithubHelp logo

calderwhite / gif-msg Goto Github PK

View Code? Open in Web Editor NEW
34.0 4.0 3.0 938 KB

Hide 127 bytes in a gif without touching any pixels or colors

Home Page: https://calderwhite.medium.com/hiding-data-from-humans-and-computers-in-gif-files-6d95523bf9bb

License: GNU General Public License v3.0

Python 71.76% HTML 28.24%
steganography gifs steganography-algorithms cryptography

gif-msg's Introduction

gif-msg

gif-msg hides a 128 byte message in a gif while keeping the pixel values identical. Can you figure out how I did it?

gif's popular usage in messaging apps allow them to blend into conversations naturally. This way users can send secret (potentially encrypted) messages to eachother without it being obvious to a 3rd party. This method of steganography is also largely applicable on message forums.

Installation

Pillow's gif encoder does not support lossless compression, so gifsicle is used to re-encode the gif such that its file size does not increase.

# Install dependancies
pip3 install -r requirements.txt
sudo apt install gifsicle

# Clone module
git clone https://github.com/CalderWhite/gif-msg/
cd gif-msg
git submodule update --init --recursive

Usage

Please use the Latest Stable Release and note that the semantic versioning indicates when changes will not be backwards compatible (so the major release must match if you are to exchange gifs with another version).

usage: gif_msg.py [-h] [--key KEY] [--compress]
                  command infile [outfile] [body]

Encode/Decode 128 bytes into a gif file.

positional arguments:
  command     The command to be run (encode/decode)
  infile      The input gif.
  outfile     The outfile gif. (applicable for encode)
  body        The message to be encoded. (applicable for encode)

optional arguments:
  -h, --help  show this help message and exit
  --key KEY   If given a key, AES will be used to encrypt/decrypt the message
              body.
  --compress  If supplied, smaz will be used to compress the body. NOTE: This
              is only effective with language, and binary data is best left
              uncompressed

Known Bugs

  • Greyscale gifs are not currently supported.
  • Gifs with <256 colors can only hold n//2 bytes, where n=number of colors
  • Gifs with duplicate colors in their color palette

Note: If there color white (0xFFFFFF) is in the color palette and the image has transparency, this will create a duplicate color error since PIL overwrites what is at the transparent index in the palette as 0xFFFFFF)

gif-msg's People

Contributors

calderwhite avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gif-msg's Issues

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.