JonathanSalwan/ROPgadget

find something that may be default setup bug on kubuntu env

Valkierja opened this issue · 2 comments

my system is a clean kubuntu20.04

when I exactly follow the README file install ROPgadget,I got some problems,which have been resolved by following issue#106(#106 https://blog.csdn.net/qq_31990441/article/details/103534937

but I think the problems can be auto-solve by changing setup.py so I re-raise issue 106 as this issue

(BTW,English is not my first language ,please forgive my spelling or syntax mistakes.)

the following is what I did

sudo pip install capstone
git clone
cd ROPgadget/
sudo python3 setup.py install
$ ROPgadget -h
Traceback (most recent call last):
  File "/usr/local/bin/ROPgadget", line 4, in <module>
    __import__('pkg_resources').run_script('ROPGadget==6.6', 'ROPgadget')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 667, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1452, in run_script
    raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/ROPgadget' not found in metadata at '/usr/local/lib/python3.8/dist-packages/ROPGadget-6.6.dist-info'


//then


➜  ROPgadget git:(master) ✗ sudo cp -r scripts /usr/local/lib/python3.8/dist-packages/ROPGadget-6.6.dist-info
➜  ROPgadget git:(master) ✗ ROPgadget -h    
usage: ROPgadget [-h] [-v] [-c] [--binary <binary>] [--opcode <opcodes>] [--string <string>]
                 [--memstr <string>] [--depth <nbyte>] [--only <key>] [--filter <key>] [--range <start-end>]
                 [--badbytes <byte>] [--rawArch <arch>] [--rawMode <mode>] [--rawEndian <endian>] [--re <re>]
                 [--offset <hexaddr>] [--ropchain] [--thumb] [--console] [--norop] [--nojop] [--callPreceded]
                 [--nosys] [--multibr] [--all] [--noinstr] [--dump] [--silent] [--align ALIGN]
                 [--mipsrop <rtype>]

//behaviour normally

Installing ROPgadget via pip should work fine:

sudo -H python3 -m pip install ROPgadget

Updated corresponding docs in README.