{"tool":"shodan","name":"Shodan CLI","description":"The command line for Shodan, the search engine for internet-connected devices: search banners, look up hosts and monitor networks.","tags":["internet scanning","devices","search"],"homepage":"https://www.shodan.io","docs":"https://cli.shodan.io","install":{"pipx":"pipx install shodan"},"related":["spiderfoot","amass","masscan"],"total_commands":19,"commands":[{"id":1,"category":"Setup","command":"shodan init <api_key>","example":"shodan init YOUR_API_KEY","explanation":"Stores your API key. Query credits and filters depend on your plan."},{"id":13,"category":"Setup","command":"shodan info","example":"shodan info","explanation":"Shows remaining query and scan credits."},{"id":15,"category":"Setup","command":"shodan myip","example":"shodan myip","explanation":"Your public IP address as Shodan sees it."},{"id":16,"category":"Searching","command":"shodan search \"<query>\"","example":"shodan search \"product:nginx country:GB\"","explanation":"Searches banners. Uses query credits for filters and paging."},{"id":17,"category":"Searching","command":"shodan search --fields ip_str,port,org,hostnames \"<query>\"","example":"shodan search --fields ip_str,port,org,hostnames \"ssl.cert.subject.cn:example.com\"","explanation":"Prints only the chosen fields."},{"id":18,"category":"Searching","command":"shodan count \"<query>\"","example":"shodan count \"port:3389 country:US\"","explanation":"Number of results without spending credits on the data."},{"id":19,"category":"Searching","command":"shodan stats --facets <facet> \"<query>\"","example":"shodan stats --facets org,port \"hostname:example.com\"","explanation":"Top values for a facet — a fast attack-surface overview."},{"id":20,"category":"Searching","command":"shodan search \"hostname:<domain>\"","example":"shodan search \"hostname:example.com\"","explanation":"Hosts whose reverse DNS or certificates match a domain."},{"id":21,"category":"Searching","command":"shodan search \"net:<cidr>\"","example":"shodan search \"net:203.0.113.0/24\"","explanation":"Everything Shodan has seen in a network range."},{"id":22,"category":"Searching","command":"shodan search \"http.title:\\\"<title>\\\"\"","example":"shodan search \"http.title:\\\"Grafana\\\"\"","explanation":"Finds web apps by page title."},{"id":23,"category":"Searching","command":"shodan search \"vuln:<cve>\"","example":"shodan search \"vuln:CVE-2021-44228 org:\\\"Example Corp\\\"\"","explanation":"Hosts flagged as vulnerable to a CVE (needs a qualifying plan)."},{"id":3,"category":"Hosts and data","command":"shodan host <ip>","example":"shodan host 203.0.113.10","explanation":"Every service, banner, location and known vulnerability for one IP."},{"id":24,"category":"Hosts and data","command":"shodan domain <domain>","example":"shodan domain example.com","explanation":"Subdomains and DNS records Shodan knows about."},{"id":25,"category":"Hosts and data","command":"shodan download <file> \"<query>\"","example":"shodan download results \"org:\\\"Example Corp\\\"\"","explanation":"Saves full results to a compressed JSON file."},{"id":26,"category":"Hosts and data","command":"shodan parse --fields ip_str,port <file>.json.gz","example":"shodan parse --fields ip_str,port results.json.gz","explanation":"Extracts fields from a download."},{"id":27,"category":"Hosts and data","command":"shodan convert <file>.json.gz <format>","example":"shodan convert results.json.gz csv","explanation":"Converts downloads to csv, kml, xlsx or images."},{"id":28,"category":"Scanning and alerts","command":"shodan scan submit <cidr>","example":"shodan scan submit 203.0.113.0/28","explanation":"Requests an on-demand scan of your own network (uses scan credits)."},{"id":29,"category":"Scanning and alerts","command":"shodan alert create \"<name>\" <cidr>","example":"shodan alert create \"Office\" 203.0.113.0/28","explanation":"Monitors a range and notifies you about new services."},{"id":30,"category":"Scanning and alerts","command":"shodan stream --ports <ports>","example":"shodan stream --ports 23,2323","explanation":"Real-time stream of new banners (higher plans)."}],"slug":"shodan","category":"osint","url":"https://terminal.rokibulroni.com/tool/osint/shodan","markdown":"https://terminal.rokibulroni.com/api/v1/tools/osint/shodan.md"}