From 608f55034f795e09833d28765b0bc4d80bf9790d Mon Sep 17 00:00:00 2001 From: six2dez Date: Sun, 14 Mar 2021 02:01:10 +0100 Subject: [PATCH 1/7] Verbose installer and one more port to uncommon web --- install.sh | 8 ++++---- reconftw.sh | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index ce15a584..80fd918f 100755 --- a/install.sh +++ b/install.sh @@ -46,7 +46,7 @@ if [[ $(eval type go $DEBUG_ERROR | grep -o 'go is') == "go is" ]] then printf "${bgreen} Golang is already installed ${reset}\n\n" else - printf "${bgreen} Installing Golang ${reset}\n" + printf "${yellow} Running: Installing Golang ${reset}\n\n" if [ "True" = "$IS_ARM" ]; then eval wget https://dl.google.com/go/$(curl https://golang.org/VERSION?m=text).linux-armv6l.tar.gz $DEBUG_STD eval $SUDO tar -C /usr/local -xzf go$LATEST_GO.linux-armv6l.tar.gz $DEBUG_STD @@ -81,14 +81,14 @@ export GOPATH=\$HOME/go export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH EOF fi -# printf "${yellow} Golang installed! Open a new terminal and run again this script ${reset}\n" +printf "${bgreen} Golang installed${reset}\n" # exit fi [ -n "$GOPATH" ] || { printf "${bred} GOPATH env var not detected, add Golang env vars to your \$HOME/.bashrc or \$HOME/.zshrc:\n\n export GOROOT=/usr/local/go\n export GOPATH=\$HOME/go\n export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH\n\n"; exit 1; } [ -n "$GOROOT" ] || { printf "${bred} GOROOT env var not detected, add Golang env vars to your \$HOME/.bashrc or \$HOME/.zshrc:\n\n export GOROOT=/usr/local/go\n export GOPATH=\$HOME/go\n export PATH=\$GOPATH/bin:\$GOROOT/bin:\$PATH\n\n"; exit 1; } - +printf "${yellow} Running: Installing system packages ${reset}\n\n" if [ -f /etc/debian_version ]; then install_apt; elif [ -f /etc/redhat-release ]; then install_yum; elif [ -f /etc/arch-release ]; then install_pacman; @@ -96,7 +96,7 @@ elif [ -f /etc/os-release ]; then install_yum; #/etc/os-release fall in yum for fi printf "${bgreen} System packages installed${reset}\n\n" - +printf "${yellow} Running: Installing requirements ${reset}\n\n" if ! command -v phantomjs &> /dev/null then cd /opt diff --git a/reconftw.sh b/reconftw.sh index 3327e775..7bfe5bd8 100755 --- a/reconftw.sh +++ b/reconftw.sh @@ -482,7 +482,7 @@ function webprobe_full(){ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBEFULL" = true ] then start_func "Http probing non standard ports" - cat subdomains/subdomains.txt | httpx -ports 81,300,591,593,832,981,1010,1311,1099,2082,2095,2096,2480,3000,3128,3333,4243,4567,4711,4712,4993,5000,5104,5108,5280,5281,5601,5800,6543,7000,7001,7396,7474,8000,8001,8008,8014,8042,8060,8069,8080,8081,8083,8088,8090,8091,8095,8118,8123,8172,8181,8222,8243,8280,8281,8333,8337,8443,8500,8834,8880,8888,8983,9000,9001,9043,9060,9080,9090,9091,9200,9443,9502,9800,9981,10000,10250,11371,12443,15672,16080,17778,18091,18092,20720,32000,55672 -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt + cat subdomains/subdomains.txt | httpx -ports 81,300,591,593,832,981,1010,1311,1099,2082,2095,2096,2480,3000,3128,3333,4243,4567,4711,4712,4993,5000,5104,5108,5280,5281,5601,5800,6543,7000,7001,7396,7474,8000,8001,8008,8014,8042,8060,8069,8080,8081,8083,8088,8090,8091,8095,8118,8123,8172,8181,8222,8243,8280,8281,8333,8337,8443,8500,8834,8880,8888,8983,9000,9001,9043,9060,9080,9090,9091,9200,9443,9502,9800,9981,10000,10250,11371,12443,15672,16080,17778,18091,18092,20720,32000,55440,55672 -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt NUMOFLINES=$(eval cat .tmp/probed_uncommon_ports_tmp.txt $DEBUG_ERROR | anew webs/webs_uncommon_ports.txt | wc -l) notification "Uncommon web ports: ${NUMOFLINES} new websites in ${runtime}" good eval cat webs/webs_uncommon_ports.txt $DEBUG_ERROR From 039e6400f9edbed0d67e764a72248a675944b52e Mon Sep 17 00:00:00 2001 From: six2dez Date: Sun, 14 Mar 2021 03:03:42 +0100 Subject: [PATCH 2/7] Force include subdomain list, golang tools updater --- install.sh | 1 + reconftw.sh | 27 ++++++++++++++++++++------- update.sh | 17 ++++++++++++++++- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/install.sh b/install.sh index 80fd918f..fc7503a0 100755 --- a/install.sh +++ b/install.sh @@ -154,6 +154,7 @@ eval GO111MODULE=on go get -u -v github.com/lc/subjs $DEBUG_STD eval go get -v github.com/KathanP19/Gxss $DEBUG_STD eval git clone https://github.com/blechschmidt/massdns $dir/massdns $DEBUG_STD eval git clone https://github.com/s0md3v/Arjun $dir/Arjun $DEBUG_STD +eval go get -u github.com/rjeczalik/bin/cmd/gobin $DEBUG_STD printf "${bgreen} 50%% done${reset}\n\n" eval git clone https://github.com/devanshbatham/ParamSpider $dir/ParamSpider $DEBUG_STD eval git clone https://github.com/dark-warlord14/LinkFinder $dir/LinkFinder $DEBUG_STD diff --git a/reconftw.sh b/reconftw.sh index 7bfe5bd8..566762e6 100755 --- a/reconftw.sh +++ b/reconftw.sh @@ -45,23 +45,23 @@ function tools_installed(){ [ -f $tools/degoogle_hunter/degoogle_hunter.sh ] || { printf "${bred} [*] degoogle_hunter [NO]${reset}\n"; allinstalled=false;} [ -f $tools/getjswords.py ] || { printf "${bred} [*] getjswords [NO]${reset}\n"; allinstalled=false;} eval type -P arjun $DEBUG_STD || { printf "${bred} [*] Arjun [NO]${reset}\n"; allinstalled=false;} - eval type -P github-endpoints $DEBUG_STD || { printf "${bred} [*] github-endpoints [NO]${reset}\n"; allinstalled=false;} + eval type -P github-endpoints $DEBUG_STD || { printf "${bred} [*] github-endpoints [NO]${reset}\n"; allinstalled=false;} eval type -P gospider $DEBUG_STD || { printf "${bred} [*] gospider [NO]${reset}\n"; allinstalled=false;} eval type -P wafw00f $DEBUG_STD || { printf "${bred} [*] wafw00f [NO]${reset}\n"; allinstalled=false;} eval type -P subfinder $DEBUG_STD || { printf "${bred} [*] Subfinder [NO]${reset}\n"; allinstalled=false;} - eval type -P assetfinder $DEBUG_STD || { printf "${bred} [*] Assetfinder [NO]${reset}\n"; allinstalled=false;} + eval type -P assetfinder $DEBUG_STD || { printf "${bred} [*] Assetfinder [NO]${reset}\n"; allinstalled=false;} eval type -P gowitness $DEBUG_STD || { printf "${bred} [*] gowitness [NO]${reset}\n"; allinstalled=false;} eval type -P findomain $DEBUG_STD || { printf "${bred} [*] Findomain [NO]${reset}\n"; allinstalled=false;} eval type -P amass $DEBUG_STD || { printf "${bred} [*] Amass [NO]${reset}\n"; allinstalled=false;} eval type -P crobat $DEBUG_STD || { printf "${bred} [*] Crobat [NO]${reset}\n"; allinstalled=false;} - eval type -P waybackurls $DEBUG_STD || { printf "${bred} [*] Waybackurls [NO]${reset}\n"; allinstalled=false;} + eval type -P waybackurls $DEBUG_STD || { printf "${bred} [*] Waybackurls [NO]${reset}\n"; allinstalled=false;} eval type -P gau $DEBUG_STD || { printf "${bred} [*] Gau [NO]${reset}\n"; allinstalled=false;} eval type -P dnsx $DEBUG_STD || { printf "${bred} [*] dnsx [NO]${reset}\n"; allinstalled=false;} eval type -P shuffledns $DEBUG_STD || { printf "${bred} [*] ShuffleDns [NO]${reset}\n"; allinstalled=false;} eval type -P cf-check $DEBUG_STD || { printf "${bred} [*] Cf-check [NO]${reset}\n"; allinstalled=false;} eval type -P nuclei $DEBUG_STD || { printf "${bred} [*] Nuclei [NO]${reset}\n"; allinstalled=false;} [ -d ~/nuclei-templates ] || { printf "${bred} [*] Nuclei templates [NO]${reset}\n"; allinstalled=false;} - eval type -P gf $DEBUG_STD || { printf "${bred} [*] Gf [NO]${reset}\n"; allinstalled=false;} + eval type -P gf $DEBUG_STD || { printf "${bred} [*] Gf [NO]${reset}\n"; allinstalled=false;} eval type -P Gxss $DEBUG_STD || { printf "${bred} [*] Gxss [NO]${reset}\n"; allinstalled=false;} eval type -P subjs $DEBUG_STD || { printf "${bred} [*] subjs [NO]${reset}\n"; allinstalled=false;} eval type -P ffuf $DEBUG_STD || { printf "${bred} [*] ffuf [NO]${reset}\n"; allinstalled=false;} @@ -357,6 +357,10 @@ function sub_dns(){ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ] then start_subfunc "Running : Active Subdomain Enumeration" + if [ -s "${inScope_file}" ] + then + cat ${inScope_file} .tmp/inscope_subs.txt + fi cat .tmp/*_subs.txt | anew -q .tmp/subs_no_resolved.txt deleteOutScoped $outOfScope_file .tmp/subs_no_resolved.txt eval shuffledns -d $domain -list .tmp/subs_no_resolved.txt -r $resolvers -t $SHUFFLEDNS_THREADS -o .tmp/subdomains_tmp.txt $DEBUG_STD @@ -1400,13 +1404,14 @@ function subs_menu(){ } function help(){ - printf "\n Usage: $0 [-d domain.tld] [-m name] [-l list.txt] [-x oos.txt] [-r] [-s] " - printf "\n [-p] [-a] [-w] [-i] [-v] [-h] [--deep] [--fs] [-o OUTPUT]\n\n" + printf "\n Usage: $0 [-d domain.tld] [-m name] [-l list.txt] [-x oos.txt] [-i in.txt] " + printf "\n [-r] [-s] [-p] [-a] [-w] [-i] [-v] [-h] [--deep] [--fs] [-o OUTPUT]\n\n" printf " ${bblue}TARGET OPTIONS${reset}\n" printf " -d domain.tld Target domain\n" printf " -m company Target company name\n" printf " -l list.txt Targets list, one per line\n" printf " -x oos.txt Exclude subdomains list (Out Of Scope)\n" + printf " -i in.txt Include subdomains list\n" printf " \n" printf " ${bblue}MODE OPTIONS${reset}\n" printf " -r Recon - Full recon process (only recon without attacks)\n" @@ -1452,7 +1457,7 @@ then exit fi -while getopts ":hd:-:l:m:x:varspxwo:" opt; do +while getopts ":hd:-:l:m:x:i:varspxwo:" opt; do general=$@ if [[ $general == *"-v"* ]]; then unset DEBUG_STD @@ -1482,6 +1487,14 @@ while getopts ":hd:-:l:m:x:varspxwo:" opt; do exit fi ;; + i ) inScope_file=$OPTARG + isAsciiText $inScope_file + if [ "False" = "$IS_ASCII" ] + then + printf "\n\n${bred} Out of Scope file is not a text file${reset}\n\n" + exit + fi + ;; ## MODES diff --git a/update.sh b/update.sh index 7d1c5fc1..d555ea86 100755 --- a/update.sh +++ b/update.sh @@ -2,7 +2,6 @@ #@TODO: # - Update testssl.sh - # - Update Go packages bred='\033[1;31m' bblue='\033[1;34m' @@ -137,6 +136,22 @@ fi printf "${bblue}\n Updating Golang is finished ${reset}\n" printf "${bgreen}#######################################################################\n" +#Updating Golang Tools +printf "${bgreen}#######################################################################\n" +printf "${bblue} Updating Golang Tools \n" +eval gobin -u $DEBUG_STD +eval GO111MODULE=on go get -v github.com/OWASP/Amass/v3/... $DEBUG_STD +eval GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei $DEBUG_STD +eval GO111MODULE=on go get -v github.com/projectdiscovery/notify/cmd/notify $DEBUG_STD +eval GO111MODULE=on go get -v github.com/projectdiscovery/httpx/cmd/httpx $DEBUG_STD +eval GO111MODULE=on go get -v github.com/projectdiscovery/dnsx/cmd/dnsx $DEBUG_STD +eval GO111MODULE=on go get -v github.com/projectdiscovery/subfinder/v2/cmd/subfinder $DEBUG_STD +eval GO111MODULE=on go get -u -v github.com/lc/subjs $DEBUG_STD +eval GO111MODULE=on go get -v github.com/projectdiscovery/shuffledns/cmd/shuffledns $DEBUG_STD +eval GO111MODULE=on go get -v github.com/dwisiswant0/crlfuzz/cmd/crlfuzz $DEBUG_STD +printf "${bblue}\n Updating Golang Tools finished ${reset}\n" +printf "${bgreen}#######################################################################\n" + #stripping all Go binaries eval strip -s $HOME/go/bin/* $DEBUG_STD From 7045ee05be3919fcd8e2db36957707d9c90454ed Mon Sep 17 00:00:00 2001 From: six2dez Date: Mon, 15 Mar 2021 00:06:36 +0100 Subject: [PATCH 3/7] Added retries to httpx and some error checks --- reconftw.sh | 46 ++++++++++++++++++++++++++++++++-------------- 1 file changed, 32 insertions(+), 14 deletions(-) diff --git a/reconftw.sh b/reconftw.sh index 566762e6..adf13cb0 100755 --- a/reconftw.sh +++ b/reconftw.sh @@ -379,7 +379,7 @@ function sub_scraping(){ then start_subfunc "Running : Source code scraping subdomain search" touch .tmp/scrap_subs.txt - cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt + cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt gospider -S .tmp/probed_tmp.txt --js -t $GOSPIDER_THREADS -H "${HEADER}" --sitemap --robots -w -r | egrep -o 'https?://[^ ]+' | sed 's/]$//' | unfurl --unique domains | grep ".$domain$" | anew -q .tmp/scrap_subs.txt cat .tmp/scrap_subs.txt | eval shuffledns -d $domain -r $resolvers -t $SHUFFLEDNS_THREADS -o .tmp/scrap_subs_resolved.txt $DEBUG_STD NUMOFLINES=$(eval cat .tmp/scrap_subs_resolved.txt $DEBUG_ERROR | anew subdomains/subdomains.txt | wc -l) @@ -469,7 +469,7 @@ function webprobe_simple(){ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBESIMPLE" = true ] then start_subfunc "Running : Http probing" - cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt + cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt deleteOutScoped $outOfScope_file .tmp/probed_tmp.txt NUMOFLINES=$(eval cat .tmp/probed_tmp.txt $DEBUG_ERROR | anew webs/webs.txt | wc -l) end_subfunc "${NUMOFLINES} new websites resolved" ${FUNCNAME[0]} @@ -486,7 +486,7 @@ function webprobe_full(){ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$WEBPROBEFULL" = true ] then start_func "Http probing non standard ports" - cat subdomains/subdomains.txt | httpx -ports 81,300,591,593,832,981,1010,1311,1099,2082,2095,2096,2480,3000,3128,3333,4243,4567,4711,4712,4993,5000,5104,5108,5280,5281,5601,5800,6543,7000,7001,7396,7474,8000,8001,8008,8014,8042,8060,8069,8080,8081,8083,8088,8090,8091,8095,8118,8123,8172,8181,8222,8243,8280,8281,8333,8337,8443,8500,8834,8880,8888,8983,9000,9001,9043,9060,9080,9090,9091,9200,9443,9502,9800,9981,10000,10250,11371,12443,15672,16080,17778,18091,18092,20720,32000,55440,55672 -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt + cat subdomains/subdomains.txt | httpx -ports 81,300,591,593,832,981,1010,1311,1099,2082,2095,2096,2480,3000,3128,3333,4243,4567,4711,4712,4993,5000,5104,5108,5280,5281,5601,5800,6543,7000,7001,7396,7474,8000,8001,8008,8014,8042,8060,8069,8080,8081,8083,8088,8090,8091,8095,8118,8123,8172,8181,8222,8243,8280,8281,8333,8337,8443,8500,8834,8880,8888,8983,9000,9001,9043,9060,9080,9090,9091,9200,9443,9502,9800,9981,10000,10250,11371,12443,15672,16080,17778,18091,18092,20720,32000,55440,55672 -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_UNCOMMONPORTS_THREADS -timeout 10 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain" | anew -q .tmp/probed_uncommon_ports_tmp.txt NUMOFLINES=$(eval cat .tmp/probed_uncommon_ports_tmp.txt $DEBUG_ERROR | anew webs/webs_uncommon_ports.txt | wc -l) notification "Uncommon web ports: ${NUMOFLINES} new websites in ${runtime}" good eval cat webs/webs_uncommon_ports.txt $DEBUG_ERROR @@ -762,7 +762,7 @@ function url_gf(){ gf redirect webs/url_extract.txt | anew -q gf/redirect.txt && cat gf/ssrf.txt | anew -q gf/redirect.txt gf rce webs/url_extract.txt | anew -q gf/rce.txt gf potential webs/url_extract.txt | cut -d ':' -f3-5 |anew -q gf/potential.txt - cat webs/url_extract.txt | unfurl -u format %s://%d%p | anew -q gf/endpoints.txt + cat .tmp/url_extract_tmp.txt | egrep -iv "\.(eot|jpg|jpeg|gif|css|tif|tiff|png|ttf|otf|woff|woff2|ico|pdf|svg|txt|js)" | unfurl -u format %s://%d%p | anew -q gf/endpoints.txt gf lfi webs/url_extract.txt | anew -q gf/lfi.txt end_func "Results are saved in gf folder" ${FUNCNAME[0]} else @@ -782,14 +782,18 @@ function jschecks(){ cat js/url_extract_js.txt | cut -d '?' -f 1 | grep -iE "\.js$" | anew -q js/jsfile_links.txt cat js/url_extract_js.txt | subjs | anew -q js/jsfile_links.txt printf "${yellow} Running : Resolving JS Urls 2/5${reset}\n" - cat js/jsfile_links.txt | httpx -follow-redirects -H "${HEADER}" -silent -timeout 15 -threads $HTTPX_THREADS -status-code -no-color | grep "[200]" | cut -d ' ' -f1 | anew -q js/js_livelinks.txt + cat js/jsfile_links.txt | httpx -follow-redirects -H "${HEADER}" -silent -timeout 15 -threads $HTTPX_THREADS -status-code -retries 2 -no-color | grep "[200]" | cut -d ' ' -f1 | anew -q js/js_livelinks.txt printf "${yellow} Running : Gathering endpoints 3/5${reset}\n" - interlace -tL js/js_livelinks.txt -threads 10 -c "python3 $tools/LinkFinder/linkfinder.py -d -i _target_ -o cli >> js/js_endpoints.txt" &>/dev/null - sed -i '/^\//!d' js/js_endpoints.txt + interlace -tL js/js_livelinks.txt -threads 10 -c "python3 $tools/LinkFinder/linkfinder.py -d -i _target_ -o cli >> .tmp/js_endpoints.txt" &>/dev/null + eval sed -i '/^\//!d' .tmp/js_endpoints.txt $DEBUG_ERROR + cat .tmp/js_endpoints.txt | anew -q js/js_endpoints.txt.txt printf "${yellow} Running : Gathering secrets 4/5${reset}\n" cat js/js_livelinks.txt | eval nuclei -silent -t ~/nuclei-templates/exposed-tokens/ -o js/js_secrets.txt $DEBUG_STD printf "${yellow} Running : Building wordlist 5/5${reset}\n" - cat js/js_livelinks.txt | eval python3 $tools/getjswords.py $DEBUG_ERROR | anew -q webs/dict_words.txt + if [ -s "js/js_livelinks.txt" ] + then + cat js/js_livelinks.txt | eval python3 $tools/getjswords.py $DEBUG_ERROR | anew -q webs/dict_words.txt + fi end_func "Results are saved in js folder" ${FUNCNAME[0]} else if [ "$JSCHECKS" = false ]; then @@ -805,6 +809,8 @@ function wordlist_gen(){ then start_func "Wordlist generation" cat .tmp/url_extract_tmp.txt | unfurl -u keys | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt + cat .tmp/url_extract_tmp.txt | unfurl -u values | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt + cat .tmp/js_endpoints.txt | unfurl -u path | anew -q webs/dict_paths.txt cat .tmp/url_extract_tmp.txt | unfurl -u path | anew -q webs/dict_paths.txt touch $called_fn_dir/.${FUNCNAME[0]} end=`date +%s` @@ -843,7 +849,7 @@ function brokenLinks(){ } function xss(){ - if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$XSS" = true ] + if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$XSS" = true ] && [ -s "gf/xss.txt" ] then start_func "XSS Analysis" cat gf/xss.txt | qsreplace FUZZ | Gxss -c 100 -p Xss | anew -q .tmp/xss_reflected.txt @@ -873,6 +879,8 @@ function xss(){ else if [ "$XSS" = false ]; then printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n" + elif [ ! -s "gf/xss.txt" ]; then + printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to XSS ${reset}\n\n" else printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n" fi @@ -896,7 +904,7 @@ function cors(){ } function open_redirect(){ - if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$OPEN_REDIRECT" = true ] + if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$OPEN_REDIRECT" = true ] && [ -s "gf/redirect.txt" ] then start_func "Open redirects checks" if [ "$DEEP" = true ] ; then @@ -919,6 +927,8 @@ function open_redirect(){ else if [ "$OPEN_REDIRECT" = false ]; then printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n" + elif [ ! -s "gf/redirect.txt" ]; then + printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to Open Redirect ${reset}\n\n" else printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n" fi @@ -926,7 +936,7 @@ function open_redirect(){ } function ssrf_checks(){ - if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSRF_CHECKS" = true ] + if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSRF_CHECKS" = true ] && [ -s "gf/ssrf.txt" ] then if [ -n "$COLLAB_SERVER" ]; then start_func "SSRF checks" @@ -963,6 +973,8 @@ function ssrf_checks(){ else if [ "$SSRF_CHECKS" = false ]; then printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n" + elif [ ! -s "gf/ssrf.txt" ]; then + printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SSRF ${reset}\n\n" else printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n" fi @@ -985,7 +997,7 @@ function crlf_checks(){ } function lfi(){ - if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$LFI" = true ] + if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$LFI" = true ] && [ -s "gf/lfi.txt" ] then start_func "LFI checks" cat gf/lfi.txt | qsreplace FUZZ | anew -q .tmp/tmp_lfi.txt @@ -996,6 +1008,8 @@ function lfi(){ else if [ "$LFI" = false ]; then printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n" + elif [ ! -s "gf/lfi.txt" ]; then + printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to LFI ${reset}\n\n" else printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n" fi @@ -1003,7 +1017,7 @@ function lfi(){ } function ssti(){ - if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSTI" = true ] + if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SSTI" = true ] && [ -s "gf/ssti.txt" ] then start_func "SSTI checks" cat gf/ssti.txt | qsreplace "ssti{{7*7}}" | anew -q .tmp/ssti_fuzz.txt @@ -1014,6 +1028,8 @@ function ssti(){ else if [ "$SSTI" = false ]; then printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n" + elif [ ! -s "gf/ssti.txt" ]; then + printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SSTI ${reset}\n\n" else printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n" fi @@ -1021,7 +1037,7 @@ function ssti(){ } function sqli(){ - if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SQLI" = true ] + if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$SQLI" = true ] && [ -s "gf/sqli.txt" ] then start_func "SQLi checks" cat gf/sqli.txt | qsreplace FUZZ | anew -q .tmp/tmp_sqli.txt @@ -1030,6 +1046,8 @@ function sqli(){ else if [ "$SQLI" = false ]; then printf "\n${yellow} ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n\n" + elif [ ! -s "gf/sqli.txt" ]; then + printf "\n${yellow} ${FUNCNAME[0]} No URLs potentially vulnerables to SQLi ${reset}\n\n" else printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n" fi From fe182d75d91369b15b232b3944937d8484838bdd Mon Sep 17 00:00:00 2001 From: six2dez Date: Mon, 15 Mar 2021 10:33:49 +0100 Subject: [PATCH 4/7] New subdomains sources: github-subdomains, mildew and anubis --- install.sh | 2 ++ reconftw.sh | 30 +++++++++++++++++++++++------- 2 files changed, 25 insertions(+), 7 deletions(-) diff --git a/install.sh b/install.sh index fc7503a0..44f9e9df 100755 --- a/install.sh +++ b/install.sh @@ -124,12 +124,14 @@ eval go get -v github.com/tomnomnom/qsreplace $DEBUG_STD eval GO111MODULE=on go get -v github.com/OWASP/Amass/v3/... $DEBUG_STD eval go get -v github.com/ffuf/ffuf $DEBUG_STD eval go get -v github.com/tomnomnom/assetfinder $DEBUG_STD +eval go get -u github.com/gwen001/github-subdomains $DEBUG_STD printf "${bgreen} 10%% done${reset}\n\n" eval go get -v github.com/dwisiswant0/cf-check $DEBUG_STD eval go get -v github.com/tomnomnom/hacks/waybackurls $DEBUG_STD eval GO111MODULE=on go get -v github.com/projectdiscovery/nuclei/v2/cmd/nuclei $DEBUG_STD eval go get -v github.com/tomnomnom/anew $DEBUG_STD eval GO111MODULE=on go get -v github.com/projectdiscovery/notify/cmd/notify $DEBUG_STD +eval go get -u github.com/daehee/mildew/cmd/mildew $DEBUG_STD printf "${bgreen} 20%% done${reset}\n\n" eval go get -v github.com/tomnomnom/unfurl $DEBUG_STD eval git clone https://github.com/projectdiscovery/nuclei-templates ~/nuclei-templates $DEBUG_STD diff --git a/reconftw.sh b/reconftw.sh index adf13cb0..ba35dcd4 100755 --- a/reconftw.sh +++ b/reconftw.sh @@ -46,6 +46,7 @@ function tools_installed(){ [ -f $tools/getjswords.py ] || { printf "${bred} [*] getjswords [NO]${reset}\n"; allinstalled=false;} eval type -P arjun $DEBUG_STD || { printf "${bred} [*] Arjun [NO]${reset}\n"; allinstalled=false;} eval type -P github-endpoints $DEBUG_STD || { printf "${bred} [*] github-endpoints [NO]${reset}\n"; allinstalled=false;} + eval type -P github-subdomains $DEBUG_STD || { printf "${bred} [*] github-subdomains [NO]${reset}\n"; allinstalled=false;} eval type -P gospider $DEBUG_STD || { printf "${bred} [*] gospider [NO]${reset}\n"; allinstalled=false;} eval type -P wafw00f $DEBUG_STD || { printf "${bred} [*] wafw00f [NO]${reset}\n"; allinstalled=false;} eval type -P subfinder $DEBUG_STD || { printf "${bred} [*] Subfinder [NO]${reset}\n"; allinstalled=false;} @@ -54,6 +55,7 @@ function tools_installed(){ eval type -P findomain $DEBUG_STD || { printf "${bred} [*] Findomain [NO]${reset}\n"; allinstalled=false;} eval type -P amass $DEBUG_STD || { printf "${bred} [*] Amass [NO]${reset}\n"; allinstalled=false;} eval type -P crobat $DEBUG_STD || { printf "${bred} [*] Crobat [NO]${reset}\n"; allinstalled=false;} + eval type -P mildew $DEBUG_STD || { printf "${bred} [*] mildew [NO]${reset}\n"; allinstalled=false;} eval type -P waybackurls $DEBUG_STD || { printf "${bred} [*] Waybackurls [NO]${reset}\n"; allinstalled=false;} eval type -P gau $DEBUG_STD || { printf "${bred} [*] Gau [NO]${reset}\n"; allinstalled=false;} eval type -P dnsx $DEBUG_STD || { printf "${bred} [*] dnsx [NO]${reset}\n"; allinstalled=false;} @@ -282,13 +284,27 @@ function sub_passive(){ if [ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ] then start_subfunc "Running : Passive Subdomain Enumeration" - eval subfinder -d $domain -o .tmp/subfinder.txt $DEBUG_STD - eval assetfinder --subs-only $domain $DEBUG_ERROR | anew -q .tmp/assetfinder.txt - eval amass enum -passive -d $domain -config $AMASS_CONFIG -o .tmp/amass.txt $DEBUG_STD - eval findomain --quiet -t $domain -u .tmp/findomain.txt $DEBUG_STD - eval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat.txt - timeout 5m waybackurls $domain | unfurl --unique domains | anew -q .tmp/waybackurls.txt - NUMOFLINES=$(eval cat .tmp/subfinder.txt .tmp/assetfinder.txt .tmp/amass.txt .tmp/findomain.txt .tmp/crobat.txt .tmp/waybackurls.txt $DEBUG_ERROR | sed "s/*.//" | anew .tmp/passive_subs.txt | wc -l) + eval subfinder -d $domain -o .tmp/subfinder_psub.txt $DEBUG_STD + eval assetfinder --subs-only $domain $DEBUG_ERROR | anew -q .tmp/assetfinder_psub.txt + eval amass enum -passive -d $domain -config $AMASS_CONFIG -o .tmp/amass_psub.txt $DEBUG_STD + eval findomain --quiet -t $domain -u .tmp/findomain_psub.txt $DEBUG_STD + eval crobat -s $domain $DEBUG_ERROR | anew -q .tmp/crobat_psub.txt + if [ -s "${GITHUB_TOKENS}" ];then + if [ "$DEEP" = true ] ; then + eval github-subdomains -d $domain -k -raw -t $GITHUB_TOKENS | anew -q .tmp/github_subdomains_psub.txt + else + eval github-subdomains -d $domain -k -q -raw -t $GITHUB_TOKENS | anew -q .tmp/github_subdomains_psub.txt + fi + fi + eval curl -s "https://jldc.me/anubis/subdomains/tiktok.com" $DEBUG_ERROR | grep -Po "((http|https):\/\/)?(([\w.-]*)\.([\w]*)\.([A-z]))\w+" | sed '/^\./d' | anew -q .tmp/jldc_psub.txt + timeout 10m waybackurls $domain | unfurl --unique domains | anew -q .tmp/waybackurls_psub.txt + timeout 10m gau $domain | unfurl --unique domains | anew -q .tmp/gau_psub.txt + if echo $domain | grep -q ".mil$"; then + mildew + mv mildew.out .tmp/mildew.out + cat .tmp/mildew.out | grep ".$domain$" | anew -q .tmp/mil_psub.txt + fi + NUMOFLINES=$(eval cat .tmp/*_psub.txt $DEBUG_ERROR | sed "s/*.//" | anew .tmp/passive_subs.txt | wc -l) end_subfunc "${NUMOFLINES} new subs (passive)" ${FUNCNAME[0]} else printf "${yellow} ${FUNCNAME[0]} is already processed, to force executing ${FUNCNAME[0]} delete $called_fn_dir/.${FUNCNAME[0]} ${reset}\n\n" From 11de502ceaf1b8dc4658e92e3a83c0dde74d24cc Mon Sep 17 00:00:00 2001 From: six2dez Date: Tue, 16 Mar 2021 14:17:21 +0100 Subject: [PATCH 5/7] Removed duplicated steps, faster --- reconftw.sh | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/reconftw.sh b/reconftw.sh index ba35dcd4..bdd526c1 100755 --- a/reconftw.sh +++ b/reconftw.sh @@ -298,7 +298,7 @@ function sub_passive(){ fi eval curl -s "https://jldc.me/anubis/subdomains/tiktok.com" $DEBUG_ERROR | grep -Po "((http|https):\/\/)?(([\w.-]*)\.([\w]*)\.([A-z]))\w+" | sed '/^\./d' | anew -q .tmp/jldc_psub.txt timeout 10m waybackurls $domain | unfurl --unique domains | anew -q .tmp/waybackurls_psub.txt - timeout 10m gau $domain | unfurl --unique domains | anew -q .tmp/gau_psub.txt + timeout 10m gau -subs $domain | unfurl --unique domains | anew -q .tmp/gau_psub.txt if echo $domain | grep -q ".mil$"; then mildew mv mildew.out .tmp/mildew.out @@ -396,7 +396,12 @@ function sub_scraping(){ start_subfunc "Running : Source code scraping subdomain search" touch .tmp/scrap_subs.txt cat subdomains/subdomains.txt | httpx -follow-host-redirects -H "${HEADER}" -status-code -threads $HTTPX_THREADS -timeout 15 -silent -retries 2 -no-color | cut -d ' ' -f1 | grep ".$domain$" | anew -q .tmp/probed_tmp.txt - gospider -S .tmp/probed_tmp.txt --js -t $GOSPIDER_THREADS -H "${HEADER}" --sitemap --robots -w -r | egrep -o 'https?://[^ ]+' | sed 's/]$//' | unfurl --unique domains | grep ".$domain$" | anew -q .tmp/scrap_subs.txt + if [ "$DEEP" = true ] ; then + gospider -S .tmp/probed_tmp.txt --js -t $GOSPIDER_THREADS -d 3 -H "${HEADER}" --sitemap --robots -w -r > .tmp/gospider.txt + else + gospider -S .tmp/probed_tmp.txt --js -t $GOSPIDER_THREADS -H "${HEADER}" --sitemap --robots -w -r > .tmp/gospider.txt + fi + cat .tmp/gospider.txt | egrep -o 'https?://[^ ]+' | sed 's/]$//' | unfurl --unique domains | grep ".$domain$" | anew -q .tmp/scrap_subs.txt cat .tmp/scrap_subs.txt | eval shuffledns -d $domain -r $resolvers -t $SHUFFLEDNS_THREADS -o .tmp/scrap_subs_resolved.txt $DEBUG_STD NUMOFLINES=$(eval cat .tmp/scrap_subs_resolved.txt $DEBUG_ERROR | anew subdomains/subdomains.txt | wc -l) end_subfunc "${NUMOFLINES} new subs (code scraping)" ${FUNCNAME[0]} @@ -744,12 +749,17 @@ function urlchecks(){ start_func "URL Extraction" mkdir -p js cat webs/webs.txt | waybackurls | anew -q .tmp/url_extract_tmp.txt - cat webs/webs.txt | gau | anew -q .tmp/url_extract_tmp.txt - if [ "$DEEP" = true ] ; then - gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 3 -H "${HEADER}" --sitemap --robots -w -r | egrep -o 'https?://[^ ]+' | sed 's/]$//' | grep ".$domain$" | anew -q .tmp/url_extract_tmp.txt - else - gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -H "${HEADER}" --sitemap --robots -w -r | egrep -o 'https?://[^ ]+' | sed 's/]$//' | grep ".$domain$" | anew -q .tmp/url_extract_tmp.txt + cat webs/webs.txt | gau -subs | anew -q .tmp/url_extract_tmp.txt + diff_webs=$(diff <(sort -u .tmp/probed_tmp.txt) <(sort -u webs/webs.txt) | wc -l) + if [ $diff_webs != "0" ]; + then + if [ "$DEEP" = true ] ; then + gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 3 -H "${HEADER}" --sitemap --robots -w -r > .tmp/gospider.txt + else + gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -H "${HEADER}" --sitemap --robots -w -r > .tmp/gospider.txt + fi fi + cat .tmp/gospider.txt | egrep -o 'https?://[^ ]+' | sed 's/]$//' | grep ".$domain$" | anew -q .tmp/url_extract_tmp.txt if [ -s "${GITHUB_TOKENS}" ] then eval github-endpoints -q -k -d $domain -t ${GITHUB_TOKENS} -o .tmp/github-endpoints.txt $DEBUG_STD @@ -826,6 +836,7 @@ function wordlist_gen(){ start_func "Wordlist generation" cat .tmp/url_extract_tmp.txt | unfurl -u keys | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt cat .tmp/url_extract_tmp.txt | unfurl -u values | sed 's/[][]//g' | sed 's/[#]//g' | sed 's/[}{]//g' | anew -q webs/dict_words.txt + cat .tmp/url_extract_tmp.txt | tr "[:punct:]" "\n" | anew -q webs/dict_words.txt cat .tmp/js_endpoints.txt | unfurl -u path | anew -q webs/dict_paths.txt cat .tmp/url_extract_tmp.txt | unfurl -u path | anew -q webs/dict_paths.txt touch $called_fn_dir/.${FUNCNAME[0]} @@ -850,9 +861,15 @@ function wordlist_gen(){ function brokenLinks(){ if ([ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ] || [ "$DIFF" = true ]) && [ "$BROKENLINKS" = true ] ; then start_func "Broken links checks" - interlace -tL webs/webs.txt -threads 10 -c "wget --spider -r -nd -nv -H -l 1 -w 1 --no-check-certificate -U 'Mozilla' -o _output_/_cleantarget__brokenLinks.tmp _target_" -o .tmp &>/dev/null - cat .tmp/*_brokenLinks.tmp | grep "^http" | grep -v ':$' | anew -q .tmp/brokenLinks_total.txt - NUMOFLINES=$(eval cat .tmp/brokenLinks_total.txt $DEBUG_ERROR | cut -d ' ' -f2 | anew webs/brokenLinks.txt | wc -l) + if [ ! -s ".tmp/gospider.txt" ]; then + if [ "$DEEP" = true ] ; then + gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -d 3 -H "${HEADER}" --sitemap --robots -w -r > .tmp/gospider.txt + else + gospider -S webs/webs.txt --js -t $GOSPIDER_THREADS -H "${HEADER}" --sitemap --robots -w -r > .tmp/gospider.txt + fi + fi + cat .tmp/gospider.txt | egrep -o 'https?://[^ ]+' | sed 's/]$//' | sort -u | httpx -follow-redirects -status-code -timeout 15 -silent -retries 2 -no-color | grep "\[4" | cut -d ' ' -f1 | anew -q .tmp/brokenLinks_total.txt + NUMOFLINES=$(eval cat .tmp/brokenLinks_total.txt $DEBUG_ERROR | anew webs/brokenLinks.txt | wc -l) notification "${NUMOFLINES} new broken links found in ${runtime}" good end_func "Results are saved in webs/brokenLinks.txt" ${FUNCNAME[0]} else From f26557fec79809b713a2dbdacb678939cadf085d Mon Sep 17 00:00:00 2001 From: six2dez Date: Wed, 17 Mar 2021 11:59:46 +0100 Subject: [PATCH 6/7] New subs list and vhosts list --- install.sh | 2 +- reconftw.sh | 7 ++++--- update.sh | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 44f9e9df..306c2171 100755 --- a/install.sh +++ b/install.sh @@ -206,7 +206,7 @@ cd ~/.gf; eval wget -O potential.json https://raw.githubusercontent.com/devanshb touch $dir/.github_tokens eval wget -O getjswords.py https://raw.githubusercontent.com/m4ll0k/Bug-Bounty-Toolz/master/getjswords.py $DEBUG_STD eval wget -O subdomains_big.txt https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt $DEBUG_STD -eval wget -O subdomains.txt https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/DNS/sortedcombined-knock-dnsrecon-fierce-reconng.txt $DEBUG_STD +eval wget -O subdomains.txt https://gist.githubusercontent.com/six2dez/a307a04a222fab5a57466c51e1569acf/raw/1bcdf2d61df08e66fd2d63b6a840f02c3a2ae24c/subdomains.txt $DEBUG_STD eval wget -O resolvers.txt https://raw.githubusercontent.com/BBerastegui/fresh-dns-servers/master/resolvers.txt $DEBUG_STD eval wget -O permutations_list.txt https://gist.githubusercontent.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw/137bb6b60c616552c705e93a345c06cec3a2cb1f/permutations_list.txt $DEBUG_STD eval wget -O ssrf.py https://gist.githubusercontent.com/h4ms1k/adcc340495d418fcd72ec727a116fea2/raw/ea0774de5e27f9bc855207b175249edae2e9ccef/asyncio_ssrf.py $DEBUG_STD diff --git a/reconftw.sh b/reconftw.sh index bdd526c1..3b6efaba 100755 --- a/reconftw.sh +++ b/reconftw.sh @@ -571,12 +571,13 @@ function portscan(){ then start_func "Port scan" for sub in $(cat subdomains/subdomains.txt); do - echo "$sub $(dig +short a $sub | tail -n1)" | anew -q hosts/subdomains_ips.txt + echo "$sub $(dig +short a $sub | tail -n1)" | anew -q .tmp/subs_ips.txt done + awk '{ print $2 " " $1}' .tmp/subs_ips.txt | sort -k2 -n | anew -q hosts/subs_ips_vhosts.txt - eval cat hosts/subdomains_ips.txt $dir/favicontest.txt $DEBUG_ERROR | cut -d ' ' -f2 | egrep -iv "^(127|10|169|172|192)\." | anew -q hosts/ips.txt + eval cat hosts/subs_ips_vhosts.txt $DEBUG_ERROR | cut -d ' ' -f1 | egrep -iv "^(127|10|169|172|192)\." | anew -q hosts/ips.txt - eval cat hosts/ips.txt | cf-check -c $NPROC | egrep -iv "^(127|10|169|172|192)\." | anew -q .tmp/ips_nowaf.txt + eval cat hosts/ips.txt $DEBUG_ERROR | cf-check -c $NPROC | egrep -iv "^(127|10|169|172|192)\." | anew -q .tmp/ips_nowaf.txt printf "${bblue}\n Resolved IP addresses (No WAF) ${reset}\n\n"; eval cat .tmp/ips_nowaf.txt $DEBUG_ERROR | sort diff --git a/update.sh b/update.sh index d555ea86..8b44a77d 100755 --- a/update.sh +++ b/update.sh @@ -96,7 +96,7 @@ eval wget -N -c -O ~/.gf/potential.json https://raw.githubusercontent.com/devans eval wget -N -c -O ~/.config/amass/config.ini https://raw.githubusercontent.com/OWASP/Amass/master/examples/config.ini $DEBUG_STD eval wget -N -C -O ~/.config/notify/notify.conf https://gist.githubusercontent.com/six2dez/23a996bca189a11e88251367e6583053/raw/a66c4d8cf47a3bc95f5e9ba84773428662ea760c/notify_sample.conf $DEBUG_ERROR eval wget -N -c -O $dir/getjswords.py https://raw.githubusercontent.com/m4ll0k/Bug-Bounty-Toolz/master/getjswords.py $DEBUG_STD -eval wget -N -c -O $dir/subdomains.txt https://raw.githubusercontent.com/danielmiessler/SecLists/master/Discovery/DNS/sortedcombined-knock-dnsrecon-fierce-reconng.txt $DEBUG_STD +eval wget -N -c -O $dir/subdomains.txt subdomains.txt https://gist.githubusercontent.com/six2dez/a307a04a222fab5a57466c51e1569acf/raw/1bcdf2d61df08e66fd2d63b6a840f02c3a2ae24c/subdomains.txt $DEBUG_STD $DEBUG_STD eval wget -N -c -O $dir/subdomains_big.txt https://gist.githubusercontent.com/jhaddix/86a06c5dc309d08580a018c66354a056/raw/96f4e51d96b2203f19f6381c8c545b278eaa0837/all.txt $DEBUG_STD eval wget -N -c -O $dir/resolvers.txt https://raw.githubusercontent.com/BBerastegui/fresh-dns-servers/master/resolvers.txt $DEBUG_STD eval wget -N -c -O $dir/permutations_list.txt https://gist.githubusercontent.com/six2dez/ffc2b14d283e8f8eff6ac83e20a3c4b4/raw/137bb6b60c616552c705e93a345c06cec3a2cb1f/permutations_list.txt $DEBUG_STD From 995ac6f850e47b385826f8dad46bb565e3f08fe3 Mon Sep 17 00:00:00 2001 From: six2dez Date: Thu, 18 Mar 2021 08:35:37 +0100 Subject: [PATCH 7/7] Fix installer and Anubis --- install.sh | 9 +++++---- reconftw.sh | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index 306c2171..bd43920d 100755 --- a/install.sh +++ b/install.sh @@ -47,13 +47,14 @@ if [[ $(eval type go $DEBUG_ERROR | grep -o 'go is') == "go is" ]] printf "${bgreen} Golang is already installed ${reset}\n\n" else printf "${yellow} Running: Installing Golang ${reset}\n\n" + version=$(curl https://golang.org/VERSION?m=text) if [ "True" = "$IS_ARM" ]; then - eval wget https://dl.google.com/go/$(curl https://golang.org/VERSION?m=text).linux-armv6l.tar.gz $DEBUG_STD - eval $SUDO tar -C /usr/local -xzf go$LATEST_GO.linux-armv6l.tar.gz $DEBUG_STD + eval wget https://dl.google.com/go/${version}.linux-armv6l.tar.gz $DEBUG_STD + eval $SUDO tar -C /usr/local -xzf ${version}.linux-armv6l.tar.gz $DEBUG_STD $SUDO cp /usr/local/go/bin/go /usr/bin else - eval wget wget https://dl.google.com/go/$(curl https://golang.org/VERSION?m=text).linux-amd64.tar.gz $DEBUG_STD - eval $SUDO tar -C /usr/local -xzf go$LATEST_GO.linux-amd64.tar.gz $DEBUG_STD + eval wget https://dl.google.com/go/${version}.linux-amd64.tar.gz $DEBUG_STD + eval $SUDO tar -C /usr/local -xzf ${version}.linux-amd64.tar.gz $DEBUG_STD $SUDO cp /usr/local/go/bin/go /usr/bin fi rm -rf go$LATEST_GO* diff --git a/reconftw.sh b/reconftw.sh index 3b6efaba..3b1fdfc4 100755 --- a/reconftw.sh +++ b/reconftw.sh @@ -296,7 +296,7 @@ function sub_passive(){ eval github-subdomains -d $domain -k -q -raw -t $GITHUB_TOKENS | anew -q .tmp/github_subdomains_psub.txt fi fi - eval curl -s "https://jldc.me/anubis/subdomains/tiktok.com" $DEBUG_ERROR | grep -Po "((http|https):\/\/)?(([\w.-]*)\.([\w]*)\.([A-z]))\w+" | sed '/^\./d' | anew -q .tmp/jldc_psub.txt + eval curl -s "https://jldc.me/anubis/subdomains/${domain}" $DEBUG_ERROR | grep -Po "((http|https):\/\/)?(([\w.-]*)\.([\w]*)\.([A-z]))\w+" | sed '/^\./d' | anew -q .tmp/jldc_psub.txt timeout 10m waybackurls $domain | unfurl --unique domains | anew -q .tmp/waybackurls_psub.txt timeout 10m gau -subs $domain | unfurl --unique domains | anew -q .tmp/gau_psub.txt if echo $domain | grep -q ".mil$"; then