- Reads a list of IP addresses from input files.
- Searches for each IP address using the
/shodan/host/{ip}
endpoint of the Shodan API - Writes the results for each IP address into a file called
ip_results.json
.
To authenticate with the Shodan API, you will need to add a valid API key to the Settings.toml
file.
- Open the file
Settings.toml
using Notepad (or any other text editor). - replace
yourkeyhere123
between the doublequotes with your own API key.
There are some other configuration settings located in this file that change the output from the API response.
Valid values are true
or false
.
Before using this program, you will need to create a file that contains all IP addresses you want to search. Open a text file, and put each IP address on its own line with no extra punctuation. See the file sample_input.txt for an example.
The easiest usage of the program is as follows:
- Download the release package
shodan.zip
here. - Unzip the file and open the resulting folder.
- Using the file explorer, drag and drop the file containing your list of IP addresses onto the
shodan.exe
file. - Open the resulting
ip_results.json
. For a better viewing experience, use your web browser or VSCode to open this file.
- The
ip_results.json
file will be overwritten each time the program is run. If you want to save the results from a previous search, rename the file or move it to another folder. - The program accepts multiple input files, all of which are compiled into the same output file.
- You can also run this program from the command line. Example:
$ path/to/shodan.exe path/to/sample_input.txt