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
gowitness removed in favor of nuclei
six2dezea0f81cf8d95
diff --git a/README.md b/README.mdindex 416abe1..cc32320 100644--- a/README.md+++ b/README.md@@ -161,6 +161,9 @@ fuzzing_remote_list="https://raw.githubusercontent.com/six2dez/OneListForAll/maiproxy_url="http://127.0.0.1:8080/" # Proxy urlinstall_golang=true # Set it to false if you already have Golang configured and readyupgrade_tools=true+upgrade_before_running=false # Upgrade tools before running+#SPINNY_FRAMES=(. .. ... .... ..... " ...." " ..." " .." " ." " " )+SPINNY_DELAY=0.1#dir_output=/custom/output/path# Golang Vars (Comment or change on your own)@@ -197,6 +200,7 @@ EMAILS=true # Fetch emails from differents sitesDOMAIN_INFO=true # whois infoREVERSE_WHOIS=true # amass intel reverse whois info, takes some timeIP_INFO=true # Reverse IP search, geolocation and whois+API_LEAKS=true # Check for API leaksMETAFINDER_LIMIT=20 # Max 250# Subdomains@@ -205,7 +209,8 @@ RUNSUBFINDER=trueSUBDOMAINS_GENERAL=true # Enable or disable the whole Subdomains moduleSUBPASSIVE=true # Passive subdomains searchSUBCRT=true # crtsh search-SUBNOERROR=true # Check DNS NOERROR response and BF on them+CTR_LIMIT=999999 # Limit the number of results+SUBNOERROR=false # Check DNS NOERROR response and BF on themSUBANALYTICS=true # Google Analytics searchSUBBRUTE=true # DNS bruteforcingSUBSCRAPING=true # Subdomains extraction from web crawling@@ -213,7 +218,7 @@ SUBPERMUTE=true # DNS permutationsSUBREGEXPERMUTE=true # Permutations by regex analysisPERMUTATIONS_OPTION=gotator # The alternative is "ripgen" (faster, not deeper)GOTATOR_FLAGS=" -depth 1 -numbers 3 -mindup -adv -md" # Flags for gotator-SUBTAKEOVER=false # Check subdomain takeovers, false by default cuz nuclei already check this+SUBTAKEOVER=true # Check subdomain takeovers, false by default cuz nuclei already check thisSUB_RECURSIVE_PASSIVE=false # Uses a lot of API keys queriesDEEP_RECURSIVE_PASSIVE=10 # Number of top subdomains for recursionSUB_RECURSIVE_BRUTE=false # Needs big disk space and time to resolve@@ -240,8 +245,9 @@ CDN_IP=true # Check which IPs belongs to CDN# Web analysisWAF_DETECTION=true # Detect WAFsNUCLEICHECK=true # Enable or disable nuclei+NUCLEI_TEMPLATES_PATH="$HOME/nuclei-templates" # Set nuclei templates pathNUCLEI_SEVERITY="info,low,medium,high,critical" # Set templates criticity-NUCLEI_FLAGS=" -silent -t $HOME/nuclei-templates/ -retries 2" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"+NUCLEI_FLAGS=" -silent -t ${NUCLEI_TEMPLATES_PATH}/ -retries 2" # Additional nuclei extra flags, don't set the severity here but the exclusions like " -etags openssh"NUCLEI_FLAGS_JS=" -silent -tags exposure,token -severity info,low,medium,high,critical" # Additional nuclei extra flags for js secretsURL_CHECK=true # Enable or disable URL collectionURL_CHECK_PASSIVE=true # Search for urls, passive methods from Archive, OTX, CommonCrawl, etc@@ -277,6 +283,7 @@ PROTO_POLLUTION=true # Check for prototype pollution flawsSMUGGLING=true # Check for HTTP request smuggling flawsWEBCACHE=true # Check for Web Cache issuesBYPASSER4XX=true # Check for 4XX bypasses+FUZZPARAMS=true # Fuzz parameters values# Extra featuresNOTIFICATION=false # Notification for every function@@ -292,7 +299,6 @@ SENDZIPNOTIFY=false # Send to zip the results (over notify)PRESERVE=true # set to true to avoid deleting the .called_fn files on really large scansFFUF_FLAGS=" -mc all -fc 404 -ach -sf -of json" # Ffuf flagsHTTPX_FLAGS=" -follow-redirects -random-agent -status-code -silent -title -web-server -tech-detect -location -content-length" # Httpx flags for simple web probing-GOWITNESS_FLAGS=" --disable-logging --timeout 5"# HTTP optionsHEADER="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" # Default header@@ -311,7 +317,6 @@ PUREDNS_PUBLIC_LIMIT=0 # Set between 2000 - 10000 if your router blows up, 0 meaPUREDNS_TRUSTED_LIMIT=400PUREDNS_WILDCARDTEST_LIMIT=30PUREDNS_WILDCARDBATCH_LIMIT=1500000-GOWITNESS_THREADS=20RESOLVE_DOMAINS_THREADS=150PPFUZZ_THREADS=30DNSVALIDATOR_THREADS=200@@ -507,7 +512,7 @@ reset='\033[0m'## Webs- Web Prober ([httpx](https://github.com/projectdiscovery/httpx))-- Web screenshoting ([webscreenshot](https://github.com/maaaaz/webscreenshot) or [gowitness](https://github.com/sensepost/gowitness))+- Web screenshoting ([nuclei](https://github.com/projectdiscovery/nuclei))- Web templates scanner ([nuclei](https://github.com/projectdiscovery/nuclei) and [nuclei geeknik](https://github.com/geeknik/the-nuclei-templates.git))- CMS Scanner ([CMSeeK](https://github.com/Tuhinshubhra/CMSeeK))- Url extraction ([gau](https://github.com/lc/gau),[waymore](https://github.com/xnl-h4ck3r/waymore), [katana](https://github.com/projectdiscovery/katana), [github-endpoints](https://gist.github.com/six2dez/d1d516b606557526e9a78d7dd49cacd3) and [JSA](https://github.com/w9w/JSA))diff --git a/install.sh b/install.shindex 3fbaf68..897278c 100755--- a/install.sh+++ b/install.sh@@ -57,7 +57,6 @@ gotools["roboxtractor"]="go install -v github.com/Josue87/roboxtractor@latest"gotools["mapcidr"]="go install -v github.com/projectdiscovery/mapcidr/cmd/mapcidr@latest"gotools["cdncheck"]="go install -v github.com/projectdiscovery/cdncheck/cmd/cdncheck@latest"gotools["dnstake"]="go install -v github.com/pwnesia/dnstake/cmd/dnstake@latest"-gotools["gowitness"]="go install -v github.com/sensepost/gowitness@latest"gotools["tlsx"]="go install -v github.com/projectdiscovery/tlsx/cmd/tlsx@latest"gotools["gitdorks_go"]="go install -v github.com/damit5/gitdorks_go@latest"gotools["smap"]="go install -v github.com/s0md3v/smap/cmd/smap@latest"diff --git a/reconftw.cfg b/reconftw.cfgindex bddb121..50a2174 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -153,7 +153,6 @@ SENDZIPNOTIFY=false # Send to zip the results (over notify)PRESERVE=true # set to true to avoid deleting the .called_fn files on really large scansFFUF_FLAGS=" -mc all -fc 404 -ach -sf -of json" # Ffuf flagsHTTPX_FLAGS=" -follow-redirects -random-agent -status-code -silent -title -web-server -tech-detect -location -content-length" # Httpx flags for simple web probing-GOWITNESS_FLAGS=" --disable-logging --timeout 5"# HTTP optionsHEADER="User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0" # Default header@@ -172,7 +171,6 @@ PUREDNS_PUBLIC_LIMIT=0 # Set between 2000 - 10000 if your router blows up, 0 meaPUREDNS_TRUSTED_LIMIT=400PUREDNS_WILDCARDTEST_LIMIT=30PUREDNS_WILDCARDBATCH_LIMIT=1500000-GOWITNESS_THREADS=20RESOLVE_DOMAINS_THREADS=150PPFUZZ_THREADS=30DNSVALIDATOR_THREADS=200@@ -193,7 +191,6 @@ FFUF_MAXTIME=900 # SecondsHTTPX_TIMEOUT=10 # SecondsHTTPX_UNCOMMONPORTS_TIMEOUT=10 # SecondsPERMUTATIONS_LIMIT=21474836480 # Bytes, default is 20 GB-GOWITNESS_TIMEOUT_PER_SITE=20 # Seconds# listsfuzz_wordlist=${tools}/fuzz_wordlist.txtdiff --git a/reconftw.sh b/reconftw.shindex 9c04230..abee096 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -197,10 +197,6 @@ function tools_installed() {printf "${bred} [*] dnsvalidator [NO]${reset}\n"allinstalled=false}- command -v gowitness &>/dev/null || {- printf "${bred} [*] gowitness [NO]${reset}\n"- allinstalled=false- }command -v amass &>/dev/null || {printf "${bred} [*] Amass [NO]${reset}\n"allinstalled=false@@ -1150,12 +1146,12 @@ function subtakeover() {if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $SUBTAKEOVER == true ]]; thenstart_func ${FUNCNAME[0]} "Looking for possible subdomain and DNS takeover"touch .tmp/tko.txt- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txtif [[ $AXIOM != true ]]; thennuclei -update 2>>"$LOGFILE" >/dev/null- cat subdomains/subdomains.txt .tmp/webs_all.txt 2>/dev/null | nuclei -silent -nh -tags takeover -severity info,low,medium,high,critical -retries 3 -rl $NUCLEI_RATELIMIT -t ${NUCLEI_TEMPLATES_PATH} -o .tmp/tko.txt+ cat subdomains/subdomains.txt webs/webs_all.txt 2>/dev/null | nuclei -silent -nh -tags takeover -severity info,low,medium,high,critical -retries 3 -rl $NUCLEI_RATELIMIT -t ${NUCLEI_TEMPLATES_PATH} -o .tmp/tko.txtelse- cat subdomains/subdomains.txt .tmp/webs_all.txt 2>>"$LOGFILE" | sed '/^$/d' | anew -q .tmp/webs_subs.txt+ cat subdomains/subdomains.txt webs/webs_all.txt 2>>"$LOGFILE" | sed '/^$/d' | anew -q .tmp/webs_subs.txt[ -s ".tmp/webs_subs.txt" ] && axiom-scan .tmp/webs_subs.txt -m nuclei --nuclei-templates ${NUCLEI_TEMPLATES_PATH} -tags takeover -nh -severity info,low,medium,high,critical -retries 3 -rl $NUCLEI_RATELIMIT -t ${NUCLEI_TEMPLATES_PATH} -o .tmp/tko.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullfi@@ -1320,7 +1316,7 @@ function webprobe_simple() {[ -s "webs/web_full_info.txt" ] && cat webs/web_full_info.txt | jq -r 'try . |"\(.url) [\(.status_code)] [\(.title)] [\(.webserver)] \(.tech)"' | grep "$domain" | anew -q webs/web_full_info_plain.txt[ -s "$outOfScope_file" ] && deleteOutScoped $outOfScope_file .tmp/probed_tmp.txtNUMOFLINES=$(cat .tmp/probed_tmp.txt 2>>"$LOGFILE" | anew webs/webs.txt | sed '/^$/d' | wc -l)- cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt+ cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txtend_subfunc "${NUMOFLINES} new websites resolved" ${FUNCNAME[0]}if [[ $PROXY == true ]] && [[ -n $proxy_url ]] && [[ $(cat webs/webs.txt | wc -l) -le $DEEP_LIMIT2 ]]; thennotification "Sending websites to proxy" info@@ -1351,7 +1347,7 @@ function webprobe_full() {fififi- [ -s ".tmp/web_full_info_uncommon.txt" ] && cat .tmp/web_full_info_uncommon.txt | jq -r 'try .url' 2>/dev/null | grep "$domain" | grep -E '^((http|https):\/\/)?([a-zA-Z0-9]([a-zA-Z0-9\-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{1,}(\/.*)?$' | sed "s/*.//" | anew -q .tmp/probed_uncommon_ports_tmp.txt+ [ -s ".tmp/web_full_info_uncommon.txt" ] && cat .tmp/web_full_info_uncommon.txt | jq -r 'try .url' 2>/dev/null | grep "$domain" | grep -E '^((http|https):\/\/)?([a-zA-Z0-9]([a-zA-Z0-9\-]*[a-zA-Z0-9])?\.)+[a-zA-Z]{1,}(\/.*)?' | sed "s/*.//" | anew -q .tmp/probed_uncommon_ports_tmp.txt[ -s ".tmp/web_full_info_uncommon.txt" ] && cat .tmp/web_full_info_uncommon.txt | jq -r 'try . |"\(.url) [\(.status_code)] [\(.title)] [\(.webserver)] \(.tech)"' | anew -q webs/web_full_info_uncommon_plain.txtif [[ -s ".tmp/web_full_info_uncommon.txt" ]]; thenif [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9] ]]; then@@ -1363,7 +1359,7 @@ function webprobe_full() {NUMOFLINES=$(cat .tmp/probed_uncommon_ports_tmp.txt 2>>"$LOGFILE" | anew webs/webs_uncommon_ports.txt | sed '/^$/d' | wc -l)notification "Uncommon web ports: ${NUMOFLINES} new websites" good[ -s "webs/webs_uncommon_ports.txt" ] && cat webs/webs_uncommon_ports.txt- cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt+ cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txtend_func "Results are saved in $domain/webs/webs_uncommon_ports.txt" ${FUNCNAME[0]}if [[ $PROXY == true ]] && [[ -n $proxy_url ]] && [[ $(cat webs/webs_uncommon_ports.txt | wc -l) -le $DEEP_LIMIT2 ]]; thennotification "Sending websites with uncommon ports to proxy" info@@ -1383,15 +1379,12 @@ function screenshot() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $WEBSCREENSHOT == true ]]; thenstart_func ${FUNCNAME[0]} "Web Screenshots"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt-- num_lines=$(wc -l <.tmp/webs_all.txt)- dynamic_gowitness_timeout=$(expr $num_lines \* $GOWITNESS_TIMEOUT_PER_SITE)+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txtif [[ $AXIOM != true ]]; then- [ -s ".tmp/webs_all.txt" ] && timeout -k 1m ${dynamic_gowitness_timeout}s gowitness file -f .tmp/webs_all.txt -t $GOWITNESS_THREADS $GOWITNESS_FLAGS 2>>"$LOGFILE"+ [ -s "webs/webs_all.txt" ] && nuclei -headless -id screenshot -V dir='screenshots' file -f webs/webs_all.txt 2>>"$LOGFILE"else- timeout -k 1m ${dynamic_gowitness_timeout}s axiom-scan .tmp/webs_all.txt -m gowitness -t $GOWITNESS_THREADS $GOWITNESS_FLAGS -o screenshots $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null+ [ -s "webs/webs_all.txt" ] && axiom-scan webs/webs_all.txt -m nuclei-screenshots -o screenshots $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullfiend_func "Results are saved in $domain/screenshots folder" ${FUNCNAME[0]}else@@ -1408,11 +1401,11 @@ function virtualhosts() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $VIRTUALHOSTS == true ]]; thenstart_func ${FUNCNAME[0]} "Virtual Hosts dicovery"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ -s ".tmp/webs_all.txt" ]]; then+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ -s "webs/webs_all.txt" ]]; thenmkdir -p $dir/virtualhosts $dir/.tmp/virtualhosts- interlace -tL .tmp/webs_all.txt -threads ${INTERLACE_THREADS} -c "ffuf -ac -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -H \"Host: FUZZ._cleantarget_\" -w ${fuzz_wordlist} -maxtime ${FFUF_MAXTIME} -u _target_ -of json -o _output_/_cleantarget_.json" -o $dir/.tmp/virtualhosts 2>>"$LOGFILE" >/dev/null- for sub in $(cat .tmp/webs_all.txt); do+ interlace -tL webs/webs_all.txt -threads ${INTERLACE_THREADS} -c "ffuf -ac -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -H \"Host: FUZZ._cleantarget_\" -w ${fuzz_wordlist} -maxtime ${FFUF_MAXTIME} -u _target_ -of json -o _output_/_cleantarget_.json" -o $dir/.tmp/virtualhosts 2>>"$LOGFILE" >/dev/null+ for sub in $(cat webs/webs_all.txt); dosub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')[ -s "$dir/.tmp/virtualhosts/${sub_out}.json" ] && cat $dir/.tmp/virtualhosts/${sub_out}.json | jq -r 'try .results[] | "\(.status) \(.length) \(.url)"' | sort | anew -q $dir/virtualhosts/${sub_out}.txtdone@@ -1561,12 +1554,12 @@ function waf_checks() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $WAF_DETECTION == true ]]; thenstart_func ${FUNCNAME[0]} "Website's WAF detection"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ -s ".tmp/webs_all.txt" ]]; then+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ -s "webs/webs_all.txt" ]]; thenif [[ $AXIOM != true ]]; then- wafw00f -i .tmp/webs_all.txt -o .tmp/wafs.txt 2>>"$LOGFILE" >/dev/null+ wafw00f -i webs/webs_all.txt -o .tmp/wafs.txt 2>>"$LOGFILE" >/dev/nullelse- axiom-scan .tmp/webs_all.txt -m wafw00f -o .tmp/wafs.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null+ axiom-scan webs/webs_all.txt -m wafw00f -o .tmp/wafs.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullfiif [[ -s ".tmp/wafs.txt" ]]; thencat .tmp/wafs.txt | sed -e 's/^[ \t]*//' -e 's/ \+ /\t/g' -e '/(None)/d' | tr -s "\t" ";" >webs/webs_wafs.txt@@ -1595,8 +1588,8 @@ function nuclei_check() {start_func ${FUNCNAME[0]} "Templates based web scanner"nuclei -update 2>>"$LOGFILE" >/dev/nullmkdir -p nuclei_output- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- [ ! -s ".tmp/webs_subs.txt" ] && cat subdomains/subdomains.txt .tmp/webs_all.txt 2>>"$LOGFILE" | anew -q .tmp/webs_subs.txt+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ [ ! -s ".tmp/webs_subs.txt" ] && cat subdomains/subdomains.txt webs/webs_all.txt 2>>"$LOGFILE" | anew -q .tmp/webs_subs.txtif [[ $AXIOM != true ]]; then # avoid globbing (expansion of *).IFS=',' read -ra severity_array <<<"$NUCLEI_SEVERITY"for crit in "${severity_array[@]}"; do@@ -1630,12 +1623,12 @@ function fuzz() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $FUZZ == true ]]; thenstart_func ${FUNCNAME[0]} "Web directory fuzzing"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ -s ".tmp/webs_all.txt" ]]; then+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ -s "webs/webs_all.txt" ]]; thenmkdir -p $dir/fuzzing $dir/.tmp/fuzzingif [[ $AXIOM != true ]]; then- interlace -tL .tmp/webs_all.txt -threads ${INTERLACE_THREADS} -c "ffuf ${FFUF_FLAGS} -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -w ${fuzz_wordlist} -maxtime ${FFUF_MAXTIME} -u _target_/FUZZ -o _output_/_cleantarget_.json" -o $dir/.tmp/fuzzing 2>>"$LOGFILE" >/dev/null- for sub in $(cat .tmp/webs_all.txt); do+ interlace -tL webs/webs_all.txt -threads ${INTERLACE_THREADS} -c "ffuf ${FFUF_FLAGS} -t ${FFUF_THREADS} -rate ${FFUF_RATELIMIT} -H \"${HEADER}\" -w ${fuzz_wordlist} -maxtime ${FFUF_MAXTIME} -u _target_/FUZZ -o _output_/_cleantarget_.json" -o $dir/.tmp/fuzzing 2>>"$LOGFILE" >/dev/null+ for sub in $(cat webs/webs_all.txt); dosub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')[ -s "$dir/.tmp/fuzzing/${sub_out}.json" ] && cat $dir/.tmp/fuzzing/${sub_out}.json | jq -r 'try .results[] | "\(.status) \(.length) \(.url)"' | sort -k1 | anew -q $dir/fuzzing/${sub_out}.txtdone@@ -1644,8 +1637,8 @@ function fuzz() {axiom-exec "mkdir -p /home/op/lists/seclists/Discovery/Web-Content/" &>/dev/nullaxiom-exec "wget -q -O - ${fuzzing_remote_list} > /home/op/lists/fuzz_wordlist.txt" &>/dev/nullaxiom-exec "wget -q -O - ${fuzzing_remote_list} > /home/op/lists/seclists/Discovery/Web-Content/big.txt" &>/dev/null- axiom-scan .tmp/webs_all.txt -m ffuf_base -H "${HEADER}" $FFUF_FLAGS -s -maxtime $FFUF_MAXTIME -o $dir/.tmp/ffuf-content.json $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null- for sub in $(cat .tmp/webs_all.txt); do+ axiom-scan webs/webs_all.txt -m ffuf_base -H "${HEADER}" $FFUF_FLAGS -s -maxtime $FFUF_MAXTIME -o $dir/.tmp/ffuf-content.json $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null+ for sub in $(cat webs/webs_all.txt); dosub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')[ -s "$dir/.tmp/ffuf-content.json" ] && cat .tmp/ffuf-content.json | jq -r 'try .results[] | "\(.status) \(.length) \(.url)"' | grep $sub | sort -k1 | anew -q fuzzing/${sub_out}.txtdone@@ -1670,9 +1663,9 @@ function cms_scanner() {if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $CMS_SCANNER == true ]]; thenstart_func ${FUNCNAME[0]} "CMS Scanner"mkdir -p $dir/cms && rm -rf $dir/cms/*- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ -s ".tmp/webs_all.txt" ]]; then- tr '\n' ',' <.tmp/webs_all.txt >.tmp/cms.txt 2>>"$LOGFILE"+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ -s "webs/webs_all.txt" ]]; then+ tr '\n' ',' <webs/webs_all.txt >.tmp/cms.txt 2>>"$LOGFILE"timeout -k 1m ${CMSSCAN_TIMEOUT}s python3 ${tools}/CMSeeK/cmseek.py -l .tmp/cms.txt --batch -r &>>"$LOGFILE"exit_status=$?if [[ ${exit_status} -eq 125 ]]; then@@ -1684,7 +1677,7 @@ function cms_scanner() {end_func "ERROR cmseek.py - investigate manually for $dir" ${FUNCNAME[0]}returnfi # otherwise Assume we have a successfully exited cmseek- for sub in $(cat .tmp/webs_all.txt); do+ for sub in $(cat webs/webs_all.txt); dosub_out=$(echo $sub | sed -e 's|^[^/]*//||' -e 's|/.*$||')cms_id=$(cat ${tools}/CMSeeK/Result/${sub_out}/cms.json 2>/dev/null | jq -r 'try .cms_id')if [[ -z $cms_id ]]; then@@ -1712,51 +1705,51 @@ function urlchecks() {if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $URL_CHECK == true ]]; thenstart_func ${FUNCNAME[0]} "URL Extraction"mkdir -p js- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ -s ".tmp/webs_all.txt" ]]; then+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ -s "webs/webs_all.txt" ]]; thenif [[ $AXIOM != true ]]; thenif [[ $URL_CHECK_PASSIVE == true ]]; thenif [[ $DEEP == true ]]; then- cat .tmp/webs_all.txt | unfurl -u domains >.tmp/waymore_input.txt+ cat webs/webs_all.txt | unfurl -u domains >.tmp/waymore_input.txtpython3 ${tools}/waymore/waymore.py -i .tmp/waymore_input.txt -mode U -f -oU .tmp/url_extract_tmp.txt 2>>"$LOGFILE" >/dev/nullelse- cat .tmp/webs_all.txt | gau --threads $GAU_THREADS | anew -q .tmp/url_extract_tmp.txt+ cat webs/webs_all.txt | gau --threads $GAU_THREADS | anew -q .tmp/url_extract_tmp.txtfiif [[ -s ${GITHUB_TOKENS} ]]; thengithub-endpoints -q -k -d $domain -t ${GITHUB_TOKENS} -o .tmp/github-endpoints.txt 2>>"$LOGFILE" >/dev/null[ -s ".tmp/github-endpoints.txt" ] && cat .tmp/github-endpoints.txt | anew -q .tmp/url_extract_tmp.txtfifi- diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt 2>>"$LOGFILE") <(sort -u .tmp/webs_all.txt 2>>"$LOGFILE") | wc -l)+ diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt 2>>"$LOGFILE") <(sort -u webs/webs_all.txt 2>>"$LOGFILE") | wc -l)if [[ $diff_webs != "0" ]] || [[ ! -s ".tmp/katana.txt" ]]; thenif [[ $URL_CHECK_ACTIVE == true ]]; thenif [[ $DEEP == true ]]; then- katana -silent -list .tmp/webs_all.txt -jc -kf all -c $KATANA_THREADS -d 3 -fs rdn -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ katana -silent -list webs/webs_all.txt -jc -kf all -c $KATANA_THREADS -d 3 -fs rdn -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/nullelse- katana -silent -list .tmp/webs_all.txt -jc -kf all -c $KATANA_THREADS -d 2 -fs rdn -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ katana -silent -list webs/webs_all.txt -jc -kf all -c $KATANA_THREADS -d 2 -fs rdn -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/nullfififielseif [[ $URL_CHECK_PASSIVE == true ]]; thenif [[ $DEEP == true ]]; then- cat .tmp/webs_all.txt | unfurl -u domains >.tmp/waymore_input.txt+ cat webs/webs_all.txt | unfurl -u domains >.tmp/waymore_input.txtaxiom-scan .tmp/waymore_input.txt -m waymore -o .tmp/url_extract_tmp.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullelse- axiom-scan .tmp/webs_all.txt -m gau -o .tmp/url_extract_tmp.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null+ axiom-scan webs/webs_all.txt -m gau -o .tmp/url_extract_tmp.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullfiif [[ -s ${GITHUB_TOKENS} ]]; thengithub-endpoints -q -k -d $domain -t ${GITHUB_TOKENS} -o .tmp/github-endpoints.txt 2>>"$LOGFILE" >/dev/null[ -s ".tmp/github-endpoints.txt" ] && cat .tmp/github-endpoints.txt | anew -q .tmp/url_extract_tmp.txtfifi- diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt) <(sort -u .tmp/webs_all.txt) | wc -l)+ diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt) <(sort -u webs/webs_all.txt) | wc -l)if [[ $diff_webs != "0" ]] || [[ ! -s ".tmp/katana.txt" ]]; thenif [[ $URL_CHECK_ACTIVE == true ]]; thenif [[ $DEEP == true ]]; then- axiom-scan .tmp/webs_all.txt -m katana -jc -kf all -d 3 -fs rdn -fs rdn -o .tmp/katana.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null+ axiom-scan webs/webs_all.txt -m katana -jc -kf all -d 3 -fs rdn -fs rdn -o .tmp/katana.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullelse- axiom-scan .tmp/webs_all.txt -m katana -jc -kf all -d 2 -fs rdn -fs rdn -o .tmp/katana.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null+ axiom-scan webs/webs_all.txt -m katana -jc -kf all -d 2 -fs rdn -fs rdn -o .tmp/katana.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullfififi@@ -1923,9 +1916,9 @@ function wordlist_gen_roboxtractor() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $ROBOTSWORDLIST == true ]]; thenstart_func ${FUNCNAME[0]} "Robots wordlist generation"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ -s ".tmp/webs_all.txt" ]]; then- cat .tmp/webs_all.txt | roboxtractor -m 1 -wb 2>/dev/null | anew -q webs/robots_wordlist.txt+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ -s "webs/webs_all.txt" ]]; then+ cat webs/webs_all.txt | roboxtractor -m 1 -wb 2>/dev/null | anew -q webs/robots_wordlist.txtfiend_func "Results are saved in $domain/webs/robots_wordlist.txt" ${FUNCNAME[0]}else@@ -1963,22 +1956,22 @@ function brokenLinks() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $BROKENLINKS == true ]]; thenstart_func ${FUNCNAME[0]} "Broken links checks"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txtif [[ $AXIOM != true ]]; thenif [[ ! -s ".tmp/katana.txt" ]]; thenif [[ $DEEP == true ]]; then- [ -s ".tmp/webs_all.txt" ] && katana -silent -list .tmp/webs_all.txt -jc -kf all -c $KATANA_THREADS -d 3 -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ [ -s "webs/webs_all.txt" ] && katana -silent -list webs/webs_all.txt -jc -kf all -c $KATANA_THREADS -d 3 -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/nullelse- [ -s ".tmp/webs_all.txt" ] && katana -silent -list .tmp/webs_all.txt -jc -kf all -c $KATANA_THREADS -d 2 -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/null+ [ -s "webs/webs_all.txt" ] && katana -silent -list webs/webs_all.txt -jc -kf all -c $KATANA_THREADS -d 2 -o .tmp/katana.txt 2>>"$LOGFILE" >/dev/nullfifi[ -s ".tmp/katana.txt" ] && sed -i '/^.\{2048\}./d' .tmp/katana.txtelseif [[ ! -s ".tmp/katana.txt" ]]; thenif [[ $DEEP == true ]]; then- [ -s ".tmp/webs_all.txt" ] && axiom-scan .tmp/webs_all.txt -m katana -jc -kf all -d 3 -o .tmp/katana.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null+ [ -s "webs/webs_all.txt" ] && axiom-scan webs/webs_all.txt -m katana -jc -kf all -d 3 -o .tmp/katana.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullelse- [ -s ".tmp/webs_all.txt" ] && axiom-scan .tmp/webs_all.txt -m katana -jc -kf all -d 2 -o .tmp/katana.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/null+ [ -s "webs/webs_all.txt" ] && axiom-scan webs/webs_all.txt -m katana -jc -kf all -d 2 -o .tmp/katana.txt $AXIOM_EXTRA_ARGS 2>>"$LOGFILE" >/dev/nullfi[ -s ".tmp/katana.txt" ] && sed -i '/^.\{2048\}./d' .tmp/katana.txtfi@@ -2060,8 +2053,8 @@ function cors() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $CORS == true ]]; thenstart_func ${FUNCNAME[0]} "CORS Scan"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- [ -s ".tmp/webs_all.txt" ] && python3 ${tools}/Corsy/corsy.py -i .tmp/webs_all.txt -o vulns/cors.txt 2>>"$LOGFILE" >/dev/null+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ [ -s "webs/webs_all.txt" ] && python3 ${tools}/Corsy/corsy.py -i webs/webs_all.txt -o vulns/cors.txt 2>>"$LOGFILE" >/dev/nullend_func "Results are saved in vulns/cors.txt" ${FUNCNAME[0]}elseif [[ $CORS == false ]]; then@@ -2142,9 +2135,9 @@ function crlf_checks() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $CRLF_CHECKS == true ]]; thenstart_func ${FUNCNAME[0]} "CRLF checks"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ $DEEP == true ]] || [[ $(cat .tmp/webs_all.txt | wc -l) -le $DEEP_LIMIT ]]; then- crlfuzz -l .tmp/webs_all.txt -o vulns/crlf.txt 2>>"$LOGFILE" >/dev/null+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ $DEEP == true ]] || [[ $(cat webs/webs_all.txt | wc -l) -le $DEEP_LIMIT ]]; then+ crlfuzz -l webs/webs_all.txt -o vulns/crlf.txt 2>>"$LOGFILE" >/dev/nullend_func "Results are saved in vulns/crlf.txt" ${FUNCNAME[0]}elseend_func "Skipping CRLF: Too many URLs to test, try with --deep flag" ${FUNCNAME[0]}@@ -2359,13 +2352,13 @@ function smuggling() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $SMUGGLING == true ]]; thenstart_func ${FUNCNAME[0]} "HTTP Request Smuggling checks"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ $DEEP == true ]] || [[ $(cat .tmp/webs_all.txt | wc -l) -le $DEEP_LIMIT ]]; then+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ $DEEP == true ]] || [[ $(cat webs/webs_all.txt | wc -l) -le $DEEP_LIMIT ]]; thenpushd "${tools}/smuggler" >/dev/null || {echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"exit 1}- cat $dir/.tmp/webs_all.txt | python3 smuggler.py -q --no-color 2>/dev/null | anew -q $dir/.tmp/smuggling.txt+ cat $dir/webs/webs_all.txt | python3 smuggler.py -q --no-color 2>/dev/null | anew -q $dir/.tmp/smuggling.txtmkdir -p $dir/vulns/smuggling/find payloads -type f ! -name "README*" -exec mv {} $dir/vulns/smuggling/ \;popd >/dev/null || {@@ -2391,14 +2384,14 @@ function webcache() {spinny::startif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $WEBCACHE == true ]]; thenstart_func ${FUNCNAME[0]} "Web Cache Poisoning checks"- [ ! -s ".tmp/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q .tmp/webs_all.txt- if [[ $DEEP == true ]] || [[ $(cat .tmp/webs_all.txt | wc -l) -le $DEEP_LIMIT ]]; then+ [ ! -s "webs/webs_all.txt" ] && cat webs/webs.txt webs/webs_uncommon_ports.txt 2>/dev/null | anew -q webs/webs_all.txt+ if [[ $DEEP == true ]] || [[ $(cat webs/webs_all.txt | wc -l) -le $DEEP_LIMIT ]]; thenpushd "${tools}/Web-Cache-Vulnerability-Scanner" >/dev/null || {echo "Failed to cd directory in ${FUNCNAME[0]} @ line ${LINENO}"exit 1}- Web-Cache-Vulnerability-Scanner -u file:$dir/.tmp/webs_all.txt -v 0 2>/dev/null | anew -q $dir/.tmp/webcache.txt+ Web-Cache-Vulnerability-Scanner -u file:$dir/webs/webs_all.txt -v 0 2>/dev/null | anew -q $dir/.tmp/webcache.txtpopd >/dev/null || {echo "Failed to popd in ${FUNCNAME[0]} @ line ${LINENO}"exit 1