Back to articles
Shodan Has a Free API — Scan the Internet for Exposed Devices (With Python Examples)

Shodan Has a Free API — Scan the Internet for Exposed Devices (With Python Examples)

via Dev.to PythonAlex Spinov

Most developers think Shodan is just for hackers. It's not. Shodan is the Google of the internet — but instead of websites, it indexes every device connected to the internet : servers, webcams, routers, databases, industrial systems. And it has a free API that lets you search all of it programmatically. What You Can Do With Shodan's Free API Find exposed databases (MongoDB, Elasticsearch, Redis) Check if your servers have open ports Monitor your company's attack surface Research IoT device security Find servers running specific software versions Quick Start (5 Minutes) 1. Get your free API key Sign up at shodan.io → Account → API Key. Free plan: 100 results per search, 1 scan/month. 2. Install the Python library pip install shodan 3. Search for exposed MongoDB databases import shodan api = shodan . Shodan ( ' YOUR_API_KEY ' ) # Find MongoDB instances with no authentication results = api . search ( ' mongodb port:27017 -authentication ' ) print ( f ' Found { results [ " total " ] } expo

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
5 views

Related Articles