As in
sgit -e 's/\([Aa]uthor.*\)comments/\1remarks/g' -e 's/\([Jj]udge.*\)comments/\1remarks/g' '*README.md'
Most elementary use of C - Silver award
Tsukasa Hamano
<hamano@cuspy.org>
To build:
make
To run:
./hamano < textfile > output.pdf
Try:
./hamano < README.md > hint.pdf
You can read output.pdf with PDF reader acroread hint.pdf or evince hint.pdf.
To deobfuscate:
cc -xc hint.pdf -o hint
./hint
Of course, You can also obfuscate C code:
echo 'int main(){puts("Hello World!");}' | ./hamano > hello.pdf
cc -Wno-implicit-function-declaration -xc hello.pdf -o hello2
./hello2 | gcc -Wno-implicit-function-declaration -xc - -o ./hello3
./hello3
Judges' remarks
This entry treads into a new territory for IOCCC - generating PDF files.
The originally submitted entry could have been thought of as a "Best abuse of Ghostscript" winner. :-)
The source code and rendered pages are obfuscated for humans (where is the font?), and the submitted entry created PDF files that left Ghostscript confused.
The results can be viewed with Acrobat Reader, evince and Apple's Preview.
The updated version can also be viewed using Ghostscript.
There is something strange about the little flags in the output. A search of English literature will provide a hint. The conclusion you might draw is too elementary. :-)
So what do those flags really mean?
The [Dancing men algorithm][1] might be useful.
Don't forget to take a look at the generated PDF, perhaps you might even want to compile the output with a C compiler. When you run it, what does it output?
Author's remarks
This program obfuscate text file into PDF file with Dancing men algorithm.
http://en.wikipedia.org/wiki/The_Adventure_of_the_Dancing_Men
Probably, the output PDF file is compliant with PDF 1.3. And also available to compile as C code.
I've been tested with GCC 4.7 and Clang 3.0 on Linux, and following PDF Reader:
* Adobe Acrobat Reader
* Evince
* Ghostscript
* Xpdf
Obfuscations
This program is obfuscated by using classical methods. But can you find out the embedded font from fragmented glyph?
Copyright and CC BY-SA 4.0 License:
This file is Copyright (c) 2023 by Landon Curt Noll. All Rights Reserved. You are free to share and adapt this file under the terms of this license:
Creative Commons Attribution-ShareAlike 4.0 International (CC BY-SA 4.0)
For more information, see: https://creativecommons.org/licenses/by-sa/4.0/