Skip to content

Commit

Permalink
ROP: add sp_move when pop rsp
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketMaDev committed Dec 20, 2024
1 parent bc8a126 commit e93ca77
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pwnlib/rop/rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -1391,6 +1391,8 @@ def __getattr__(self, k):
if pop.match(insn):
regs.append(pop.match(insn).group(1))
sp_move += context.bytes
if 'sp' in insn:
sp_move += 9999999
elif add.match(insn):
arg = int(add.match(insn).group(1), 16)
sp_move += arg
Expand Down

0 comments on commit e93ca77

Please sign in to comment.