0

I need help please write a script for Shodan. I have a lot of IP addresses on the monitor. I want to write a script that output from the API monitor: All the vulnerabilities and IP addresses that are vulnerable to the CSV file

Thanks

niro
  • 1
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Mar 02 '22 at 19:41
  • very simple: Write a script that extracts to an excel file. Ip and vulnerabilities from Shodan's monitor – niro Mar 02 '22 at 19:49

1 Answers1

0

The easiest approach would be to use the Shodan CLI to download all information about your monitored IPs then either parse out the banners that you care about or convert it to a CSV. For example:

# Download all the data and store it in the file called "mydata.json.gz"
$ shodan alert download mydata.json.gz

# Convert the Shodan data file to CSV
# Note: the CSV will contain fewer properties than the JSON file
$ shodan convert mydata.json.gz csv

You can also look at the Python code for the above shodan alert download command to see how the Shodan CLI grabs the list of IPs. You could modify that code so it only downloads information about IPs that have vulnerabilities by checking if there is a vulns property on the banner.

Additional References
achillean
  • 520
  • 4
  • 10