This is a Python script that uses the Shodan API to search for hosts with screenshots in a specific country, and sends a random screenshot to a Discord webhook once per hour.
- Python 3.6 or later
- A Shodan API key
- A Discord webhook URL
- Clone this repository or download the
DiscoDan.pyfile. - Install the
shodanmodule by runningpip3 install shodan. - Install the
requestsmodule by runningpip3 install requests. - Install the
nested-lookupmodule by runningpip3 install nested-lookup. - Install the
diagnosticsmodule by runningpip3 install diagnostics.
- Open the
DiscoDan.pyfile in a text editor. - Replace
YOUR_SHODAN_API_KEYwith your Shodan API key. - Replace
YOUR_DISCORD_WEBHOOK_URLwith your Discord webhook URL. - Modify the
QUERYparameter to customize your search query. - Modify the
VERBOSEparameter to display helpful dignostic information.
- Run the script by running
python3 DiscoDan.pyin a terminal. - The bot will search for a host with a screenshot in the country specified by the
QUERYparameter. - The bot will send a random msg containing a link to the Discord webhook (adjust the timing) per hour
- The msgs will contain: host's IP address, city, and country and a link to the Shodan hosted image(s).
- App will ensure that no duplicate request are sent to the channle
- App will proceed to exhaust the contents gathered from the query until finished
- Next steps ?