diff --git a/2012/hamano/Makefile b/2012/hamano/Makefile index b4f90df6f..3e80f4f80 100644 --- a/2012/hamano/Makefile +++ b/2012/hamano/Makefile @@ -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" - diff --git a/2012/hamano/README.md b/2012/hamano/README.md index c6416215e..dec6736cd 100644 --- a/2012/hamano/README.md +++ b/2012/hamano/README.md @@ -1,34 +1,43 @@ # Most elementary use of C - Silver award -Tsukasa Hamano - + Tsukasa Hamano + -## 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? --------------------------------------------------------------------------------- -