I receive the following success message after performing shodan init {MY_API_KEY}
:
Successfully initialized
And can run all commands I've tested without issue, save for shodan radar
, which returns the following error:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/shodan/cli/worldmap.py", line 205, in fetch_data
for banner in self.api.stream.banners():
File "/usr/local/lib/python3.7/site-packages/shodan/stream.py", line 99, in banners
stream = self._create_stream('/shodan/banners', timeout=timeout)
File "/usr/local/lib/python3.7/site-packages/shodan/stream.py", line 50, in _create_stream
raise APIError(data['error'])
shodan.exception.APIError: Access denied
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/shodan", line 11, in <module>
load_entry_point('shodan==1.8.1', 'console_scripts', 'shodan')()
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/shodan/__main__.py", line 1331, in radar
launch_map(api)
File "/usr/local/lib/python3.7/site-packages/shodan/cli/worldmap.py", line 242, in launch_map
return curses.wrapper(app.run)
File "/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/curses/__init__.py", line 94, in wrapper
return func(stdscr, *args, **kwds)
File "/usr/local/lib/python3.7/site-packages/shodan/cli/worldmap.py", line 222, in run
refresh = self.fetch_data(now)
File "/usr/local/lib/python3.7/site-packages/shodan/cli/worldmap.py", line 212, in fetch_data
except StandardError:
NameError: name 'StandardError' is not defined
I'm running macOS 10.13.6 and Python 3.7.
Also tried to install with Python 2.7 on a raspberry pi with a fully updated Raspbian release, and received this error:
Traceback (most recent call last):
File "/usr/local/bin/shodan", line 11, in <module>
load_entry_point('shodan==1.8.1', 'console_scripts', 'shodan')()
File "/usr/lib/python2.7/dist-packages/click/core.py", line 716, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 696, in main
rv = self.invoke(ctx)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python2.7/dist-packages/click/core.py", line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python2.7/dist-packages/click/core.py", line 534, in invoke
return callback(*args, **kwargs)
File "build/bdist.linux-armv7l/egg/shodan/__main__.py", line 1331, in radar
File "build/bdist.linux-armv7l/egg/shodan/cli/worldmap.py", line 242, in launch_map
File "/usr/lib/python2.7/curses/wrapper.py", line 43, in wrapper
return func(stdscr, *args, **kwds)
File "build/bdist.linux-armv7l/egg/shodan/cli/worldmap.py", line 222, in run
File "build/bdist.linux-armv7l/egg/shodan/cli/worldmap.py", line 205, in fetch_data
File "build/bdist.linux-armv7l/egg/shodan/stream.py", line 99, in banners
File "build/bdist.linux-armv7l/egg/shodan/stream.py", line 50, in _create_stream
shodan.exception.APIError: Access denied
Regenerating my API key did not help, nor did running the init command with sudo
.