How s-rah/onionscan works
OnionScan investigates Tor hidden services for operators and researchers. The main workflow accepts onion targets, runs configured protocol checks and web crawling, extracts identity correlations, then emits human-readable or JSON reports. Researchers can also use the correlation-lab web interface to search and tag stored crawl relationships. The graph covers those documented capabilities; some subsystem links rely on imports or README descriptions because their implementation excerpts were not supplied.
Main entry points: main.go CLI entry · crawldb.go Crawl database · pipeline.go Scan pipeline · onionspider.go Web crawler
Components 18
Scanning
- CLI entry
main.go - Scan configuration
config/onionscan_config.go - Scan pipeline
onionscan/pipeline.go - Protocol scanners
protocol - Web protocol scan
protocol/http_scanner.go - Web crawler
spider/onionspider.go - Page parser
spider/pageparser.go
Analysis
- Identity extraction
deanonymization - Bitcoin address check
deanonymization/check_bitcoin_addresses.go - Scan report model
report/onionscanreport.go - Anonymity findings
report/anonymity_report.go - Risk summary
report/simple_report.go
Persistence
- Crawl database
crawldb/crawldb.go - Page records
model/page.go
Outputs
- Correlation lab
webui/webui.go - JSON report writer
onionscan/steps/jsonreportwriter.go - Simple report writer
onionscan/steps/simplereportwriter.go
Other components
- Operator / researcher
Connections 22
- Operator / researcher → CLI entry: starts scan
- CLI entry → Scan configuration: configures
config/onionscan_config.go - CLI entry → Scan pipeline: runs targets
main.go - CLI entry → Identity extraction: adds analysis
main.go - CLI entry → Correlation lab: starts interface
main.go - Scan pipeline → Protocol scanners: runs scan step
- Scan pipeline → Scan report model: creates report
onionscan/pipeline.go - Protocol scanners → Web protocol scan: dispatches web scan
- Web protocol scan → Web crawler: uses crawler
protocol/http_scanner.go - Web crawler → Page parser: parses pages
spider/onionspider.go - Web crawler → Crawl database: stores crawls
spider/onionspider.go - Page parser → Page records: builds page
spider/pageparser.go - Identity extraction → Bitcoin address check: includes check
- Bitcoin address check → Crawl database: reads crawls
deanonymization/check_bitcoin_addresses.go - Bitcoin address check → Anonymity findings: records findings
deanonymization/check_bitcoin_addresses.go - Scan configuration → Crawl database: opens database
config/onionscan_config.go - Correlation lab → Crawl database: searches relationships
webui/webui.go - Scan report model → Risk summary: provides summary
- CLI entry → JSON report writer: selects output
main.go - CLI entry → Simple report writer: selects output
main.go - Simple report writer → Scan report model: formats report
onionscan/steps/simplereportwriter.go - Operator / researcher → Correlation lab: searches and tags