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 Path macOS

six2dez6e94445b1d8f
diff --git a/install.sh b/install.sh
index 2628649..c3bed70 100755
--- a/install.sh
+++ b/install.sh
@@ -132,7 +132,7 @@ install_brew(){
fi
eval brew update -$DEBUG_STD
eval brew install --cask chromium $DEBUG_STD
- eval brew install bash python massdns jq gcc cmake ruby git curl libpcap-dev wget zip python3-dev pv dnsutils libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev nmap jq apt-transport-https lynx tor medusa xvfb libxml2-utils libdata-hexdump-perl $DEBUG_STD
+ eval brew install bash coreutils python massdns jq gcc cmake ruby git curl libpcap-dev wget zip python3-dev pv dnsutils libssl-dev libffi-dev libxml2-dev libxslt1-dev zlib1g-dev nmap jq apt-transport-https lynx tor medusa xvfb libxml2-utils libdata-hexdump-perl $DEBUG_STD
eval brew services start tor $DEBUG_STD
}
diff --git a/reconftw.sh b/reconftw.sh
index aaf4aff..ee96a8d 100755
--- a/reconftw.sh
+++ b/reconftw.sh
@@ -1853,7 +1853,8 @@ function resolvers_update(){
}
function ipcidr_target(){
- if [[ $1 =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9] ]]; then
+ IP_CIDR_REGEX='(((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?))(\/([8-9]|[1-2][0-9]|3[0-2]))([^0-9.]|$)|(((25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)\.){3}(25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)$)'
+ if [[ $1 =~ ^$IP_CIDR_REGEX ]]; then
echo $1 | mapcidr -silent | anew -q target_reconftw_ipcidr.txt
if [ -s "./target_reconftw_ipcidr.txt" ]; then
[ "$REVERSE_IP" = true ] && cat ./target_reconftw_ipcidr.txt | dnsx -ptr -resp-only -silent -retry 3 | unfurl -u domains 2>/dev/null | sed 's/\.$//' | anew -q ./target_reconftw_ipcidr.txt
@@ -2483,6 +2484,12 @@ function help(){
########################################### START SCRIPT #####################################################
###############################################################################################################
+# macOS PATH initialization, thanks @0xtavian <3
+if [[ "$OSTYPE" == "darwin"* ]]; then
+ PATH="/usr/local/opt/gnu-getopt/bin:$PATH"
+ PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
+fi
+
PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:c:rspanwvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,deep,help,vps' -n 'reconFTW' -- "$@")