pyenigma.py(1)
π pyenigma.py β the manual page, bestie edition π
okay so this is the manual for pyenigma.py(1) (that's the section-1 manual, the user-commands one, iykyk) and it's literally about running an Enigma machine from your terminal. like, the actual WWII rotor cipher, but make it a CLI. slay. π
β¨ NAME β¨
pyenigma.py β encrypt/decrypt text according to Enigma machine key settings
no cap, that's the whole vibe. you give it settings, it scrambles or un-scrambles your text. π
πΈ SYNOPSIS πΈ
pyenigma.py [-h] [-k KEY_FILE] [-d DAY] [-r ROTOR [ROTOR ...]]
[-i RING_SETTING [RING_SETTING ...]]
[-p PLUGBOARD [PLUGBOARD ...]] [-u REFLECTOR] [-s START]
[-t TEXT] [-f FILE] [-x REPLACE_CHAR] [-z] [-v]
look at all those little flags, they're giving very much "I have options and I know it" energy. π
π¦ DESCRIPTION π¦
pyenigma.py is a command line for processing Enigma messages. periodt. π
so here's the tea: your Enigma settings can either be specified by command-line arguments, or read from a key file. both are valid, pick your fighter. if you're reading from a key file, the line labeled with the current day number is used β unless you hand it the --day argument, in which case that wins. ποΈ
now, the text you wanna process? it can be supplied 3 ways:
- if
--text=TEXTis present, then TEXT is what gets processed π - if
--file=FILEis present, then the contents of FILE get processed π - otherwise, the text is read from standard input β¨οΈ
and bestie, please see documentation for the description of the file format β don't just guess at it, the docs are right there and they're free. π«Ά
π OPTIONS π
-h,--helpβ show this help message and exit. the classic. the icon. use it when you're lost (we've all been there) π-kKEY_FILE,--key-fileKEY_FILE β path to key file for daily settings ποΈ-dDAY,--dayDAY β use the settings for day DAY when reading key file π-rROTOR [ROTOR ...],--rotorsROTOR [ROTOR ...] β rotor list ordered from left to right; e.gIII IV IβοΈ-iRING_SETTING [RING_SETTING ...],--ring-settingsRING_SETTING [RING_SETTING ...] β ring setting list from left to right; e.g.A A Jπ-pPLUGBOARD [PLUGBOARD ...],--plugboardPLUGBOARD [PLUGBOARD ...] β plugboard settings π-uREFLECTOR,--reflectorREFLECTOR β reflector name πͺ-sSTART,--startSTART β starting position π©-tTEXT,--textTEXT β text to process βοΈ-fFILE,--fileFILE β input file to process π-xREPLACE_CHAR,--replace-charREPLACE_CHAR β if the input text contains chars not found on the enigma keyboard, replace with this char [default:X] π-z,--delete-charsβ if the input text contains chars not found on the enigma keyboard, delete them from the input ποΈ-v,--verboseβ provide verbose output; include final rotor positions π£οΈ
heads up bestie:-xand-zare both about those off-keyboard chars, so know which one you actually want β replace them or yeet them entirely. β¨
π EXAMPLE π
Try these commands to specify settings from the command line:
$ pyenigma.py -r III IV V -i 1 2 3 -p AB CD EF GH IJ KL MN -u B -s XYZ
$ pyenigma.py -r Beta III IV V -i A B C D -p 1/2 3/4 5/6 -u B-Thin -s WXYZ
This command will load Enigma settings from a file:
$ pyenigma.py --key-file=enigma.keys -s XYZ -t HELLOXWORLDX
the way that second one is doing a full four-rotor situation with Beta, B-Thin, and plugboard pairs with slashes in them?? highkey iconic. π
π AUTHOR π
Brian Neal <bgneal@gmail.com>
thank you for your service, Brian, fr fr π«‘
and that's the whole page, bestie!! written for the pyenigma.py(1) manual, dated 26 Apr 2015, from the pyenigma.py(1) source. go forth and encipher, you absolute main character πβ¨π¦
π¦ where this page comes from
- debian bookworm: python3-enigma 0.1-3 Β· MIT
- debian trixie: python3-enigma 0.1-5 Β· MIT
- ubuntu jammy: python3-enigma 0.1-3 Β· MIT
- ubuntu noble: python3-enigma 0.1-3 Β· MIT
- ubuntu resolute: python3-enigma 0.1-5 Β· MIT
- ubuntu stonking: python3-enigma 0.1-5 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms