Grapher (a.k.a. graph) is a small command-line tool for encoding and decoding strings in several formats, very useful in cybersecurity, CTFs, pentesting or everyday development.
git clone https://github.com/CodingLikeABaby/grapher.git
cd graphercargo build --release
cp target/release/graph ~/.cargo/bin/If you not already done , you'll need to install cargo
curl https://sh.rustup.rs -sSf | shWhen done, you should see somehting like this
Rust is installed now. Great!(Here is some short flags examples, you can use the --help flag to see te long ones.
Grapher currently offers 2 different encodings, Base64 and URL encoding.
Grapher use Uppercase flags to encode and lowercase to decode.
grapher -B hello # Base64 encode
grapher -b aGVsbG8= # base64 decode
grapher -U "hello bro" # URL encode
grapher -u hello%20bro # URL decodeIf you want to use spaces in your strings, you must use quotes : "my string"
You can also use double encoding with the -d flag.
graph -B -d hello # Duble Base64 encode
graph -b -d YUdWc2JHOD0= # Double Base64 decode
graph -U -d "hello bro" # Duble URL encode
graph -u -d hello%2520bro # Double URL decodeYou can use Base64 URL encode too, using the -M mix flag.
graph -M hello # Base64 URL encode
graph -m aGVsbG8%3D # Base64 URL decodeGrapher has several invalid combinations that will return an error with an alternative command if you trigger them. This is because Grapher encourages you to use it as simply as possible.
However, to be more efficient, we've added a copy function to the Clipboard. You can use it with the -c flag.
grapher -B -c hello # This will copy the output to the clipboard (aGVsbG8=)Grapher is written in Rust using multiple librairies to handle the clipboard functions and of course, encoding.
Made by @CodingLikeABaby