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.py
file. - Install the
shodan
module by runningpip3 install shodan
. - Install the
requests
module by runningpip3 install requests
. - Install the
nested-lookup
module by runningpip3 install nested-lookup
. - Install the
diagnostics
module by runningpip3 install diagnostics
.
- Open the
DiscoDan.py
file in a text editor. - Replace
YOUR_SHODAN_API_KEY
with your Shodan API key. - Replace
YOUR_DISCORD_WEBHOOK_URL
with your Discord webhook URL. - Modify the
QUERY
parameter to customize your search query. - Modify the
VERBOSE
parameter to display helpful dignostic information.
- Run the script by running
python3 DiscoDan.py
in a terminal. - The bot will search for a host with a screenshot in the country specified by the
QUERY
parameter. - 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 ?