Skip to content

Instantly share code, notes, and snippets.

@0xPwny
Created October 12, 2018 15:35
Show Gist options
  • Save 0xPwny/29b68a356c04ff5a670bab05ed806aef to your computer and use it in GitHub Desktop.
Save 0xPwny/29b68a356c04ff5a670bab05ed806aef to your computer and use it in GitHub Desktop.
root-me heap overflow 2 - SKELET
from pwn import *
r = process("/root/pwnvm/challs/rootit/ch38")
pause()
def new(data):
r.sendline("new {}".format(data))
r.recvuntil(">")
def free(idx):
r.sendline("free {}".format(idx))
r.recvuntil(">")
def modif(idx,data):
r.sendline("modif {} {}".format(idx,data))
r.recvuntil(">")
def getID(idx):
r.sendline("show")
r.recvuntil(str(idx)+"\nID = ")
return r.recvline().strip()
r.interactive()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment