From a4bcedf6c31f6550933c6f53730821276285bae2 Mon Sep 17 00:00:00 2001 From: Cody Boone Ferguson <53008573+xexyl@users.noreply.github.com> Date: Mon, 17 Apr 2023 09:56:58 -0700 Subject: [PATCH] Update 2004/sds Updated try section (updated .gitignore for this). Updated Makefile to let encoder.c compile (that's the generated file) via make. Format fixes and typo fixes. Add INABIAF to bugs.md and the README.md file about this entry (the generated code). --- 2004/sds/.gitignore | 3 +++ 2004/sds/Makefile | 2 +- 2004/sds/README.md | 33 +++++++++++++++++++++++++++------ bugs.md | 11 +++++++++-- 4 files changed, 40 insertions(+), 9 deletions(-) diff --git a/2004/sds/.gitignore b/2004/sds/.gitignore index 494c133dd..262b4a689 100644 --- a/2004/sds/.gitignore +++ b/2004/sds/.gitignore @@ -1 +1,4 @@ sds +encoder +encoder.c +message diff --git a/2004/sds/Makefile b/2004/sds/Makefile index b7c9c4a86..0b74ecbce 100644 --- a/2004/sds/Makefile +++ b/2004/sds/Makefile @@ -61,7 +61,7 @@ CDEFINE= # Include files that are needed to compile # -CINCLUDE= +CINCLUDE= -include stdlib.h # Optimization # diff --git a/2004/sds/README.md b/2004/sds/README.md index 4483399ca..0cfd9b743 100644 --- a/2004/sds/README.md +++ b/2004/sds/README.md @@ -24,9 +24,28 @@ make ```sh ./sds < sds.c > encoder.c make encoder -./encoder sds.hint sds_msg.c +./encoder README.md sds_msg.c +make sds_msg +./sds_msg < sds.c > sds2_msg.c +diff sds2_msg.c encoder.c ``` +Also try: + +```sh +echo 'Hello, World!' > message +./encoder message < README.md > remarks.md +diff remarks.md README.md # notice how similar they are + +# and then observe: +./sds < remarks.md +``` + +### INABIAF - it's not a bug it's a feature! :-) + +The generated code will very likely crash or do something else if not given a +proper command line. This is not a bug but a feature. + ## Judges' remarks: Why not use the program to hide another program in the program? It @@ -97,14 +116,16 @@ changed inside strings where it should be left alone. Plain text files are good candidates for hiding information in, but the added spacing may render the text somewhat difficult to read. +### Obfuscation + This program is obfuscated in a number of ways: -* The code is all but impossible to read due to the spacing -* The algorithm is well hidden in the code due to copious red-herrings -* The long expressions cause indentation tools to give poor results -* And good old fashioned ternery operators are the icing on the cake +* The code is all but impossible to read due to the spacing. +* The algorithm is well hidden in the code due to copious red-herrings. +* The long expressions cause indentation tools to give poor results. +* And good old fashioned ternary operators are the icing on the cake. -Compiling the program +### Compiling the program The program (and the encoder program) should compile on any reasonable compiler. In particular, they are known to compile under diff --git a/bugs.md b/bugs.md index 8d6522863..862ddd27a 100644 --- a/bugs.md +++ b/bugs.md @@ -272,8 +272,9 @@ The archive website will tell you if the link was never captured. Entries with this status should NOT be touched (unless they have another status that suggests that _that_ issue can be changed): they are system specific by -design or are other things that are not actually bugs even if they appear to be. -But are noteworthy nonetheless. +design or are other things that are not actually bugs or bugs even if they +appear to be. Or they might be documented bugs or things that simply are part of +the entry. Nonetheless they are noteworthy. NOTE: the definition of this status changed over time. At one point it was when something was noted by the author, the judges, a consequence of earlier @@ -1080,6 +1081,12 @@ gavin_files: boot.b lilo.conf prim gavin_install.txt The current ([Makefile](2004/gavin/Makefile) was modified to try and fit into the current IOCCC build environment. +## [2004/sds](2004/sds/sds.c) ([README.md](2004/sds/README.md)) +## STATUS: INABIAF - please **DO NOT** fix + +The generated code will very likely segfault or do something not intended if not +given the right args. See the README.md file for the correct syntax. + # 2005