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

CAIDA Data #107

Closed KlausItem closed 3 years ago

KlausItem commented 5 years ago

I always get this Error

FileNotFoundError: [Errno 2] No such file or directory: '/home/harpoon/.config/harpoon/2015_caida.csv'

and have no Idea where to get this Data.....and how to update.

Anny solution ??

Te-k commented 5 years ago

Hi, have you run harpoon config -u to download all the needed files ?

KlausItem commented 5 years ago

When i run harpoon config -u in virtenv i got this error.

harpoon config -u
Updating all plugins data:
Updating plugin ip
Downloading MaxMind GeoIP Database
-GeoLite2-City.mmdb
-GeoLite2-ASN.mmdb
Downloading ASN Name database
-asnname.csv
Downloading CIDR data
Connecting to ftp://archive.routeviews.org
Traceback (most recent call last):
  File "/home/harpoon/env/bin/pyasn_util_download.py", line 125, in <module>
    srvr, rp, fn = find_latest_routeviews(4 if args.latestv4 else 6 if args.latestv6 else '46')
  File "/home/harpoon/env/bin/pyasn_util_download.py", line 116, in find_latest_routeviews
    sub_dir='RIBS')
  File "/home/harpoon/env/bin/pyasn_util_download.py", line 88, in find_latest_in_ftp
    months = sorted(ftp.nlst(archive_root), reverse=True)  # e.g. 'route-views6/bgpdata/2016.12'
  File "/usr/lib/python3.5/ftplib.py", line 558, in nlst
    self.retrlines(cmd, files.append)
  File "/usr/lib/python3.5/ftplib.py", line 467, in retrlines
    with self.transfercmd(cmd) as conn, \
  File "/usr/lib/python3.5/ftplib.py", line 398, in transfercmd
    return self.ntransfercmd(cmd, rest)[0]
  File "/usr/lib/python3.5/ftplib.py", line 364, in ntransfercmd
    resp = self.sendcmd(cmd)
  File "/usr/lib/python3.5/ftplib.py", line 272, in sendcmd
    return self.getresp()
  File "/usr/lib/python3.5/ftplib.py", line 243, in getresp
    raise error_temp(resp)
ftplib.error_temp: 425 Security: Bad IP connecting.
Traceback (most recent call last):
  File "/home/harpoon/env/bin/harpoon", line 11, in <module>
    sys.exit(main())
  File "/home/harpoon/env/lib/python3.5/site-packages/harpoon/main.py", line 61, in main
    plugins[args.command].run(config, args, plugins)
  File "/home/harpoon/env/lib/python3.5/site-packages/harpoon/commands/config.py", line 68, in run
    plugins[p].update()
  File "/home/harpoon/env/lib/python3.5/site-packages/harpoon/commands/ip.py", line 133, in update
    ls = glob.glob("rib*.bz2")[0]
IndexError: list index out of range

Index out of range !!! ????

KlausItem commented 5 years ago

It downloads the file once but gave me following result.

harpoon ip info 172.34.127.2
MaxMind: Located in None, United States
MaxMind: ASN21928, T-Mobile USA, Inc.
CAIDA Type: Transit/Access
Traceback (most recent call last):
  File "/home/harpoon/env/bin/harpoon", line 11, in <module>
    sys.exit(main())
  File "/home/harpoon/env/lib/python3.5/site-packages/harpoon/main.py", line 61, in main
    plugins[args.command].run(config, args, plugins)
  File "/home/harpoon/env/lib/python3.5/site-packages/harpoon/commands/ip.py", line 217, in run
    asndb2 = pyasn.pyasn(self.asncidr)
  File "/home/harpoon/env/lib/python3.5/site-packages/pyasn/__init__.py", line 67, in __init__
    self._records = self.radix.load_ipasndb(ipasn_file, "")
OSError: Could not open the file.

That is really strange

Te-k commented 5 years ago

Can you run pyasn_util_download.py --latest and paste the result here ?

KlausItem commented 5 years ago
Connecting to ftp://archive.routeviews.org
Traceback (most recent call last):
  File "/home/cuckoo/harpoon/env/bin/pyasn_util_download.py", line 125, in <module>
    srvr, rp, fn = find_latest_routeviews(4 if args.latestv4 else 6 if args.latestv6 else '46')
  File "/home/cuckoo/harpoon/env/bin/pyasn_util_download.py", line 116, in find_latest_routeviews
    sub_dir='RIBS')
  File "/home/cuckoo/harpoon/env/bin/pyasn_util_download.py", line 88, in find_latest_in_ftp
    months = sorted(ftp.nlst(archive_root), reverse=True)  # e.g. 'route-views6/bgpdata/2016.12'
  File "/usr/lib/python3.6/ftplib.py", line 559, in nlst
    self.retrlines(cmd, files.append)
  File "/usr/lib/python3.6/ftplib.py", line 468, in retrlines
    with self.transfercmd(cmd) as conn, \
  File "/usr/lib/python3.6/ftplib.py", line 399, in transfercmd
    return self.ntransfercmd(cmd, rest)[0]
  File "/usr/lib/python3.6/ftplib.py", line 365, in ntransfercmd
    resp = self.sendcmd(cmd)
  File "/usr/lib/python3.6/ftplib.py", line 273, in sendcmd
    return self.getresp()
  File "/usr/lib/python3.6/ftplib.py", line 244, in getresp
    raise error_temp(resp)
ftplib.error_temp: 425 Security: Bad IP connecting.
Te-k commented 5 years ago

I have no clue why this is happening, it seems to be an issue with pyasn tho. Can you check which version of pyasn you have ?

Te-k commented 4 years ago

Can you try with version 0.1.4 ?

Te-k commented 3 years ago

I close, feel free to reopen if it is still a problem