Skip to content

Commit

Permalink
Merge pull request #832 from six2dez/dev
Browse files Browse the repository at this point in the history
fix geoinfo - git update - web mode
  • Loading branch information
six2dez authored Feb 9, 2024
2 parents d8d7097 + f9d31ad commit 71f6150
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 24 deletions.
38 changes: 20 additions & 18 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,26 +345,28 @@ eval git config --global --unset https.proxy $DEBUG_STD

printf "${bblue} Running: Looking for new reconFTW version${reset}\n\n"

if ! eval git fetch $DEBUG_STD; then
echo "Failed to fetch updates."
exit 1
fi

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 git status --porcelain | grep -q 'reconftw.cfg$'; then
mv reconftw.cfg reconftw.cfg_bck
printf "${yellow} reconftw.cfg has been backed up in reconftw.cfg_bck${reset}\n\n"
timeout 10 git fetch
exit_status=$?
if [[ ${exit_status} -eq 0 ]]; then

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 git status --porcelain | grep -q '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 is already up to date!${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 is already up to date!${reset}\n\n"
printf "\n${bred} Unable to check updates ${reset}\n\n"
fi

printf "${bblue} Running: Installing system packages ${reset}\n\n"
Expand Down
12 changes: 6 additions & 6 deletions reconftw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,7 @@ function s3buckets() {
fi
# Cloudenum
keyword=${domain%%.*}
python3 ~/Tools/cloud_enum/cloud_enum.py -k $keyword -l .tmp/output_cloud.txt 2>>"$LOGFILE" >/dev/null
timeout -k 1m 20m python3 ~/Tools/cloud_enum/cloud_enum.py -k $keyword -l .tmp/output_cloud.txt 2>>"$LOGFILE" >/dev/null

NUMOFLINES1=$(cat .tmp/output_cloud.txt 2>>"$LOGFILE" | sed '/^#/d' | sed '/^$/d' | anew subdomains/cloud_assets.txt | wc -l)
if [[ $NUMOFLINES1 -gt 0 ]]; then
Expand Down Expand Up @@ -1281,7 +1281,7 @@ function s3buckets() {
function geo_info() {

if { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $GEO_INFO == true ]]; then
start_func ${FUNCNAME[0]} "Running: ipinfo via ipapi.co"
start_func ${FUNCNAME[0]} "Running: ipinfo and geoinfo"
ips_file="${dir}/hosts/ips.txt"
if [ ! -f $ips_file ]; then
echo "File ${dir}/hosts/ips.txt does not exist."
Expand Down Expand Up @@ -2950,9 +2950,9 @@ function passive() {
remove_big_files
favicon
cdnprovider
geo_info
PORTSCAN_ACTIVE=false
portscan
geo_info

if [[ $AXIOM == true ]]; then
axiom_shutdown
Expand Down Expand Up @@ -3099,8 +3099,8 @@ function recon() {
screenshot
# virtualhosts
cdnprovider
geo_info
portscan
geo_info
waf_checks
nuclei_check
fuzz
Expand Down Expand Up @@ -3222,8 +3222,8 @@ function multi_recon() {
screenshot
# virtualhosts
cdnprovider
geo_info
portscan
geo_info
currently=$(date +"%H:%M:%S")
loopend=$(date +%s)
getElapsedTime $loopstart $loopend
Expand Down Expand Up @@ -3435,7 +3435,7 @@ if [[ $OSTYPE == "darwin"* ]]; then
PATH="/usr/local/opt/coreutils/libexec/gnubin:$PATH"
fi

PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:q:c:rspanvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,deep,help,vps' -n 'reconFTW' -- "$@")
PROGARGS=$(getopt -o 'd:m:l:x:i:o:f:q:c:rspanwvh::' --long 'domain:,list:,recon,subdomains,passive,all,web,osint,deep,help,vps' -n 'reconFTW' -- "$@")

# Note the quotes around "$PROGARGS": they are essential!
eval set -- "$PROGARGS"
Expand Down

0 comments on commit 71f6150

Please sign in to comment.