oldrho / ip2provider

Resolves an IP address to the cloud provider it is hosted on
GNU General Public License v3.0
87 stars 17 forks source link

Error updating Cloudflare ranges #8

Closed syrinxtech closed 8 months ago

syrinxtech commented 1 year ago

When I use the --update-lists option, I get the following error:

Traceback (most recent call last):
  File "/home/kali/tools/OSINT/ip2provider/./ip2provider.py", line 201, in <module>
    main()
  File "/home/kali/tools/OSINT/ip2provider/./ip2provider.py", line 58, in main
    update()
  File "/home/kali/tools/OSINT/ip2provider/./ip2provider.py", line 195, in update
    total += cloudflare.update()
             ^^^^^^^^^^^^^^^^^^^
  File "/home/kali/tools/OSINT/ip2provider/lists/cloudflare.py", line 17, in update
    elements = soup.find('h2',string='IPv4').parent.find_all('li')
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'parent'

I went to the URL shown in the cloudflare.py file and it did provide a text file listing. Any thoughts?

oldrho commented 8 months ago

Fixed as of 598d637 - also support IPv6 from Cloudflare now.