Created
August 8, 2016 02:23
-
-
Save jpouellet/1a262c1b7702d739c63a03beeb48a188 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 python | |
| from pwn import * | |
| r=remote('198.186.190.107', 4000) | |
| r.sendafter('what name', sys.argv[1]+'\n') | |
| r.sendafter('Password', sys.argv[2]+'\n') | |
| log=open('mud.log', 'a') | |
| def cmd(command): | |
| sys.stdout.write(command+'\n') | |
| log.write('\x1b[1m%s\x1b[0m\n' % command) | |
| r.sendline(command) | |
| resp = r.recvuntil('> ') | |
| log.write(resp) | |
| log.flush() | |
| sys.stdout.write(resp) | |
| return resp | |
| for i in xrange(30): | |
| pass; | |
| while True: | |
| try: | |
| while True: | |
| x=cmd(random.choice(['north','east','south','west'])) | |
| if "scroll" in x: | |
| break | |
| time.sleep(1) | |
| except: | |
| pass | |
| r.interactive(prompt='') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment