-
-
Save pyrocat101/c1c300c4d806513c1a56 to your computer and use it in GitHub Desktop.
HITCON CTF2014 - polyglot (Python2/Python3/C/Ruby/Haskell polyglot to `cat flag`)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = {- | |
#if 0 | |
0 + """".to_i => 0} | |
print `cat flag` | |
__END__ | |
""".find('x')} | |
import os | |
p = os.system;{ | |
#endif | |
1}; | |
#define p(s) main(){system(s);} | |
p("cat flag"); | |
#define x // -}();main = do x <- readFile "flag"; putStr x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment