#steganography #decoding #codec #encoding #cli-tool #text

bin+lib ptero-cli

A text steganography CLI tool for Social Media

2 unstable releases

0.4.2 Jan 16, 2021
0.3.2 Jan 10, 2021

#1480 in Text processing

28 downloads per month

Custom license

98KB
2K SLoC

Ptero CLI GitHub tag (latest SemVer)


Ptero is a CLI text steganography tool, meant to be used in the social media like Facebook. It offers a way to encode and decode data.

It implements the algorithm presented here. However, it also includes an extended implementation of specified algorithm, called ELUV. See help of the tool for more info on the usage.

The tool was tested in Facebook's Messenger and Twitter - both methods were working correctly. You can also read more about the method here.


Development Coverage Status GitHub branch checks state GitHub

Rust is the main language used in this repository. By default, you have to install standard Rust toolchain to start working. See official installation page for more info.

Editor

I use the VS Code as the main editor in this project. I'd suggest to install these extensions:

Build

If you want to just build the artifact run:

cargo build

To run the binary through the cargo you can issue:

# Example with argument
cargo run -- -vv encode -c some_cover_text -d secret

Tests and coverage

To run all the tests:

cargo test

Coverage checking is done through separate package cargo-tarpaulin - make sure to install it if you want to. To run it locally just:

cargo tarpaulin -v

Lint

This project ensures it is compliant with clippy rules. To make sure you're fine, run:

cargo clippy

Project structure

This project contains both binary package nad library. See lib.rs to see module overview and main.rs the entry point for CLI binary package.

Scripts

Bitrate measurement

There are two script in the scripts directory which are used for measuring the bitrate. The one is bitrate_for_pivot.sh which calculates the average bitrate for given amount of executions on random secret data, and the other one measure_bitrate.sh does launch measurements for given pivot range in parallel, 100 executions and 30 bytes secret data.

The latter one should be used to get the results. For example:

./scripts/measure_bitrate.sh 10 40 &> result

It should be ran in the project root. Please note that there might be a case that given secret may not be embedded in cover text due to the cover text capacity.

Dependencies

~7–18MB
~197K SLoC