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
ipinfo improved
six2dez48a663812c58
diff --git a/reconftw.sh b/reconftw.shindex 054f7d7..e443f60 100755--- a/reconftw.sh+++ b/reconftw.sh@@ -1478,7 +1478,7 @@ function geo_info() {mkdir -p hostsif { [[ ! -f "$called_fn_dir/.${FUNCNAME[0]}" ]] || [[ $DIFF == true ]]; } && [[ $GEO_INFO == true ]]; then- start_func ${FUNCNAME[0]} "Running: ipinfo and geoinfo"+ start_func ${FUNCNAME[0]} "Running: ipinfo"ips_file="${dir}/hosts/ips.txt"if [ ! -f $ips_file ]; thenif ! [[ $domain =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9] ]]; then@@ -1489,46 +1489,12 @@ function geo_info() {echo $domain | grep -aEiv "^(127|10|169\.154|172\.1[6789]|172\.2[0-9]|172\.3[01]|192\.168)\." | grep -oE "\b([0-9]{1,3}\.){3}[0-9]{1,3}\b" | anew -q hosts/ips.txtfielse+ touch ${dir}/hosts/ipinfo.txtfor ip in $(cat "$ips_file"); do- json_output=$(curl -s https://ipapi.co/$ip/json)- echo $json_output >>${dir}/hosts/geoip.json- ip=$(echo $json_output | jq '.ip' | tr -d '''"''')- network=$(echo $json_output | jq '.network' | tr -d '''"''')- city=$(echo $json_output | jq '.city' | tr -d '''"''')- region=$(echo $json_output | jq '.region' | tr -d '''"''')- country=$(echo $json_output | jq '.country' | tr -d '''"''')- country_name=$(echo $json_output | jq '.country_name' | tr -d '''"''')- country_code=$(echo $json_output | jq '.country_code' | tr -d '''"''')- country_code_iso3=$(echo $json_output | jq '.country_code_iso3' | tr -d '''"''')- country_tld=$(echo $json_output | jq '.country_tld' | tr -d '''"''')- continent_code=$(echo $json_output | jq '.continent_code' | tr -d '''"''')- latitude=$(echo $json_output | jq '.latitude' | tr -d '''"''')- longitude=$(echo $json_output | jq '.longitude' | tr -d '''"''')- timezone=$(echo $json_output | jq '.timezone' | tr -d '''"''')- utc_offset=$(echo $json_output | jq '.utc_offset' | tr -d '''"''')- asn=$(echo $json_output | jq '.asn' | tr -d '''"''')- org=$(echo $json_output | jq '.org' | tr -d '''"''')-- echo "IP: $ip" >>${dir}/hosts/geoip.txt- echo "Network: $network" >>${dir}/hosts/geoip.txt- echo "City: $city" >>${dir}/hosts/geoip.txt- echo "Region: $region" >>${dir}/hosts/geoip.txt- echo "Country: $country" >>${dir}/hosts/geoip.txt- echo "Country Name: $country_name" >>${dir}/hosts/geoip.txt- echo "Country Code: $country_code" >>${dir}/hosts/geoip.txt- echo "Country Code ISO3: $country_code_iso3" >>${dir}/hosts/geoip.txt- echo "Country tld: $country_tld" >>${dir}/hosts/geoip.txt- echo "Continent Code: $continent_code" >>${dir}/hosts/geoip.txt- echo "Latitude: $latitude" >>${dir}/hosts/geoip.txt- echo "Longitude: $longitude" >>${dir}/hosts/geoip.txt- echo "Timezone: $timezone" >>${dir}/hosts/geoip.txt- echo "UTC Offset: $utc_offset" >>${dir}/hosts/geoip.txt- echo "ASN: $asn" >>${dir}/hosts/geoip.txt- echo "ORG: $org" >>${dir}/hosts/geoip.txt- echo -e "------------------------------\n" >>${dir}/hosts/geoip.txt+ curl -s https://ipinfo.io/widget/demo/$ip >> ${dir}/hosts/ipinfo.txtdonefi- end_func "Results are saved in hosts/geoip.txt and hosts/geoip.json" ${FUNCNAME[0]}+ end_func "Results are saved in hosts/ipinfo.txt" ${FUNCNAME[0]}elseif [[ $GEO_INFO == false ]]; thenprintf "\n${yellow}[$(date +'%Y-%m-%d %H:%M:%S')] ${FUNCNAME[0]} skipped in this mode or defined in reconftw.cfg ${reset}\n"