Skip to content

reconFTW is a tool designed to perform automated recon on a target domain by running the best set of tools to perform scanning and finding out vulnerabilities

fix cdnprovider

six2dez181cc2e4c05f
diff --git a/reconftw.sh b/reconftw.sh
index a46d39b..d60f344 100755
--- a/reconftw.sh
+++ b/reconftw.sh
@@ -1057,7 +1057,8 @@ function portscan(){
function cdnprovider(){
if { [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]; } && [ "$CDN_IP" = true ]; then
start_func ${FUNCNAME[0]} "CDN provider check"
- [ -s "$dir/hosts/ips.txt" ] && cat $dir/hosts/ips.txt | ipcdn -m all | anew -q $dir/hosts/cdn_providers.txt
+ [ -s "subdomains/subdomains_dnsregs.json" ] && cat subdomains/subdomains_dnsregs.json | jq -r 'try . | .a[]' | jq -r 'try . | .a[]' | grep -aEiv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | sort -u > .tmp/ips_cdn.txt
+ [ -s ".tmp/ips_cdn.txt" ] && cat .tmp/ips_cdn.txt | ipcdn -m all | anew -q $dir/hosts/cdn_providers.txt
end_func "Results are saved in hosts/cdn_providers.txt" ${FUNCNAME[0]}
else
if [ "$CDN_IP" = false ]; then