Giter VIP home page Giter VIP logo

rot's Introduction

rot

rot is a command-line utility to cipher and decipher text using the 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)

Usage

Encrypt a simple phrase

$ rot -c=13 "The troops are dead"

Gur gebbcf ner qrnq

Decrypt a simple phrase

$ rot -d=13 "Gur gebbcf ner qrnq"

The troops are dead

Try multiple combinations

Encrypt

$ 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

$ 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

$ rot -c=13 -o=output.txt "The troops are dead"

$ cat output.txt

Gur gebbcf ner qrnq

Read from a file

$ rot -d=13 -f output.txt

The troops are dead

Read from stdin

$ echo "The troops are dead" | rot -c=13 # implicit

Gur gebbcf ner qrnq

$ echo "The troops are dead" | rot -c=13 --stdin

Gur gebbcf ner qrnq

Execute a blind brute force attack

$ 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

$ rot --help

rot 0.2.0
José Duarte <[email protected]>

USAGE:
    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 information

OPTIONS:
    -c, --cipher <cipher>...        Cipher input with the given rotation(s)
    -d, --decipher <decipher>...    Decipher input with the given rotation(s)
    -f, --file <file>               Read [input] as a file
    -o, --output <output>           Define an output file

ARGS:
    <input>    Text to (de)cipher

Contributing

If you see a bug in the code, or want to add a feature, submit an issue or a pull request!

rot's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.