Te-k / harpoon

CLI tool for open source and threat intelligence
https://www.randhome.io/blog/2018/02/23/harpoon-an-osint-/-threat-intelligence-tool/
GNU General Public License v3.0
1.16k stars 181 forks source link

Downloading CIDR data -> config -u failing #122

Closed XavCC closed 4 years ago

XavCC commented 4 years ago

Hi,

I've managed to install like :

$ git clone https://github.com/Te-k/harpoon.git
$ cd harpoon
$ pip3 install .
$ python3 setup.py  install

Then config -u failed with IndexError: list index out of range related to ip.py

[…]
Downloading CIDR data
Traceback (most recent call last):
  File "/bin/pyasn_util_download.py", line 4, in <module>
    __import__('pkg_resources').run_script('pyasn==1.6.0b1', 'pyasn_util_download.py')
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 667, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1453, in run_script
    raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/pyasn_util_download.py' not found in metadata at '/home/x/.local/lib/python3.8/site-packages/pyasn-1.6.0b1-py3.8.egg-info'
Traceback (most recent call last):
  File "/bin/harpoon", line 11, in <module>
    load_entry_point('harpoon==0.1.3', 'console_scripts', 'harpoon')()
  File "/path/to/.local/lib/python3.8/site-packages/harpoon/main.py", line 61, in main
    plugins[args.command].run(config, args, plugins)
  File "/path/to/.local/lib/python3.8/site-packages/harpoon/commands/config.py", line 68, in run
    plugins[p].update()
  File "/path/to/.local/lib/python3.8/site-packages/harpoon/commands/ip.py", line 134, in update
    ls = glob.glob("rib*.bz2")[0]
IndexError: list index out of range
Te-k commented 4 years ago

Ah right, it seems to be a change in pyasn, I need to fix that, thanks for reporting it

XavCC commented 4 years ago

If It helps :thinking: In case bug come from my own setup and You will don't waste time to investigate on your repo

around pkg_resources.ResolutionError: Script 'scripts/pyasn_util_download.py' not found in metadata at '/home/x/.local/lib/python3.8/site-packages/pyasn-1.6.0b1-py3.8.egg-info'

Here is the output

~/.local/lib/python3.8/site-packages/pyasn-1.6.0b1-py3.8.egg-info  
> cat installed-files.txt 
../../../../bin/pyasn_util_asnames.py
../../../../bin/pyasn_util_convert.py
../../../../bin/pyasn_util_download.py
../pyasn/__init__.py
../pyasn/__pycache__/__init__.cpython-38.pyc
../pyasn/__pycache__/_version.cpython-38.pyc
../pyasn/__pycache__/mrtx.cpython-38.pyc
../pyasn/_version.py
../pyasn/mrtx.py
../pyasn/pyasn_radix.cpython-38-x86_64-linux-gnu.so
PKG-INFO
SOURCES.txt
dependency_links.txt
not-zip-safe
top_level.txt

and

~/.local/lib/python3.8/site-packages/pyasn-1.6.0b1-py3.8.egg-info  
cat SOURCES.txt 
LICENSE
MANIFEST.in
README.md
setup.cfg
setup.py
pyasn/__init__.py
pyasn/_version.py
pyasn/mrtx.py
pyasn/pyasn_radix.c
pyasn-utils/pyasn_util_asnames.py
pyasn-utils/pyasn_util_convert.py
pyasn-utils/pyasn_util_download.py
pyasn.egg-info/PKG-INFO
pyasn.egg-info/SOURCES.txt
pyasn.egg-info/dependency_links.txt
pyasn.egg-info/not-zip-safe
pyasn.egg-info/top_level.txt
pyasn/_radix/radix.c
pyasn/_radix/radix.h
XavCC commented 4 years ago

It came from my own side.

So sorry.

> python -m pip uninstall pyasn

Then

> python -m pip install pyasn

config -u :+1:

If it's ok to you we can close this issue.

Te-k commented 4 years ago

Oh good to know, can you share what is your version of pyasn now ?

XavCC commented 4 years ago

With a better path and the same version /usr/lib/python3.8/site-packages/pyasn-1.6.0b1

Sorry for my weird and noob disturbances