Bugfix: 'Ropper' object has no attribute '__gatherGadgetsByEndings'

This commit is contained in:
Sascha Schirra
2022-01-29 15:09:35 +01:00
parent dd4c71e03b
commit d8ede83c21
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -35,6 +35,7 @@ from .gadget import Gadget, GadgetType
from binascii import hexlify, unhexlify
from struct import pack
import re
import multiprocessing
import struct
import sys
import capstone
@@ -285,6 +286,8 @@ class Ropper(object):
if not multiprocessing:
newGadgets = self._searchGadgetsSingle(section=section, binary=binary, instruction_count=instructionCount, gtype=gtype)
else:
if multiprocessing.get_start_method() != 'fork':
multiprocessing.set_start_method('fork')
newGadgets = self._searchGadgetsForked(section=section, binary=binary, instruction_count=instructionCount, gtype=gtype)
gadgets.extend(newGadgets)
+2
View File
@@ -393,6 +393,8 @@ class RopperService(object):
single = False
cache_file = None
try:
if multiprocessing.get_start_method() != 'fork':
multiprocessing.set_start_method('fork')
temp = RopperService.CACHE_FOLDER
cache_file = temp + os.path.sep + self.__getCacheFileName(file)