Exemple #1
0
    def __searchPopPopRet(self):
        r = Ropper(self.binary)

        self.binary.printer.printTableHeader('POP;POP;REG Instructions')
        for section in self.binary.executableSections:

            vaddr = self.binary.manualImagebase + section.offset if self.binary.manualImagebase != None else section.virtualAddress
            pprs = r.searchPopPopRet(section.bytes, 0x0, section=section, badbytes=unhexlify(self.__options.badbytes))
            for ppr in pprs:
                ppr.imageBase = vaddr
                self.__printGadget(ppr)
        self.__cprinter.println('')
Exemple #2
0
    def __searchPopPopRet(self):
        r = Ropper(self.__binary.arch)

        self.__printer.printTableHeader('POP;POP;REG Instructions')
        for section in self.__binary.executableSections:

            vaddr = self.__options.I + section.offset if self.__options.I != None else section.virtualAddress
            pprs = r.searchPopPopRet(section.bytes,
                                     0x0,
                                     badbytes=unhexlify(
                                         self.__options.badbytes))
            for ppr in pprs:
                ppr.imageBase = vaddr
                self.__printGadget(ppr)
        print('')