Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jmg-duarte/rot
๐ช Caesar Cipher CLI Tool ๐
https://github.com/jmg-duarte/rot
caesar-cipher cipher cryptography rot rot13 rotation rust
Last synced: about 2 hours ago
JSON representation
๐ช Caesar Cipher CLI Tool ๐
- Host: GitHub
- URL: https://github.com/jmg-duarte/rot
- Owner: jmg-duarte
- License: mit
- Created: 2019-07-23T17:36:22.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-29T20:23:28.000Z (over 5 years ago)
- Last Synced: 2024-11-25T22:27:09.343Z (2 months ago)
- Topics: caesar-cipher, cipher, cryptography, rot, rot13, rotation, rust
- Language: Rust
- Homepage:
- Size: 215 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# rot
__*rot*__ is a command-line utility to cipher and decipher text using the [Caesar Cipher](https://en.wikipedia.org/wiki/Caesar_cipher).
## Note
Using equals with options is required, otherwise `rot` may crash.
This is due to the lack of support of the YAML configuration ([this is fixed in `clap` 3.0.0](https://github.com/clap-rs/clap/issues/1426))## Usage
### Encrypt a simple phrase
```bash
$ rot -c=13 "The troops are dead"Gur gebbcf ner qrnq
```### Decrypt a simple phrase
```bash
$ rot -d=13 "Gur gebbcf ner qrnq"The troops are dead
```### Try multiple combinations
#### Encrypt
```bash
$ rot -c=3,5,7,13 "The troops are dead"Wkh wurrsv duh ghdg
Ymj ywttux fwj ijfi
Aol ayvvwz hyl klhk
Gur gebbcf ner qrnq
```#### Decrypt
```bash
$ rot -d=3,5,7,13 "Gur gebbcf ner qrnq"Dro dbyyzc kbo nokn
Bpm bzwwxa izm lmil
Znk zxuuvy gxk jkgj
The troops are dead
```### Output to a file
```bash
$ rot -c=13 -o=output.txt "The troops are dead"$ cat output.txt
Gur gebbcf ner qrnq
```### Read from a file
```bash
$ rot -d=13 -f output.txtThe troops are dead
```### Read from `stdin`
```bash
$ echo "The troops are dead" | rot -c=13 # implicitGur gebbcf ner qrnq
$ echo "The troops are dead" | rot -c=13 --stdin
Gur gebbcf ner qrnq
```### Execute a blind brute force attack
```bash
$ rot -b "Gur gebbcf ner qrnq"Ftq fdaabe mdq pqmp
Esp eczzad lcp oplo
Dro dbyyzc kbo nokn
Cqn caxxyb jan mnjm
Bpm bzwwxa izm lmil
Aol ayvvwz hyl klhk
Znk zxuuvy gxk jkgj
Ymj ywttux fwj ijfi
Xli xvsstw evi hieh
Wkh wurrsv duh ghdg
Vjg vtqqru ctg fgcf
Uif usppqt bsf efbe
The troops are dead # ( อกยฐ อส อกยฐ)
Sgd sqnnor zqd cdzc
Rfc rpmmnq ypc bcyb
Qeb qollmp xob abxa
Pda pnkklo wna zawz
Ocz omjjkn vmz yzvy
Nby nliijm uly xyux
Max mkhhil tkx wxtw
Lzw ljgghk sjw vwsv
Kyv kiffgj riv uvru
Jxu jheefi qhu tuqt
Iwt igddeh pgt stps
Hvs hfccdg ofs rsor
```### Getting help
```bash
$ rot --helprot 0.2.0
Josรฉ DuarteUSAGE:
rot [FLAGS] [OPTIONS] [--] [input]FLAGS:
-b, --brutef Brute force all possible rotations
-h, --help Prints help information
--stdin Read input from "stdin"
-V, --version Prints version informationOPTIONS:
-c, --cipher ... Cipher input with the given rotation(s)
-d, --decipher ... Decipher input with the given rotation(s)
-f, --file Read [input] as a file
-o, --output Define an output fileARGS:
Text to (de)cipher
```## Contributing
If you see a bug in the code, or want to add a feature, submit an [issue](https://github.com/jmg-duarte/rot/issues/new) or a pull request!