How clayhax/shodanscope works
ShodanScope is a single-script passive inventory tool: a user supplies a scope file, the program parses and normalizes IPs, CIDRs, and FQDNs, prepares unique queries (resolving domains), searches Shodan’s existing index, deduplicates and attributes observations, then writes inventory reports. It does not scan hosts. The main routine’s calls and report output are visible in the excerpt; DNS and Shodan behavior are also documented in the README. Internal responsibilities share one source file, so the graph separates them by function rather than module.
Main entry points: shodanscope.py CLI orchestrator
Components 11
Inventory workflow
- CLI orchestrator
shodanscope.py - Scope parsing
shodanscope.py - Query preparation
shodanscope.py - Shodan search
shodanscope.py - Result processing
shodanscope.py - Inventory exports
shodanscope.py
External services
- DNS resolver
- Shodan API
Other components
- Operator
- Scope file
- Report files
Connections 11
- Operator → Scope file: provides scope
README.md - Operator → CLI orchestrator: runs
README.md - CLI orchestrator → Scope parsing: loads scope
shodanscope.py - Scope file → Scope parsing: supplies entries
README.md - CLI orchestrator → Query preparation: prepares queries
shodanscope.py - Query preparation → DNS resolver: resolves FQDNs
README.md - CLI orchestrator → Shodan search: searches queries
shodanscope.py - Shodan search → Shodan API: queries index
README.md - CLI orchestrator → Result processing: deduplicates, annotates
shodanscope.py - CLI orchestrator → Inventory exports: saves results
shodanscope.py - Inventory exports → Report files: writes reports
README.md