Shodan Plugin - IP lookup

Hi,

Im using the shodan plugin and sent it an IP

From the job input
ip:185.240.200.147

Log Output
rapid7/Shodan:1.0.1. Step name: host_information
Shodan: No information available for that IP.
Traceback (most recent call last):
File “/usr/local/lib/python3.6/site-packages/shodan_rapid7_plugin-1.0.1-py3.6.egg/komand_shodan/actions/host_information/action.py”, line 25, in run
response = api.host(ip)
File “/usr/local/lib/python3.6/site-packages/shodan/client.py”, line 221, in host
return self._request(’/shodan/host/%s’ % ‘,’.join(ips), params)
File “/usr/local/lib/python3.6/site-packages/shodan/client.py”, line 181, in _request
raise APIError(data[‘error’])
shodan.exception.APIError: No information available for that IP.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/komand-1.0.1-py3.6.egg/komand/plugin.py", line 307, in handle_step
    output = self.start_step(input_message['body'], 'action', logger, log_stream, is_test, is_debug)
  File "/usr/local/lib/python3.6/site-packages/komand-1.0.1-py3.6.egg/komand/plugin.py", line 415, in start_step
    output = func(params)
  File "/usr/local/lib/python3.6/site-packages/shodan_rapid7_plugin-1.0.1-py3.6.egg/komand_shodan/actions/host_information/action.py", line 27, in run
    raise Exception('Shodan: {}'.format(e))
Exception: Shodan: No information available for that IP.

Isthis an error on my part? Should I need to validate no returns?

Hmm, I don’t think the action should result in an error because of the “No info available” response from the API. We can look into this as a bug. Thanks for reporting :+1:

Hi @phil_pearce, we just released an updated version of the Shodan plugin with improved error handling and example inputs/outputs. Here is the listing on the extension library (v1.1.0) Rapid7 Extensions

1 Like