libenigma
Enigma machine utility library
Loading...
Searching...
No Matches
enigmacli

enigmacli

A CLI Enigma simulator.

Usage

enigmacli [-s plugboard] [-w rotors] [-p rotor_positions] [-u reflector]

enigmacli reads from stdin and outputs to stdout by default, and is case-agnostic.

The following options are supported:

Flag Description
-p Set the initial rotor (Walze) positions (e.g. ‘'ABC’) \ilinebr </td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone">-s\ilinebr </td> <td class="markdownTableBodyNone"> Set the plugboard (Steckerbrett) configuration (e.g.'ABCDEF') \ilinebr </td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone">-u\ilinebr </td> <td class="markdownTableBodyNone"> Set the reflector (Umkehrwalze) (e.g.'B') \ilinebr </td> </tr> <tr class="markdownTableRowEven"> <td class="markdownTableBodyNone">-w\ilinebr </td> <td class="markdownTableBodyNone"> Set the rotor (Walze) configuration (e.g.'I II III') \ilinebr </td> </tr> <tr class="markdownTableRowOdd"> <td class="markdownTableBodyNone">-r` Generate a random Enigma configuration.

Here is an example encryption/decryption with a custom rotor/plugboard configuration:

$ enigmacli -s "ABCD" -w "I II IV" -u "B" -p "XYZ"
Rotors: I (X) II (Y), IV (Z) | Reflector: B | Plugboard: ABCD
HELLO # user input
MWQHY # output
$ enigmacli -s "ABCD" -w "I II IV" -u "B" -p "XYZ" # same configuration
Rotors: I (X) II (Y), IV (Z) | Reflector: B | Plugboard: ABCD
MWQHY
HELLO