diff --git a/2020/ferguson2/.entry.json b/2020/ferguson2/.entry.json index cd063be66..7e0e6b0a3 100644 --- a/2020/ferguson2/.entry.json +++ b/2020/ferguson2/.entry.json @@ -46,7 +46,7 @@ "entry_text" : "original source code" }, { - "file_path" : "enigma.html", + "file_path" : "enigma.txt", "inventory_order" : 100, "OK_to_edit" : true, "display_as" : "text", diff --git a/2020/ferguson2/.gitignore b/2020/ferguson2/.gitignore index 4049d86cb..078b3b839 100644 --- a/2020/ferguson2/.gitignore +++ b/2020/ferguson2/.gitignore @@ -6,6 +6,7 @@ chocolate-cake.key config decrypted.html decrypted-source.html +enigma.html encrypt.sh indent indent.c diff --git a/2020/ferguson2/Makefile b/2020/ferguson2/Makefile index 032d572ee..b113acfef 100644 --- a/2020/ferguson2/Makefile +++ b/2020/ferguson2/Makefile @@ -115,7 +115,7 @@ PROG= prog OBJ= ${PROG}.o DATA= enigma.1 input.txt obfuscation.key \ obfuscation.md obfuscation.txt recode.1 recode.md \ - try.this.txt enigma.html + try.this.txt enigma.txt TARGET= ${PROG} recode # ALT_OBJ= ${PROG}.alt.o diff --git a/2020/ferguson2/README.md b/2020/ferguson2/README.md index 57d8229b0..f993abcf0 100644 --- a/2020/ferguson2/README.md +++ b/2020/ferguson2/README.md @@ -119,14 +119,14 @@ There is a good deal of useful documentation that is provided with this entry: - Some useful information about [recode.c](%%REPO_URL%%/2020/ferguson2/recode.c) -* [enigma.html][] +* [enigma.txt][] - NOTE: see [recode.html][] (or [recode.html](recode.html) for details about how to decrypt this! * [testing-procedure][] - How the author tested the code and why it was necessary to do it in the way it was [recode.html]: recode.html -[enigma.html]: enigma.html +[enigma.txt]: enigma.txt [testing-procedure]: testing-procedure.html diff --git a/2020/ferguson2/enigma.html b/2020/ferguson2/enigma.txt similarity index 100% rename from 2020/ferguson2/enigma.html rename to 2020/ferguson2/enigma.txt diff --git a/2020/ferguson2/index.html b/2020/ferguson2/index.html index 208b562e0..91efcf841 100644 --- a/2020/ferguson2/index.html +++ b/2020/ferguson2/index.html @@ -515,7 +515,7 @@ out! Can you figure out why this works this way?
So this is what I offer: if you take one of the settings below and run the
-Enigma machine simulator on the file [enigma.html][enigma.html] you will
+Enigma machine simulator on the file enigma.txt you will
unlock a html file with something special in it. I recommend you decrypt it to
decrypted.html and open it in a web browser.
The correct settings is listed below but you must determine which one is the @@ -919,8 +919,8 @@ think that I would give too much away? :)
the key you wish to select is 0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI
you can do:
- ./recode -R0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI -fenigma.html | ./prog - 2>/dev/null > enigma.deciphered.html
-Then open enigma.deciphered.html in your browser. A command is provided in
+
./recode -R0EZ4PC1CC0PGTAQSOXWNMDRYKFUZEI -fenigma.txt | ./prog - 2>/dev/null > enigma.html
+Then open enigma.html in your browser. A command is provided in
testing-procedure.html that does this too but it
shows how you can use a file as input for the key instead as well as how I
tested the code.
At the time of development the server was CentOS but as Red Hat decided to axe it it is now Rocky Linux. The above script was only tested in macOS but it -should work fine in linux too. Also, the enigma.html part was added in June 2024 +should work fine in linux too. Also, the enigma.txt part was added in June 2024 which expects output so below when I say if I got any output there was a problem this is no longer true.
enigma.html file:enigma.txt file:The following command can be used to decipher the file except that you must provide the key file (or the key as a string) with the correct key (see recode.html for a list of keys to try) in order to get correct output:
- ./recode -Renigma.dat -fenigma.html | ./prog - 2>/dev/null > enigma.deciphered.html
+ ./recode -Renigma.dat -fenigma.txt | ./prog - 2>/dev/null > enigma.html
Enjoy!
diff --git a/2020/ferguson2/testing-procedure.md b/2020/ferguson2/testing-procedure.md index 844d5ec83..850cdcdad 100644 --- a/2020/ferguson2/testing-procedure.md +++ b/2020/ferguson2/testing-procedure.md @@ -45,8 +45,8 @@ to try and find the right key. fi # a simpler way to check that it works: - ./recode -Renigma.dat -fenigma.deciphered.html | ./prog - 2>/dev/null > enigma.html - ./recode -Renigma.dat -fenigma.html | ./prog - 2>/dev/null | diff -s - enigma.deciphered.html + ./recode -Renigma.dat -fenigma.html | ./prog - 2>/dev/null > enigma.txt + ./recode -Renigma.dat -fenigma.txt | ./prog - 2>/dev/null | diff -s - enigma.html ./recode -Robfuscation.key -fobfuscation.txt | ./prog - 2>/dev/null > out diff out obfuscation.md || echo "Obfuscation test 0.5 failed" @@ -84,7 +84,7 @@ document in the website. Still that should give you the idea. At the time of development the server was CentOS but as Red Hat decided to axe it it is now Rocky Linux. The above script was only tested in macOS but it -should work fine in linux too. Also, the enigma.html part was added in June 2024 +should work fine in linux too. Also, the enigma.txt part was added in June 2024 which expects output so below when I say if I got any output there was a problem this is no longer true. @@ -112,7 +112,7 @@ platform as macOS because these days I mostly use my laptop (I tend to ssh into the other two boxes more and as for the CentOS it's only console anyway. Since it's just text I/O it an terminal emulator shouldn't matter either.). -## Command that might be used to decipher the `enigma.html` file: +## Command that might be used to decipher the `enigma.txt` file: The following command can be used to decipher the file except that you must provide the key file (or the key as a string) with the correct key (see @@ -120,7 +120,7 @@ provide the key file (or the key as a string) with the correct key (see output: ``` - ./recode -Renigma.dat -fenigma.html | ./prog - 2>/dev/null > enigma.deciphered.html + ./recode -Renigma.dat -fenigma.txt | ./prog - 2>/dev/null > enigma.html ``` Enjoy!