Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mosegontar/underbyte
Encode arbitrary bytes in image pixels.
https://github.com/mosegontar/underbyte
encoding go golang image-processing steganography
Last synced: 12 days ago
JSON representation
Encode arbitrary bytes in image pixels.
- Host: GitHub
- URL: https://github.com/mosegontar/underbyte
- Owner: mosegontar
- License: mit
- Created: 2022-06-27T00:36:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-12-22T02:35:37.000Z (about 2 years ago)
- Last Synced: 2024-12-23T10:36:56.582Z (about 1 month ago)
- Topics: encoding, go, golang, image-processing, steganography
- Language: Go
- Homepage:
- Size: 55.4 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# underbyte
Fun with steganography, images, and Go. Encode arbitrary bytes in image pixels.
Note that encoding only writes output images as PNGs (though JPEGs can be used as an input image).
## Example:
This image of Leo Tolstoy encodes an epub of the entirety of _War and Peace_.
![Leo Tolstoy](./assets/tolstoy_war_peace.png?raw=true "Leo Tolstoy")
It was created by running
```
cat war_and_peace.epub| ./underbyte -file tolstoy.jpg -out tolstoy_war_peace.png
```You can decode and extract the epub file by running
```
./underbyte -decode -file tolstoy_war_peace.png -out decoded_war_peace.epub
```### Secret keys
You can supply a secret key when coding and decoding. This secret is used to seed randomized pixel cursor
that determines which pixels contain which bytes of the encoded message.## Installation
### Building from source
```
go build -o underbyte cmd/main.go
```## Usage
```
Usage of ./underbyte:
-decode
Decode message from image instead of encoding (default false)
-file string
Input image filepath
-message string
message to encode (STDIN used if not specified)
-out string
Output filepath for encoded image (STDOUT used if not specified)
-secret string
secret key value used to encode and decode messageExamples:
Encoding:
underbyte -file image.png -message "hello there" -out encoded_image.png
underbyte -file image.png -message "hello there" > encoded_image.png
cat somefile.txt | underbyte -file image.png > encoded_image.png
Decoding:
underbyte -decode -file encoded_image.png
underbyte -decode -file encoded_image.png -out decoded_image.png
```