Added first obfuscation sample.
authorAaron Taylor <ataylor@subgeniuskitty.com>
Fri, 24 Apr 2020 17:13:21 +0000 (10:13 -0700)
committerAaron Taylor <ataylor@subgeniuskitty.com>
Fri, 24 Apr 2020 17:13:21 +0000 (10:13 -0700)
001/Makefile [new file with mode: 0644]
001/README.md [new file with mode: 0644]
001/main.c [new file with mode: 0644]

diff --git a/001/Makefile b/001/Makefile
new file mode 100644 (file)
index 0000000..7a39a62
--- /dev/null
@@ -0,0 +1,18 @@
+# Uncomment these lines to use GCC.
+CC      := gcc
+CC_OPTS := -trigraphs -w
+
+# Uncomment these lines to use Clang.
+#CC      := cc
+#CC_OPTS := -trigraphs -Wno-everything
+
+################################################################################
+
+all:
+       @$(CC) $(CC_OPTS) -o main main.c
+
+clean:
+       @rm -f main main.core
+
+run: all
+       @./main
diff --git a/001/README.md b/001/README.md
new file mode 100644 (file)
index 0000000..940b9d0
--- /dev/null
@@ -0,0 +1,9 @@
+Instructions
+============
+
+Edit the `Makefile`, commenting and uncommenting lines as required to match
+your compiler. Examples are provided that have been tested with GCC 7.3.0 and
+Clang 6.0.1 on FreeBSD 12.
+
+After the `Makefile` is configured, simply run `make clean run` to build and
+execute the program.
diff --git a/001/main.c b/001/main.c
new file mode 100644 (file)
index 0000000..3844f36
--- /dev/null
@@ -0,0 +1,78 @@
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+
+
+#define FALSE "false"
+
+
+typedef define ; define typedef
+
+
+/* It is
+important to /*
+consider the */
+substance  ;/*
+of the /*
+program /*
+when making /*
+changes to /*
+the code. */
+
+
+%:define somewhere ??/
+http
+/* TODO: Look up the correct URL. */
+
+
+int u,v = 42; /* Loop indices */
+
+
+volatile substance inside
+[:> = <%//??/
+Handle with care!
+~false-0xfffffffe,
+'\110',203>>1,
+(13<<3)|4,'\x6c',0x6F,
+',',' ',' '+'-'-'-'
++067,0b1100100+0xa+1,
+114,0x1b0>>2,
+(__unix<<7)-28,
+'"'-'\x1',
+10,0xFEEL??>;
+
+
+define main(argc, argv)
+       char ** argv;
+{
+       /*&*/*&*/*&*/(argc ? &u : &v) = u;
+
+       // Should I really exit this early in the function?????/
+       exit(0);
+
+       // TODO: Finish this conditional.
+       if (!v)
+
+       // This is probably a better spot to exit the function.
+       exit(0);
+
+       // Execute a test string before proceeding.
+       0xf??(  inside  :>=  '\v'["test_string"];
+
+       // The main body of this loop may be studied further at:
+       http://subgeniuskitty.com
+       while (FALSE) {
+               printf("%c", (v^v)[inside][inside]);
+               false[inside] -=- __unix;
+               if (!(inside['-'-'-'] != 017)) {
+                       goto main;
+               } else {
+                       goto somewhere;
+               }
+}
+
+
+/* Recursive signal handler for proper initialization. */
+main:main(false,NULL);
+({_:&&_;});??>
+main();