from pwn import * a = process("./bamboobox") libc = ELF("./libc-2.23.so") elf = ELF("./bamboobox") defadd(size,content): a.recvuntil("Your choice:") a.sendline('2') a.recvuntil("Please enter the length of item name:") a.sendline(str(size)) a.recvuntil("Please enter the name of item:") a.sendline(content)
defdelete(index): a.recvuntil("Your choice:") a.sendline('4') a.recvuntil("Please enter the index of item:") a.sendline(str(index))
defedit(index,size,content): a.recvuntil("Your choice:") a.sendline('3') a.recvuntil("Please enter the index of item:") a.sendline(str(index)) a.recvuntil("Please enter the length of item name:") a.sendline(str(size)) a.recvuntil("Please enter the new name of the item:") a.sendline(content)
from pwn import * a = process("./bamboobox") libc = ELF("./libc-2.23.so") elf = ELF("./bamboobox") defadd(size,content): a.recvuntil("Your choice:") a.send('2') a.recvuntil("Please enter the length of item name:") a.send(str(size)) a.recvuntil("Please enter the name of item:") a.send(content)
defdelete(index): a.recvuntil("Your choice:") a.send('4') a.recvuntil("Please enter the index of item:") a.send(str(index))
defedit(index,size,content): a.recvuntil("Your choice:") a.send('3') a.recvuntil("Please enter the index of item:") a.send(str(index)) a.recvuntil("Please enter the length of item name:") a.send(str(size)) a.recvuntil("Please enter the new name of the item:") a.send(content)
from pwn import * a = process("./secretgarden") libc = ELF("./libc-2.23.so") elf = ELF("./secretgarden") defadd(size,content,color): a.recvuntil("Your choice : ") a.sendline('1') a.recvuntil("Length of the name :") a.sendline(str(size)) a.recvuntil("The name of flower :") a.send(content) a.recvuntil("The color of the flower :") a.sendline(color)
defdelete(index): a.recvuntil("Your choice : ") a.sendline('3') a.recvuntil("Which flower do you want to remove from the garden:") a.sendline(str(index))