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

Filebytes module missing #88

Closed reijin90 closed 6 years ago

reijin90 commented 6 years ago

Hi!

I followed the instructions to just run Ropper without installation, but it doesn't work:

master@mind:~$ git clone https://github.com/sashs/ropper.git
Cloning into 'ropper'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 3507 (delta 5), reused 11 (delta 5), pack-reused 3493
Receiving objects: 100% (3507/3507), 2.28 MiB | 950.00 KiB/s, done.
Resolving deltas: 100% (2464/2464), done.
master@mind:~$ cd ropper/
master@mind:~/ropper$ git sub
submodule   subtree
master@mind:~/ropper$ git submodule init
Submodule 'filebytes' (https://github.com/sashs/filebytes.git) registered for path 'filebytes'
master@mind:~/ropper$ git submodule update
Cloning into '/home/master/ropper/filebytes'...
Submodule path 'filebytes': checked out 'dafdbe6ab642041bfdedd8d09676944e80e13ce2'
master@mind:~/ropper$ ./Ropper.py
Traceback (most recent call last):
  File "./Ropper.py", line 21, in <module>
    import ropper
  File "/home/master/ropper/ropper/__init__.py", line 19, in <module>
    from filebytes.pe import ImageDirectoryEntry
ImportError: No module named filebytes.pe

I don't understand why it doesn't work anymore. It has worked for sure in the past, but after the new git pull I had this issue. Even creating a new clone of the repo doesn't seem to help (as you can see above).

reijin90 commented 6 years ago

Ok, so it seems the referenced repo structure is the problem, as the module is essentially under firebytes/firebytes/pe.py. I just had to move the contents from firebytes/firebytes/* to firebytes/ and the module is found now.

sashs commented 6 years ago

That is strage, I will check that. Since I have sys.path.append("filebytes") in Ropper.py it should work.

sashs commented 6 years ago

Hey,

It should work now.