fix Makefile and README.md for 2012/hamano
This commit is contained in:
1 parent
4e9f76f482
commit
06fc780ce5
2 files changed
+38
-30
No files matched your search
@@ -103,8 +103,8 @@ CINCLUDE=
|
||||
#CINCLUDE= -include stdlib.h
|
||||
#CINCLUDE= -include stdio.h
|
||||
#CINCLUDE= -include stdlib.h -include stdio.h
|
||||
#CINCLUDE= -I ${X11_INCDIR}
|
||||
#CINCLUDE= -I ${HOMEBREW_PREFIX}/include/SDL2
|
||||
#CINCLUDE= -I ${X11_INCDIR} -I ${X11_INCDIR}/X11
|
||||
#CINCLUDE= `${SDL2_CONFIG} --cflags`
|
||||
|
||||
# Optimization
|
||||
#
|
||||
@@ -128,7 +128,7 @@ CFLAGS= ${CSTD} ${CWARN} ${ARCH} ${CDEFINE} ${CINCLUDE} ${OPT}
|
||||
LIBS=
|
||||
#LIBS= -lm
|
||||
#LIBS= -L ${X11_LIBDIR} -lX11
|
||||
#LIBS= -L ${HOMEBREW_PREFIX}/lib -lSDL2
|
||||
#LIBS= `${SDL2_CONFIG} --libs`
|
||||
|
||||
# C compiler to use
|
||||
#
|
||||
@@ -142,7 +142,7 @@ ifeq ($(CC),clang)
|
||||
#
|
||||
CSILENCE+= -Wno-comma -Wno-double-promotion -Wno-missing-prototypes \
|
||||
-Wno-missing-variable-declarations -Wno-poison-system-directories \
|
||||
-Wno-shadow -Wno-shorten-64-to-3
|
||||
-Wno-shadow -Wno-shorten-64-to-32
|
||||
#
|
||||
CWARN+= -Weverything
|
||||
#
|
||||
@@ -327,4 +327,3 @@ pluto: charon
|
||||
@echo "dwarf is a type of planet"
|
||||
@echo "therefore, $@ is a planet"
|
||||
@echo "having lots of planets is good feature because supernovae can help ${MAKE} a lot of them"
|
||||
|
||||
+34
-25
@@ -1,34 +1,43 @@
|
||||
# Most elementary use of C - Silver award
|
||||
|
||||
Tsukasa Hamano
|
||||
<hamano@cuspy.org>
|
||||
Tsukasa Hamano
|
||||
<hamano@cuspy.org>
|
||||
|
||||
## To build:
|
||||
# To build:
|
||||
|
||||
make all
|
||||
```sh
|
||||
make
|
||||
```
|
||||
|
||||
### To run:
|
||||
|
||||
./hamano < textfile > output.pdf
|
||||
```sh
|
||||
./hamano < textfile > output.pdf
|
||||
```
|
||||
|
||||
### Try:
|
||||
|
||||
./hamano < README.md > hint.pdf
|
||||
```sh
|
||||
./hamano < README.md > hint.pdf
|
||||
```
|
||||
|
||||
# You can read output.pdf with PDF reader
|
||||
acroread hint.pdf
|
||||
# or
|
||||
evince hint.pdf
|
||||
You can read output.pdf with PDF reader acroread hint.pdf or evince hint.pdf.
|
||||
|
||||
# deobfuscate
|
||||
gcc -xc hint.pdf -o hint
|
||||
./hint
|
||||
To deobfuscate:
|
||||
|
||||
# Of course, You can obfuscate c code
|
||||
echo 'void main(){puts("Hello World!");}' | ./hamano > hello.pdf
|
||||
gcc -xc hello.pdf -o hello2
|
||||
./hello2 | gcc -xc - -o ./hello3
|
||||
./hello3
|
||||
```sh
|
||||
cc -xc hint.pdf -o hint
|
||||
./hint
|
||||
```
|
||||
|
||||
Of course, You can also obfuscate c code:
|
||||
|
||||
```sh
|
||||
echo 'void main(){puts("Hello World!");}' | ./hamano > hello.pdf
|
||||
cc -xc hello.pdf -o hello2
|
||||
./hello2 | gcc -xc - -o ./hello3
|
||||
./hello3
|
||||
```
|
||||
|
||||
## Judges' comments
|
||||
|
||||
@@ -71,20 +80,20 @@ 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
|
||||
* 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:
|
||||
|
||||
(c) Copyright 1984-2015, [Leo Broukhis, Simon Cooper, Landon Curt Noll][judges] - All rights reserved
|
||||
This work is licensed under a [Creative Commons Attribution-ShareAlike 3.0 Unported License][cc].
|
||||
|
||||
[judges]: http://www.ioccc.org/judges.html
|
||||
[cc]: http://creativecommons.org/licenses/by-sa/3.0/
|
||||
-->
|
||||
Reference in new issue
Block a user