montysecurity/InfraSpyder

Error : shodan.exception.APIError: Invalid API key

Closed this issue · 1 comments

Error :

infraspider.py -s "services.http.response.html_title: 'WSO2 Management Console'" -p patterns.txt
Traceback (most recent call last):
File "C:\Users\AppData\Roaming\Python\Python311\site-packages\shodan\client.py", line 550, in search_cursor
results = self.search(query, minify=minify, page=page, fields=fields)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Roaming\Python\Python311\site-packages\shodan\client.py", line 520, in search
return self._request('/shodan/host/search', args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\AppData\Roaming\Python\Python311\site-packages\shodan\client.py", line 336, in _request
raise APIError(error)
shodan.exception.APIError: Invalid API key

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "\InfraSpyder\infraspider.py", line 35, in
for result in shodan_api.search_cursor(shodan_query):
File "C:\Users\AppData\Roaming\Python\Python311\site-packages\shodan\client.py", line 561, in search_cursor
raise APIError('Retry limit reached ({:d})'.format(retries))
shodan.exception.APIError: Retry limit reached (5)

The script uses variables to pull the API keys - SHODAN_API_KEY, CENSYS_API_ID, CENSYS_API_SECRET