2019-12-03 08:48:12 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2019-12-07 18:45:48 +01:00
|
|
|
function log() {
|
|
|
|
echo -e "\033[33m$@\033[0m"
|
|
|
|
}
|
|
|
|
|
2019-12-03 08:48:12 +01:00
|
|
|
# Resolve the CNAME chain of all the known subdomains for later analysis
|
2019-12-07 18:45:48 +01:00
|
|
|
log "Compiling subdomain lists..."
|
2019-12-03 17:33:46 +01:00
|
|
|
pv subdomains/*.list | sort -u > temp/all_subdomains.list
|
2019-12-03 15:35:21 +01:00
|
|
|
# Sort by last character to utilize the DNS server caching mechanism
|
2019-12-03 17:33:46 +01:00
|
|
|
pv temp/all_subdomains.list | rev | sort | rev > temp/all_subdomains_reversort.list
|
2019-12-03 15:35:21 +01:00
|
|
|
./resolve_subdomains.py --input temp/all_subdomains_reversort.list --output temp/all_resolved.csv
|
2019-12-03 08:48:12 +01:00
|
|
|
sort -u temp/all_resolved.csv > temp/all_resolved_sorted.csv
|
|
|
|
|