sashs / Ropper

Display information about files in different file formats and find gadgets to build rop chains for different architectures (x86/x86_64, ARM/ARM64, MIPS, PowerPC, SPARC64). For disassembly ropper uses the awesome Capstone Framework.
https://scoding.de/ropper
BSD 3-Clause "New" or "Revised" License
1.88k stars 206 forks source link

Crash when attempting to load file #133

Open jrozner opened 4 years ago

jrozner commented 4 years ago

ropper --file sshd

[INFO] Load gadgets for section: PHDR
[ERROR] Please report this error on https://github.com/sashs/ropper
[ERROR] Traceback (most recent call last):
  File "/Users/joe/pwn/lib/python3.9/site-packages/ropper/console.py", line 62, in cmd
    func(self, text)
  File "/Users/joe/pwn/lib/python3.9/site-packages/ropper/console.py", line 501, in __handleOptions
    self.__loadGadgets()
  File "/Users/joe/pwn/lib/python3.9/site-packages/ropper/console.py", line 299, in __loadGadgets
    self.__searchGadgetsFor(self.currentFileName)
  File "/Users/joe/pwn/lib/python3.9/site-packages/ropper/console.py", line 303, in __searchGadgetsFor
    self.__rs.loadGadgetsFor(binary)
  File "/Users/joe/pwn/lib/python3.9/site-packages/ropper/service.py", line 640, in loadGadgetsFor
    load_gadgets(fc)
  File "/Users/joe/pwn/lib/python3.9/site-packages/ropper/service.py", line 625, in load_gadgets
    f.allGadgets = self.__ropper.searchGadgets(f.loader, instructionCount=self.options.inst_count, gtype=gtype,multiprocessing=self.options.multiprocessing)
  File "/Users/joe/pwn/lib/python3.9/site-packages/ropper/rop.py", line 286, in searchGadgets
    newGadgets = self._searchGadgetsForked(section=section, binary=binary, instruction_count=instructionCount, gtype=gtype)
  File "/Users/joe/pwn/lib/python3.9/site-packages/ropper/rop.py", line 375, in _searchGadgetsForked
    processes[cpu].start()
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/process.py", line 121, in start
    self._popen = self._Popen(self)
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
    return Popen(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
    super().__init__(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
    self._launch(process_obj)
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
    reduction.dump(process_obj, fp)
  File "/usr/local/Cellar/python@3.9/3.9.0_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
TypeError: cannot pickle '_io.TextIOWrapper' object
abathur commented 3 years ago

I ran into this as well. I tried it with a few different python versions, and it looks like this behavior appears in python3.8, but is not present in python3.7.

sashs commented 3 years ago

Hi. Thank you. I will check that.

001SM commented 2 years ago

me too

sashs commented 2 years ago

I cannot reproduce this issue.