From 6ff419d1c460ca717da8612d93b82860baab62fa Mon Sep 17 00:00:00 2001 From: fdesnoes <65626754+fdesnoes@users.noreply.github.com> Date: Tue, 23 Jul 2024 14:55:27 +0200 Subject: [PATCH 1/5] Update README.md update readme to reflect cli changes --- README.md | 42 ++++++++++++++++++++++++++++++++---------- 1 file changed, 32 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 53d1a94..ebcf147 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ encrypts better than you"? I've got you covered! With this port of the amazing 1940's technology you'll be just as good at encrypting things as anyone's grandmother. +The CLI was modified by becgabri, I have added here the proper usage of the cli as well as the build procedure. + ### Usage This repository contains both the CLI tool and its underlying library written in Go. @@ -18,21 +20,41 @@ As for the CLI tool, a simple `go get` should do it: ``` go get github.com/emedvedev/enigma/cmd/enigma ``` - -While the full CLI syntax is a bit verbose, it's actually possible to use the tool -without any source code modifications, config files, or Enigma knowledge: - +An alternative is to clone the github repository and compile the code on your machine: +in the directory ./enigma/cmd/enigma, you build the GO code by running: +... +go build . +... + +The new CLI format developped by becgabri requires to put the arguments between " " as the are manages as strings. +In the repository of the executable file you can run ``` -enigma Never gonna give you up, never gonna let you down! +./enigma -h ``` +AN example of the enigma configuration and out put is -Using an Enigma machine with default settings is somewhat similar to -setting your password to `0000`. Let's up our security game: - -``` -enigma youtu.be/dQw4w9WgXcQ --rotors Beta VI I III --reflector C-Thin --plugboard AD SF ET RY HK JL QZ WX UM OP --rings 10 5 16 10 ``` +./enigma --rotors "Beta VI I III" --position "A A A A" --reflector "C" --plugboard "AD SF ET RY HK JL QZ WX UM OP" --rings "10 5 16 10" "hello world!" +``` +which gives the following result: +... +Original text: + hello world! + +Processed original text: + HELLOWORLDX + +Enigma configuration: + Rotors: Beta VI I III + Rotor positions: A A A A + Rings: 10 5 16 10 + Plugboard: AD SF ET RY HK JL QZ WX UM OP + Reflector: C + +Result: + KZTDAUQBGVK +... Much better! And of course, `enigma -h` will give you the complete description of parameters and usage. From ba5178474cb0d3c36c93b56de8a6677e7ccda65a Mon Sep 17 00:00:00 2001 From: fdesnoes <65626754+fdesnoes@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:05:39 +0200 Subject: [PATCH 2/5] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index ebcf147..5a10cc1 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ go get github.com/emedvedev/enigma/cmd/enigma ``` An alternative is to clone the github repository and compile the code on your machine: in the directory ./enigma/cmd/enigma, you build the GO code by running: + ... go build . ... @@ -38,6 +39,7 @@ AN example of the enigma configuration and out put is ``` which gives the following result: + ... Original text: hello world! @@ -55,6 +57,7 @@ Enigma configuration: Result: KZTDAUQBGVK ... + Much better! And of course, `enigma -h` will give you the complete description of parameters and usage. From 2a9f525a43a186944f0af316dab6a4bcf40d43a1 Mon Sep 17 00:00:00 2001 From: fdesnoes <65626754+fdesnoes@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:07:52 +0200 Subject: [PATCH 3/5] Update README.md typos --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 5a10cc1..acaa7cd 100644 --- a/README.md +++ b/README.md @@ -32,15 +32,17 @@ In the repository of the executable file you can run ``` ./enigma -h ``` -AN example of the enigma configuration and out put is +An example of the enigma configuration and out put is ``` ./enigma --rotors "Beta VI I III" --position "A A A A" --reflector "C" --plugboard "AD SF ET RY HK JL QZ WX UM OP" --rings "10 5 16 10" "hello world!" ``` + which gives the following result: ... + Original text: hello world! @@ -56,6 +58,7 @@ Enigma configuration: Result: KZTDAUQBGVK + ... Much better! And of course, `enigma -h` will give you the complete description of From 3ea60d23d7fd1cfce91d87c058863b5da1ec3161 Mon Sep 17 00:00:00 2001 From: fdesnoes <65626754+fdesnoes@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:18:26 +0200 Subject: [PATCH 4/5] Update README.md changes on the readme to reflect the change in the cli. --- README.md | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index acaa7cd..7a99f99 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,21 @@ # Enigma cipher machine emulator ![](https://www.dropbox.com/s/5wb3u29ybxrzphl/Screenshot%202016-11-25%2015.34.47.png?dl=1) +Original text: + hello world! + +Processed original text: + HELLOWORLDX +Enigma configuration: + Rotors: Beta VI I III + Rotor positions: A A A A + Rings: 10 5 16 10 + Plugboard: AD SF ET RY HK JL QZ WX UM OP + Reflector: C + +Result: + KZTDAUQBGVK This is a neat little emulator of various Enigma machines with a lot of confugurable parameters. Somebody hurt your feelings by saying "my grandmother encrypts better than you"? I've got you covered! With this port of the amazing @@ -15,17 +29,18 @@ The CLI was modified by becgabri, I have added here the proper usage of the cli This repository contains both the CLI tool and its underlying library written in Go. The library is documented on [GoDoc](https://godoc.org/github.com/emedvedev/enigma). -As for the CLI tool, a simple `go get` should do it: +As for the CLI tool, a simple `go get` could do it: ``` go get github.com/emedvedev/enigma/cmd/enigma ``` -An alternative is to clone the github repository and compile the code on your machine: +An alternative (I recommand) is to clone the github repository and compile the code on your machine: in the directory ./enigma/cmd/enigma, you build the GO code by running: -... +``` go build . -... + +``` The new CLI format developped by becgabri requires to put the arguments between " " as the are manages as strings. In the repository of the executable file you can run @@ -41,7 +56,7 @@ An example of the enigma configuration and out put is which gives the following result: -... +``` Original text: hello world! @@ -59,7 +74,7 @@ Enigma configuration: Result: KZTDAUQBGVK -... +``` Much better! And of course, `enigma -h` will give you the complete description of parameters and usage. @@ -83,7 +98,21 @@ emulator: * Plugboard: any number of letter pairs is accepted. Plugboard configuration is optional. +Original text: + hello world! + +Processed original text: + HELLOWORLDX + +Enigma configuration: + Rotors: Beta VI I III + Rotor positions: A A A A + Rings: 10 5 16 10 + Plugboard: AD SF ET RY HK JL QZ WX UM OP + Reflector: C +Result: + KZTDAUQBGVK * Ring offsets and starting position of the rotors. M3 and M4 can be fully emulated with the right parameters, and if it's From c8633af8fda19efaf53edf5d0097dbdc46979d56 Mon Sep 17 00:00:00 2001 From: fdesnoes <65626754+fdesnoes@users.noreply.github.com> Date: Tue, 23 Jul 2024 15:19:18 +0200 Subject: [PATCH 5/5] Update README.md --- README.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/README.md b/README.md index 7a99f99..638c9b9 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,7 @@ # Enigma cipher machine emulator ![](https://www.dropbox.com/s/5wb3u29ybxrzphl/Screenshot%202016-11-25%2015.34.47.png?dl=1) -Original text: - hello world! - -Processed original text: - HELLOWORLDX - -Enigma configuration: - Rotors: Beta VI I III - Rotor positions: A A A A - Rings: 10 5 16 10 - Plugboard: AD SF ET RY HK JL QZ WX UM OP - Reflector: C -Result: - KZTDAUQBGVK This is a neat little emulator of various Enigma machines with a lot of confugurable parameters. Somebody hurt your feelings by saying "my grandmother encrypts better than you"? I've got you covered! With this port of the amazing