stegosaurust

Crates.iostegosaurust
lib.rsstegosaurust
version0.4.6
sourcesrc
created_at2022-06-08 18:17:36.099445
updated_at2024-02-07 00:44:45.366208
descriptionA steganography tool, written in rust.
homepagehttps://github.com/jj-style/stegosaurust
repositoryhttps://github.com/jj-style/stegosaurust
max_upload_size
id602199
size6,984,133
JJ Style (jj-style)

documentation

https://docs.rs/stegosaurust

README

Stegosaurust
Stegosaurust

A simple image steganography tool, written in rust.

Publish CI

Disclaimer

:warning: This is a program I made for fun. There is no guarantee of cryptographic security or data confidentiality. Please do not use this for sensitive information. If you do, you are doing so at your own risk. :warning:

Introduction

Easily encode messages in images:

echo "text to hide" | stegosaurust enc --output encoded_image.png image.png
stegosaurust enc --decode encoded_image.png 

See the examples below for more usage.

Usage

🦕 stegosaurust 0.4.6
Hide text in images, using rust.

USAGE:
    stegosaurust <SUBCOMMAND>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

SUBCOMMANDS:
    disguise    mask all files in a directory using steganography [aliases: dsg]
    encode      encode files using steganography [aliases: enc]
    help        Prints this message or the help of the given subcommand(s)

Features

Encoding supports a variety of options that effect how the data is encoded, including:

  • compression
  • base64 encoding
  • encryption using AES-256-CBC, requires key to be supplied
  • bit distribution - how to distribute encoded bits throughout the image used for encoding
    • sequential - encode the data pixel by pixel starting from the top left
    • linear - encode the data into pixels evenly spread out from the start to the end of all pixels
  • bit encoding methods:
    • least significant bit (lsb) - always encode the bit of data in the least significant bit of each colour value of each pixel
    • random significant bit (rsb) - randomly encode each bit of data into one the least n significant bits of each colour value of each pixel. Choose how large n can be (1-4) (least significant to fourth least significant) and supply a seed which is used to determine the bit to encode into

Installation

From crates.io

cargo install stegosaurust

From Source

Build and install the executable from the source code.

git clone https://github.com/jj-style/stegosaurust.git
cd stegosaurust
cargo install --path .

# to uninstall :(
cargo uninstall stegosaurust

Docker

docker pull ghcr.io/jj-style/stegosaurust:master
docker run --rm -it -v $PWD:/data stegosaurust stegosaurust enc --decode /data/image.png

Examples

The examples below assume you have installed the program (see here) and are in the repository directory (if not installed use cargo run -- instead of stegosaurust).

# how much data can we fit in an image...
stegosaurust enc --decode examples/example-2.png | mpv -

# is there something hidden in the logo on the README?
stegosaurust enc --decode .github/logo.png | xargs python -c "import webbrowser,sys; webbrowser.open(sys.argv[1])"
Commit count: 129

cargo fmt