sashs / Ropper

Display information about files in different file formats and find gadgets to build rop chains for different architectures (x86/x86_64, ARM/ARM64, MIPS, PowerPC, SPARC64). For disassembly ropper uses the awesome Capstone Framework.
https://scoding.de/ropper
BSD 3-Clause "New" or "Revised" License
1.88k stars 206 forks source link

Fix bug on windows #91

Closed bet4it closed 6 years ago

bet4it commented 6 years ago

Refer: df3a0d0e0a7cd268dd14348d0d28d4b7f38d2ab2

sashs commented 6 years ago

Hi,

thank you. Why does that bugfix make a difference on windows? Since you changed the value of x in the loop, have you changed that the address are correct for all gadgets?

bet4it commented 6 years ago

df3a0d0e0a7cd268dd14348d0d28d4b7f38d2ab2 forget to modify _searchGadgetsSingle which is only used on windows. (In fact, this function was commented out when df3a0d0e0a7cd268dd14348d0d28d4b7f38d2ab2 was committed) https://github.com/sashs/Ropper/blob/3d15bb9448dfd2c5439d8c066a7b42d4e08a34d4/ropper/rop.py#L307-L309 https://github.com/sashs/Ropper/blob/3d15bb9448dfd2c5439d8c066a7b42d4e08a34d4/ropper/rop.py#L415-L417

sashs commented 6 years ago

Thx! merged.