Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: 'NoneType' object is not subscriptable when running sephiroth -s nginx -t asn -a AS15169 -a AS31337 -t azure #81

Closed
buvanesh-s opened this issue Jun 30, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@buvanesh-s
Copy link

When running the command sephiroth -s nginx -t asn -a AS15169 -a AS31337 -t azure, an error occurs during the fetching of IP ranges. The traceback indicates a TypeError in the Azure provider.

Steps to Reproduce

  • Install sephiroth using pip.
  • Run the following command:
$ sephiroth -s nginx -t asn -a AS15169 -a AS31337 -t azure
(asn) Fetching IP ranges from api.hackertarget.com for 2 ASNs
(azure) Fetching IP ranges from Microsoft
Traceback (most recent call last):
  File "/usr/local/bin/sephiroth", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/dist-packages/Sephiroth.py", line 237, in main
    provider, excludeip6=args.excludeip6, compacted=args.compacted
  File "/usr/local/lib/python3.6/dist-packages/Sephiroth.py", line 43, in get_ranges
    provider = Provider(selected_provider)
  File "/usr/local/lib/python3.6/dist-packages/sephiroth/providers/provider.py", line 20, in __init__
    self.provider = classmap[provider]()
  File "/usr/local/lib/python3.6/dist-packages/sephiroth/providers/azure.py", line 9, in __init__
    self.source_ranges = self._get_ranges()
  File "/usr/local/lib/python3.6/dist-packages/sephiroth/providers/azure.py", line 19, in _get_ranges
    direct_link = soup.select_one(".failoverLink")["href"]
TypeError: 'NoneType' object is not subscriptable
@buvanesh-s buvanesh-s added the bug Something isn't working label Jun 30, 2024
@0xdade
Copy link
Owner

0xdade commented Jun 30, 2024

Hi there, I think this is related to #80, which I have on my backlog but was traveling when it was filed. I'll test that branch out and get it merged today if it fixes the issue!

@0xdade
Copy link
Owner

0xdade commented Jun 30, 2024

@buvanesh-s Can you install 1.0.4 and see if your problem is gone? Works here now!

@buvanesh-s
Copy link
Author

Thanks, it worked now.

@0xdade 0xdade closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants