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
Adds the feature described in #766 upgrade tools before running switch
six2dez353aebc87f02
diff --git a/install.sh b/install.shindex 44d0c35..e618451 100755--- a/install.sh+++ b/install.sh@@ -131,6 +131,124 @@ function banner_web(){printf " ${reconftw_version} by @six2dez\n"}+function install_tools(){+ #eval ln -s /usr/local/bin/pip3 /usr/local/bin/pip3 $DEBUG_STD+ eval pip3 install -I -r requirements.txt $DEBUG_STD++ printf "${bblue} Running: Installing Golang tools (${#gotools[@]})${reset}\n\n"+ go env -w GO111MODULE=auto+ go_step=0+ for gotool in "${!gotools[@]}"; do+ go_step=$((go_step + 1))+ if [ "$upgrade_tools" = "false" ]; then+ res=$(command -v "$gotool") && {+ echo -e "[${yellow}SKIPPING${reset}] $gotool already installed in...${blue}${res}${reset}"+ continue+ }+ fi+ eval ${gotools[$gotool]} $DEBUG_STD+ exit_status=$?+ if [ $exit_status -eq 0 ]+ then+ printf "${yellow} $gotool installed (${go_step}/${#gotools[@]})${reset}\n"+ else+ printf "${red} Unable to install $gotool, try manually (${go_step}/${#gotools[@]})${reset}\n"+ double_check=true+ fi+ done++ printf "${bblue}\n Running: Installing repositories (${#repos[@]})${reset}\n\n"++ # Repos with special configs+ eval git clone https://github.com/projectdiscovery/nuclei-templates ${NUCLEI_TEMPLATES_PATH} $DEBUG_STD+ eval git clone https://github.com/geeknik/the-nuclei-templates.git ${NUCLEI_TEMPLATES_PATH}/extra_templates $DEBUG_STD+ eval git clone https://github.com/projectdiscovery/fuzzing-templates $tools/fuzzing-templates $DEBUG_STD+ eval nuclei -update-templates $DEBUG_STD+ cd "$dir" || { echo "Failed to cd to $dir in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }+ eval git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git $dir/sqlmap $DEBUG_STD+ eval git clone --depth 1 https://github.com/drwetter/testssl.sh.git $dir/testssl.sh $DEBUG_STD+ eval $SUDO git clone https://gitlab.com/exploit-database/exploitdb /opt/exploitdb $DEBUG_STD++ # Standard repos installation+ repos_step=0+ for repo in "${!repos[@]}"; do+ repos_step=$((repos_step + 1))+ if [ "$upgrade_tools" = "false" ]; then+ unset is_installed+ unset is_need_dl+ [[ $repo == "Gf-Patterns" ]] && is_need_dl=1+ [[ $repo == "gf" ]] && is_need_dl=1+ res=$(command -v "$repo") && is_installed=1+ [[ -z $is_need_dl ]] && [[ -n $is_installed ]] && {+ # HERE: not installed yet.+ echo -e "[${yellow}SKIPPING${reset}] $repo already installed in...${blue}${res}${reset}"+ continue+ }+ fi+ eval git clone https://github.com/${repos[$repo]} $dir/$repo $DEBUG_STD+ eval cd $dir/$repo $DEBUG_STD+ eval git pull $DEBUG_STD+ exit_status=$?+ if [ $exit_status -eq 0 ]+ then+ printf "${yellow} $repo installed (${repos_step}/${#repos[@]})${reset}\n"+ else+ printf "${red} Unable to install $repo, try manually (${repos_step}/${#repos[@]})${reset}\n"+ double_check=true+ fi+ if ( [ -z $is_installed ] && [ "$upgrade_tools" = "false" ] ) || [ "$upgrade_tools" = "true" ] ; then+ if [ -s "requirements.txt" ]; then+ eval $SUDO pip3 install -r requirements.txt $DEBUG_STD+ fi+ if [ -s "setup.py" ]; then+ eval $SUDO pip3 install . $DEBUG_STD+ fi+ if [ "massdns" = "$repo" ]; then+ eval make $DEBUG_STD && strip -s bin/massdns && eval $SUDO cp bin/massdns /usr/local/bin/ $DEBUG_ERROR+ fi+ if [ "gitleaks" = "$repo" ]; then+ eval make build $DEBUG_STD && eval $SUDO cp ./gitleaks /usr/local/bin/ $DEBUG_ERROR+ fi+ fi+ if [ "gf" = "$repo" ]; then+ eval cp -r examples ~/.gf $DEBUG_ERROR+ elif [ "Gf-Patterns" = "$repo" ]; then+ eval mv ./*.json ~/.gf $DEBUG_ERROR+ fi+ cd "$dir" || { echo "Failed to cd to $dir in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }+ done++ if [ "True" = "$IS_ARM" ]; then+ if [ "True" = "$RPI_3" ]; then+ eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ eval $SUDO rm -rf ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ elif [ "True" = "$RPI_4" ]; then+ eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-aarch64-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-aarch64-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ eval $SUDO rm -rf ppfuzz-v1.0.1-aarch64-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ fi+ elif [ "True" = "$IS_MAC" ]; then+ if [ "True" = "$IS_ARM" ]; then+ eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ eval $SUDO rm -rf ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD+ else+ eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-x86_64-apple-darwin.tar.gz $DEBUG_STD+ eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-x86_64-apple-darwin.tar.gz $DEBUG_STD+ eval $SUDO rm -rf ppfuzz-v1.0.1-x86_64-apple-darwin.tar.gz $DEBUG_STD+ fi+ else+ eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-x86_64-unknown-linux-musl.tar.gz $DEBUG_STD+ eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-x86_64-unknown-linux-musl.tar.gz $DEBUG_STD+ eval $SUDO rm -rf ppfuzz-v1.0.1-x86_64-unknown-linux-musl.tar.gz $DEBUG_STD+ fi+ eval $SUDO chmod 755 /usr/local/bin/ppfuzz+ eval $SUDO strip -s /usr/local/bin/ppfuzz $DEBUG_STD+ eval notify $DEBUG_STD+ eval subfinder $DEBUG_STD+ eval subfinder $DEBUG_STD+}install_webserver(){printf "${bblue} Running: Installing web reconftw ${reset}\n\n"@@ -245,6 +363,10 @@ display_menu(){done}+if [ "$1" = '--tools' ]; then+ install_tools+fi+if [ "$1" != '--auto' ]; thenecho "$1"display_menu@@ -401,122 +523,8 @@ touch $dir/.gitlab_tokenseval wget -N -c https://bootstrap.pypa.io/get-pip.py $DEBUG_STD && eval python3 get-pip.py $DEBUG_STDeval rm -f get-pip.py $DEBUG_STD-#eval ln -s /usr/local/bin/pip3 /usr/local/bin/pip3 $DEBUG_STD-eval pip3 install -I -r requirements.txt $DEBUG_STD--printf "${bblue} Running: Installing Golang tools (${#gotools[@]})${reset}\n\n"-go env -w GO111MODULE=auto-go_step=0-for gotool in "${!gotools[@]}"; do- go_step=$((go_step + 1))- if [ "$upgrade_tools" = "false" ]; then- res=$(command -v "$gotool") && {- echo -e "[${yellow}SKIPPING${reset}] $gotool already installed in...${blue}${res}${reset}"- continue- }- fi- eval ${gotools[$gotool]} $DEBUG_STD- exit_status=$?- if [ $exit_status -eq 0 ]- then- printf "${yellow} $gotool installed (${go_step}/${#gotools[@]})${reset}\n"- else- printf "${red} Unable to install $gotool, try manually (${go_step}/${#gotools[@]})${reset}\n"- double_check=true- fi-done--printf "${bblue}\n Running: Installing repositories (${#repos[@]})${reset}\n\n"--# Repos with special configs-eval git clone https://github.com/projectdiscovery/nuclei-templates ${NUCLEI_TEMPLATES_PATH} $DEBUG_STD-eval git clone https://github.com/geeknik/the-nuclei-templates.git ${NUCLEI_TEMPLATES_PATH}/extra_templates $DEBUG_STD-eval git clone https://github.com/projectdiscovery/fuzzing-templates $tools/fuzzing-templates $DEBUG_STD-eval nuclei -update-templates $DEBUG_STD-cd "$dir" || { echo "Failed to cd to $dir in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }-eval git clone --depth 1 https://github.com/sqlmapproject/sqlmap.git $dir/sqlmap $DEBUG_STD-eval git clone --depth 1 https://github.com/drwetter/testssl.sh.git $dir/testssl.sh $DEBUG_STD-eval $SUDO git clone https://gitlab.com/exploit-database/exploitdb /opt/exploitdb $DEBUG_STD--# Standard repos installation-repos_step=0-for repo in "${!repos[@]}"; do- repos_step=$((repos_step + 1))- if [ "$upgrade_tools" = "false" ]; then- unset is_installed- unset is_need_dl- [[ $repo == "Gf-Patterns" ]] && is_need_dl=1- [[ $repo == "gf" ]] && is_need_dl=1- res=$(command -v "$repo") && is_installed=1- [[ -z $is_need_dl ]] && [[ -n $is_installed ]] && {- # HERE: not installed yet.- echo -e "[${yellow}SKIPPING${reset}] $repo already installed in...${blue}${res}${reset}"- continue- }- fi- eval git clone https://github.com/${repos[$repo]} $dir/$repo $DEBUG_STD- eval cd $dir/$repo $DEBUG_STD- eval git pull $DEBUG_STD- exit_status=$?- if [ $exit_status -eq 0 ]- then- printf "${yellow} $repo installed (${repos_step}/${#repos[@]})${reset}\n"- else- printf "${red} Unable to install $repo, try manually (${repos_step}/${#repos[@]})${reset}\n"- double_check=true- fi- if ( [ -z $is_installed ] && [ "$upgrade_tools" = "false" ] ) || [ "$upgrade_tools" = "true" ] ; then- if [ -s "requirements.txt" ]; then- eval $SUDO pip3 install -r requirements.txt $DEBUG_STD- fi- if [ -s "setup.py" ]; then- eval $SUDO pip3 install . $DEBUG_STD- fi- if [ "massdns" = "$repo" ]; then- eval make $DEBUG_STD && strip -s bin/massdns && eval $SUDO cp bin/massdns /usr/local/bin/ $DEBUG_ERROR- fi- if [ "gitleaks" = "$repo" ]; then- eval make build $DEBUG_STD && eval $SUDO cp ./gitleaks /usr/local/bin/ $DEBUG_ERROR- fi- fi- if [ "gf" = "$repo" ]; then- eval cp -r examples ~/.gf $DEBUG_ERROR- elif [ "Gf-Patterns" = "$repo" ]; then- eval mv ./*.json ~/.gf $DEBUG_ERROR- fi- cd "$dir" || { echo "Failed to cd to $dir in ${FUNCNAME[0]} @ line ${LINENO}"; exit 1; }-done--if [ "True" = "$IS_ARM" ]; then- if [ "True" = "$RPI_3" ]; then- eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- eval $SUDO rm -rf ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- elif [ "True" = "$RPI_4" ]; then- eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-aarch64-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-aarch64-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- eval $SUDO rm -rf ppfuzz-v1.0.1-aarch64-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- fi-elif [ "True" = "$IS_MAC" ]; then- if [ "True" = "$IS_ARM" ]; then- eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- eval $SUDO rm -rf ppfuzz-v1.0.1-armv7-unknown-linux-gnueabihf.tar.gz $DEBUG_STD- else- eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-x86_64-apple-darwin.tar.gz $DEBUG_STD- eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-x86_64-apple-darwin.tar.gz $DEBUG_STD- eval $SUDO rm -rf ppfuzz-v1.0.1-x86_64-apple-darwin.tar.gz $DEBUG_STD- fi-else- eval wget -N -c https://github.com/dwisiswant0/ppfuzz/releases/download/v1.0.1/ppfuzz-v1.0.1-x86_64-unknown-linux-musl.tar.gz $DEBUG_STD- eval $SUDO tar -C /usr/local/bin/ -xzf ppfuzz-v1.0.1-x86_64-unknown-linux-musl.tar.gz $DEBUG_STD- eval $SUDO rm -rf ppfuzz-v1.0.1-x86_64-unknown-linux-musl.tar.gz $DEBUG_STD-fi-eval $SUDO chmod 755 /usr/local/bin/ppfuzz-eval $SUDO strip -s /usr/local/bin/ppfuzz $DEBUG_STD-eval notify $DEBUG_STD-eval subfinder $DEBUG_STD-eval subfinder $DEBUG_STD++install_toolsprintf "${bblue}\n Running: Downloading required files ${reset}\n\n"## Downloadsdiff --git a/reconftw.cfg b/reconftw.cfgindex 5ab379f..97937b1 100644--- a/reconftw.cfg+++ b/reconftw.cfg@@ -15,6 +15,7 @@ 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#dir_output=/custom/output/path# Golang Vars (Comment or change on your own)diff --git a/reconftw.sh b/reconftw.shindex c1a4fa6..45fff80 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -2246,6 +2246,9 @@ function start(){notification "Recon succesfully started on ${domain}" good[ "$SOFT_NOTIFICATION" = true ] && echo "Recon succesfully started on ${domain}" | notify -silentprintf "${bgreen}#######################################################################${reset}\n"+ if [ "$upgrade_before_running" = true ]; then+ ${SCRIPTPATH}/install.sh --tools+ fitools_installed#[[ -n "$domain" ]] && ipcidr_target $domain