Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ropper/rop.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ def searchGadgets(self, binary, instructionCount=5, gtype=GadgetType.ALL, multip
def _searchGadgetsSingle(self, section, binary, instruction_count=5, gtype=GadgetType.ALL):

toReturn = []
code = bytes(bytearray(section.bytes))
code = memoryview(section.bytes)
# TODO: Another solution should be used here. This is a hack for compatibility reasons. to resolve the gadget address calculation of segments of elf files have a different base address if calculated segment.virtualAddress - segment.offset
offset = section.offset - (binary.originalImageBase - (section.virtualAddress - section.offset))
#offset = section.offset
Expand Down