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
Shell bug-bountybugbountybugbounty-tooldnshackingnucleiosintpenetration-testingpentestpentest-toolpentestingreconreconnaissancescannersecuritysecurity-toolssubdomainsubdomain-enumerationvulnerabilities
Improved dns regs
six2dez8a5d3bdc62ce
diff --git a/reconftw.sh b/reconftw.shindex 632e9bb..5e8d857 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -1170,28 +1170,26 @@ function sub_dns() {if [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; thenstart_subfunc "${FUNCNAME[0]}" "Running: DNS Subdomain Enumeration and PTR search"- if [[ $AXIOM != true ]]; then- if [[ -s "subdomains/subdomains.txt" ]]; then- dnsx -r "$resolvers_trusted" -recon -silent -retry 3 -json \- -o "subdomains/subdomains_dnsregs.json" <"subdomains/subdomains.txt" 2>>"$LOGFILE" >/dev/null- fi-- if [[ -s "subdomains/subdomains_dnsregs.json" ]]; then- # Extract various DNS records and process them- jq -r --arg domain "$domain" '.. | strings | select(test("\\." + $domain + "$"))' <"subdomains/subdomains_dnsregs.json" |- grep -E '^([a-zA-Z0-9][-a-zA-Z0-9]*\.)+[a-zA-Z]{2,}$' |- sort -u | anew -q .tmp/subdomains_dns.txt-- jq -r '.. | strings | select(test("^(\\d{1,3}\\.){3}\\d{1,3}$|^[0-9a-fA-F:]+$"))' <"subdomains/subdomains_dnsregs.json" |- sort -u | hakip2host | awk '{print $3}' | unfurl -u domains |- sed -e 's/^\*\.//' -e 's/\.$//' -e '/\./!d' | grep "\.$domain$" |- grep -E '^([a-zA-Z0-9][-a-zA-Z0-9]*\.)+[a-zA-Z]{2,}$' | sort -u |- anew -q .tmp/subdomains_dns.txt+ if [[ -s "subdomains/subdomains.txt" ]]; then+ dnsx -r "$resolvers_trusted" -recon -silent -retry 3 -json \+ -o "subdomains/subdomains_dnsregs.json" <"subdomains/subdomains.txt" 2>>"$LOGFILE" >/dev/null+ fi+ if [[ -s "subdomains/subdomains_dnsregs.json" ]]; then+ # Extract various DNS records and process them+ jq -r --arg domain "$domain" '.. | strings | select(test("\\." + $domain + "$"))' <"subdomains/subdomains_dnsregs.json" |+ grep -E '^([a-zA-Z0-9][-a-zA-Z0-9]*\.)+[a-zA-Z]{2,}$' |+ sort -u | anew -q .tmp/subdomains_dns.txt- jq -r 'select(.host) |"\(.host) - \((.a // [])[])", "\(.host) - \((.aaaa // [])[])"' <"subdomains/subdomains_dnsregs.json" |- grep -E ' - [0-9a-fA-F:.]+$' | sort -u | anew -q "subdomains/subdomains_ips.txt"- fi+ jq -r '.. | strings | select(test("^(\\d{1,3}\\.){3}\\d{1,3}$|^[0-9a-fA-F:]+$"))' <"subdomains/subdomains_dnsregs.json" |+ sort -u | hakip2host | awk '{print $3}' | unfurl -u domains |+ sed -e 's/^\*\.//' -e 's/\.$//' -e '/\./!d' | grep "\.$domain$" |+ grep -E '^([a-zA-Z0-9][-a-zA-Z0-9]*\.)+[a-zA-Z]{2,}$' | sort -u |+ anew -q .tmp/subdomains_dns.txt+ jq -r 'select(.host) |"\(.host) - \((.a // [])[])", "\(.host) - \((.aaaa // [])[])"' <"subdomains/subdomains_dnsregs.json" |+ grep -E ' - [0-9a-fA-F:.]+$' | sort -u | anew -q "subdomains/subdomains_ips.txt"+ fi+ if [[ $AXIOM != true ]]; thenif ! resolvers_update_quick_local; thenprintf "%b[!] Failed to update resolvers.%b\n" "$bred" "$reset"fi@@ -1204,27 +1202,6 @@ function sub_dns() {2>>"$LOGFILE" >/dev/nullfielse- if [[ -s "subdomains/subdomains.txt" ]]; then- axiom-scan "subdomains/subdomains.txt" -m dnsx -recon -retry 3 -json \- -o "subdomains/subdomains_dnsregs.json" "$AXIOM_EXTRA_ARGS" 2>>"$LOGFILE" >/dev/null- fi-- if [[ -s "subdomains/subdomains_dnsregs.json" ]]; then- # Extract various DNS records and process them- jq -r --arg domain "$domain" '.. | strings | select(test("\\." + $domain + "$"))' <"subdomains/subdomains_dnsregs.json" |- grep -E '^([a-zA-Z0-9][-a-zA-Z0-9]*\.)+[a-zA-Z]{2,}$' |- sort -u | anew -q .tmp/subdomains_dns.txt-- jq -r '.. | strings | select(test("^(\\d{1,3}\\.){3}\\d{1,3}$|^[0-9a-fA-F:]+$"))' <"subdomains/subdomains_dnsregs.json" |- sort -u | hakip2host | awk '{print $3}' | unfurl -u domains |- sed -e 's/^\*\.//' -e 's/\.$//' -e '/\./!d' | grep "\.$domain$" |- grep -E '^([a-zA-Z0-9][-a-zA-Z0-9]*\.)+[a-zA-Z]{2,}$' | sort -u |- anew -q .tmp/subdomains_dns.txt-- jq -r 'select(.host) |"\(.host) - \((.a // [])[])", "\(.host) - \((.aaaa // [])[])"' <"subdomains/subdomains_dnsregs.json" |- grep -E ' - [0-9a-fA-F:.]+$' | sort -u | anew -q "subdomains/subdomains_ips.txt"- fi-if ! resolvers_update_quick_axiom; thenprintf "%b[!] Failed to update resolvers.%b\n" "$bred" "$reset"fi