Skip to content

Commit

Permalink
Merge pull request #98 from xairy/master
Browse files Browse the repository at this point in the history
Add sc, bctr and bctrl gadget endings for PowerPC
  • Loading branch information
sashs authored May 2, 2019
2 parents ace1c3b + 66aff1a commit 693e6b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ropper/arch.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,8 @@ def __init__(self):
def _initGadgets(self):
super(ArchitecturePPC, self)._initGadgets()
self._endings[gadget.GadgetType.ROP] = [(b'\x4e\x80\x00\x20', 4)] # blr
self._endings[gadget.GadgetType.JOP] = []
self._endings[gadget.GadgetType.JOP] = [(b'\x4e\x80\x04[\x20-\x21]', 4)] # bctr, bctrl
self._endings[gadget.GadgetType.SYS] = [(b'\x44\x00\x00\x02', 4)] # sc


class ArchitecturePPC64(ArchitecturePPC):
Expand Down

0 comments on commit 693e6b8

Please sign in to comment.