Skip to content

Commit

Permalink
fix shifter test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle-Kyle committed Apr 30, 2024
1 parent ed51c3e commit 2b77c03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_chainbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,10 @@ def test_shifter():
rop.find_gadgets()
rop.save_gadgets(cache_path)

chain = rop.shift(0x54, preserve_regs=['ebx'])
chain = rop.shift(0x50, preserve_regs=['ebx'])
init_sp = chain._blank_state.regs.sp.concrete_value - len(chain._values) * proj.arch.bytes
state = chain.exec()
assert state.regs.sp.concrete_value == init_sp + 0x54 + proj.arch.bytes
assert state.regs.sp.concrete_value == init_sp + 0x50 + proj.arch.bytes

chain = rop.set_regs(ebx=0x41414141)
chain += rop.shift(0x54, preserve_regs=['ebx'])
Expand Down

0 comments on commit 2b77c03

Please sign in to comment.