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

Version checker and updater improved

six2dez2a6743ebd9cc
diff --git a/install.sh b/install.sh
index b6507f1..827e727 100755
--- a/install.sh
+++ b/install.sh
@@ -102,6 +102,26 @@ eval git config --global --unset http.proxy $DEBUG_STD
eval git config --global --unset https.proxy $DEBUG_STD
printf "${bblue} Running: Looking for new reconFTW version${reset}\n\n"
+
+eval git fetch $DEBUG_STD
+BRANCH=$(git rev-parse --abbrev-ref HEAD)
+HEADHASH=$(git rev-parse HEAD)
+UPSTREAMHASH=$(git rev-parse ${BRANCH}@{upstream})
+
+if [ "$HEADHASH" != "$UPSTREAMHASH" ]
+then
+ printf "${yellow} There is a new version, updating...${reset}\n\n"
+ if [ -n "$(git status --porcelain | egrep 'reconftw.cfg$')" ]; then
+ mv reconftw.cfg reconftw.cfg_bck
+ printf "${yellow} reconftw.cfg has been backed up in reconftw.cfg_bck${reset}\n\n"
+ fi
+ eval git reset --hard $DEBUG_STD
+ eval git pull $DEBUG_STD
+ printf "${bgreen} Updated! Running new installer version...${reset}\n\n"
+else
+ printf "${bgreen} reconFTW latest version installed ${reset}\n\n"
+fi
+
eval git fetch $DEBUG_STD
if [ -n "$(git status --porcelain | egrep -v '^\?\?')" ]; then
printf "${yellow} There is a new version, updating...${reset}\n\n"
@@ -236,3 +256,4 @@ eval strip -s $HOME/go/bin/* $DEBUG_STD
printf "${yellow} Remember set your api keys:\n - amass (~/.config/amass/config.ini)\n - subfinder (~/.config/subfinder/config.yaml)\n - GitHub (~/Tools/.github_tokens)\n - SHODAN (SHODAN_API_KEY in reconftw.cfg)\n - SSRF Server (COLLAB_SERVER in reconftw.cfg) \n - Blind XSS Server (XSS_SERVER in reconftw.cfg) \n - theHarvester (~/Tools/theHarvester/api-keys.yml)\n - H8mail (~/Tools/h8mail_config.ini)\n\n${reset}"
printf "${bgreen} Finished!${reset}\n\n"
printf "\n\n${bgreen}#######################################################################${reset}\n"
+#test
diff --git a/reconftw.cfg b/reconftw.cfg
index 135001f..bc14f00 100644
--- a/reconftw.cfg
+++ b/reconftw.cfg
@@ -17,6 +17,7 @@ tools=~/Tools
NPROC=$(nproc || echo -n 1)
SCRIPTPATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
profile_shell=".$(basename $(echo $SHELL))rc"
+reconftw_version=$(git branch --show-current)-$(git describe --tags)
#dir_output=/custom/output/path
# Golang Vars (Comment or change on your own)
diff --git a/reconftw.sh b/reconftw.sh
index 887336c..dd7c91c 100755
--- a/reconftw.sh
+++ b/reconftw.sh
@@ -14,13 +14,27 @@ function banner(){
printf " ░░ ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ ░ ░ ░ ░ \n"
printf " ░ ░ ░░ ░ ░ ░ ░ ░ \n"
printf " ░ \n"
- printf " by @six2dez${reset}\n"
+ printf " ${reconftw_version} by @six2dez${reset}\n"
}
###############################################################################################################
################################################### TOOLS #####################################################
###############################################################################################################
+function check_version(){
+
+eval git fetch $DEBUG_STD
+BRANCH=$(git rev-parse --abbrev-ref HEAD)
+HEADHASH=$(git rev-parse HEAD)
+UPSTREAMHASH=$(git rev-parse ${BRANCH}@{upstream})
+
+if [ "$HEADHASH" != "$UPSTREAMHASH" ]
+then
+ printf "${yellow} There is a new version, run ./install.sh to get latest version${reset}\n\n"
+fi
+
+}
+
function tools_installed(){
printf "\n\n${bgreen}#######################################################################${reset}\n"
@@ -1655,6 +1669,8 @@ function help(){
banner
+check_version
+
if [ -z "$1" ]
then
help