Created
September 4, 2017 09:45
Star
You must be signed in to star a gist
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
#!/usr/bin/env python2 | |
# Tokyo Westerns CTF 3rd 2017: Rev Rev Rev | |
# | |
# ref: https://github.com/angr/angr-doc/blob/master/examples/defcon2016quals_baby-re_0/solve.py | |
import angr | |
def main(): | |
proj = angr.Project('./rev_rev_rev-a0b0d214b4aeb9b5dd24ffc971bd391494b9f82e2e60b4afc20e9465f336089f', load_options={'auto_load_libs': False}) | |
path_group = proj.factory.path_group(threads=12) | |
path_group.explore(find=0x0804867c, avoid=(0x0804868e, 0x0804860d, 0x080486ac)) | |
return path_group.found[0].state.posix.dumps(0) | |
if __name__ == '__main__': | |
print(repr(main())) | |
''' | |
$ ./solve.py | |
WARNING | 2017-09-02 21:39:46,653 | claripy | Claripy is setting the recursion limit to 15000. If Python segfaults, I am sorry. | |
'\xffTWCTF{qpzisyDnbmboz76oglxpzYdk}\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\n\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00' | |
./solve.py 22.65s user 1.92s system 105% cpu 23.321 total | |
''' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment