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
How can I help to fix this issue?
While reproducing the steps provided by @nbulischeck , I got the following:
>>> elf = ELF.from_assembly('syscall; ret')
>>> rop = ROP(elf)
>>> rop.syscall
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/hunter/app/pwntools/pwnlib/rop/rop.py", line 1398, in __getattr__
if self.gadgets[each]['insns'] == [mapping[attr]]:
File "/home/hunter/app/pwntools/pwnlib/rop/gadgets.py", line 57, in __getitem__
if isinstance(key, six.integer_types):
NameError: name 'six' is not defined
>>> rop.gadgets.items()
dict_items([(268435458, Gadget(0x10000002, ['ret'], [], 0x4)), (268435456, Gadget(0x10000000, ['syscall'], [], 0x0))])
pwnlib/rop/gadgets.py is missing import six. This is easy to fix.
Regarding the original issue, should the syscall gadget have only the syscall instruction or should insns also include ret?
This line fails to find valid syscall gadgets. I'm not 100% sure if that for loop is a valid solution.
pwntools/pwnlib/rop/rop.py
Line 1276 in c15afc5
The text was updated successfully, but these errors were encountered: