How christophetd/cloudflair works
CloudFlair is a command-line scanner for identifying likely exposed origin servers behind Cloudflare or CloudFront. The user supplies a domain and Censys credentials; the CLI hands the scan to the main workflow, which validates the domain and CDN, searches Censys for matching certificates and hosts, excludes CDN addresses, then compares candidate responses with the target homepage and can save likely origins. The excerpts show these orchestration calls and the CDN range lookups; unsampled behavior is not inferred.
Main entry points: cloudflair.py Scan workflow · cloudflare_utils.py Cloudflare detection · cloudfront_utils.py CloudFront detection · dns_utils.py Domain validation
Components 16
Entry and orchestration
- CLI options
cli.py - Scan workflow
cloudflair.py
Domain and CDN detection
- Domain validation
dns_utils.py - Cloudflare detection
cloudflare_utils.py - CloudFront detection
cloudfront_utils.py
Censys discovery
- Certificate search
censys_search.py - Host search
censys_search.py
Origin verification
- Response comparison
cloudflair.py
Other components
- Domain scanner user
- DNS resolver
- Cloudflare ranges
- CloudFront ranges
- Censys API
- Target website
- Candidate servers
- Origins output file
Connections 20
- Domain scanner user → CLI options: provides options
README.md - Scan workflow → CLI options: parses arguments
cloudflair.py - Scan workflow → Domain validation: validates domain
cloudflair.py - Domain validation → DNS resolver: queries A record
dns_utils.py - Scan workflow → Cloudflare detection: checks Cloudflare
cloudflair.py - Scan workflow → CloudFront detection: checks CloudFront
cloudflair.py - Cloudflare detection → DNS resolver: queries A record
cloudflare_utils.py - CloudFront detection → DNS resolver: queries A record
cloudfront_utils.py - Cloudflare detection → Cloudflare ranges: fetches ranges
cloudflare_utils.py - CloudFront detection → CloudFront ranges: fetches ranges
cloudfront_utils.py - Scan workflow → Certificate search: searches certificates
cloudflair.py - Scan workflow → Host search: searches hosts
cloudflair.py - Certificate search → Censys API: queries certificates
censys_search.py - Host search → Censys API: queries hosts
censys_search.py - Scan workflow → Cloudflare detection: filters addresses
cloudflair.py - Scan workflow → CloudFront detection: filters addresses
cloudflair.py - Scan workflow → Response comparison: tests candidates
cloudflair.py - Response comparison → Target website: retrieves homepage
cloudflair.py - Response comparison → Candidate servers: requests responses
cloudflair.py - Scan workflow → Origins output file: writes likely origins
cloudflair.py