diff --git a/examples/generate.sh b/examples/generate.sh new file mode 100755 index 0000000..5c80ca2 --- /dev/null +++ b/examples/generate.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +scriptDir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")") + +python3 $scriptDir/../phoneinfoga.py -i $scriptDir/input.txt -o $scriptDir/output_from_input.txt -s any + +python3 $scriptDir/../phoneinfoga.py -n "+86 591 2284 8571" -s all -o $scriptDir/output_single.txt diff --git a/examples/output_from_input.txt b/examples/output_from_input.txt new file mode 100644 index 0000000..b69dc92 --- /dev/null +++ b/examples/output_from_input.txt @@ -0,0 +1,93 @@ + ___ _ _____ __ + / _ \ |__ ___ _ __ ___ \_ \_ __ / _| ___ __ _ __ _ + / /_)/ '_ \ / _ \| '_ \ / _ \ / /\/ '_ \| |_ / _ \ / _` |/ _` | + / ___/| | | | (_) | | | | __/\/ /_ | | | | _| (_) | (_| | (_| | + \/ |_| |_|\___/|_| |_|\___\____/ |_| |_|_| \___/ \__, |\__,_| + |___/ + PhoneInfoga Ver. v1.0.0-rc2 + Coded by Sundowndev + + +[!] ---- Fetching informations for 8562099453217 ---- [!] +[*] Running local scan... +[+] International format: +856 20 99 453 217 +[+] Local format: 02099453217 +[+] Country code: +856 +[+] Location: Laos +[+] Carrier: Unitel +[+] Area: Laos +[+] Timezone: Asia/Vientiane +[*] The number is valid and possible. +[*] Scan finished. + + +[!] ---- Fetching informations for 59172768361 ---- [!] +[*] Running local scan... +[+] International format: +591 72768361 +[+] Local format: 072768361 +[+] Country code: +591 +[+] Location: Bolivia +[+] Carrier: Entel +[+] Area: Bolivia +[+] Timezone: America/La_Paz +[*] The number is valid and possible. +[*] Scan finished. + + +[!] ---- Fetching informations for 32474123456 ---- [!] +[*] Running local scan... +[+] International format: +32 474 12 34 56 +[+] Local format: 0474123456 +[+] Country code: +32 +[+] Location: Belgium +[+] Carrier: Proximus +[+] Area: Belgium +[+] Timezone: Europe/Brussels +[*] The number is valid and possible. +[*] Scan finished. + + +[!] ---- Fetching informations for 15417543010 ---- [!] +[*] Running local scan... +[+] International format: +1 541-754-3010 +[+] Local format: 05417543010 +[+] Country code: +1 +[+] Location: Corvallis, OR +[+] Carrier: +[+] Area: Corvallis, OR +[+] Timezone: America/Los_Angeles +[*] The number is valid and possible. +[*] Scan finished. + + +[!] ---- Fetching informations for 8659122848571 ---- [!] +[*] Running local scan... +[+] International format: +86 591 2284 8571 +[+] Local format: 059122848571 +[+] Country code: +86 +[+] Location: Fuzhou, Fujian +[+] Carrier: +[+] Area: Fuzhou, Fujian +[+] Timezone: Asia/Shanghai +[*] The number is valid and possible. +[*] Scan finished. + + +[!] ---- Fetching informations for 74964819375 ---- [!] +[*] Running local scan... +[+] International format: +7 496 481-93-75 +[+] Local format: 04964819375 +[+] Country code: +7 +[+] Location: Moscow +[+] Carrier: +[+] Area: Moscow +[+] Timezone: Europe/Moscow +[*] The number is valid and possible. +[*] Scan finished. + + +[!] ---- Fetching informations for 39172768361 ---- [!] +[*] Running local scan... +[*] Scan finished. + + diff --git a/examples/output_single.txt b/examples/output_single.txt new file mode 100644 index 0000000..8fe1664 --- /dev/null +++ b/examples/output_single.txt @@ -0,0 +1,31 @@ + ___ _ _____ __ + / _ \ |__ ___ _ __ ___ \_ \_ __ / _| ___ __ _ __ _ + / /_)/ '_ \ / _ \| '_ \ / _ \ / /\/ '_ \| |_ / _ \ / _` |/ _` | + / ___/| | | | (_) | | | | __/\/ /_ | | | | _| (_) | (_| | (_| | + \/ |_| |_|\___/|_| |_|\___\____/ |_| |_|_| \___/ \__, |\__,_| + |___/ + PhoneInfoga Ver. v1.0.0-rc2 + Coded by Sundowndev + + +[!] ---- Fetching informations for 8659122848571 ---- [!] +[*] Running local scan... +[+] International format: +86 591 2284 8571 +[+] Local format: 059122848571 +[+] Country code: +86 +[+] Location: Fuzhou, Fujian +[+] Carrier: +[+] Area: Fuzhou, Fujian +[+] Timezone: Asia/Shanghai +[*] The number is valid and possible. +[*] Running Numverify.com scan... +[+] Number: (+86) 059122848571 +[+] Country: China (People's Republic of) (CN) +[+] Location: Fuzhou +[+] Carrier: +[+] Line type: landline +(!) This is most likely a landline, but it can still be a fixed VoIP number. +[*] Running OVH scan... +[*] Scan finished. + + diff --git a/phoneinfoga.py b/phoneinfoga.py index 0fbf0ec..e36846b 100644 --- a/phoneinfoga.py +++ b/phoneinfoga.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -__version__ = 'v1.0.0-rc2' +__version__ = 'v1.1.0-rc1' try: import sys @@ -147,7 +147,7 @@ uagent.append("Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:63.0) Gecko/20100101 F number = '' # Full number format localNumber = '' # Local number format -internationalNumber = '' # International numberformat +internationalNumber = '' # International number format numberCountryCode = '' # Dial code; e.g:"+33" numberCountry = '' # Country; e.g:France @@ -464,10 +464,10 @@ def osintScan(): # Documents print((code_info + "Searching for documents... (limit=10)")) if customFormatting: - req = 'intext:"{}" | intext:"{}" | intext:"{}" ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt'.format(number,internationalNumber,customFormatting) + req = '[ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt | ext:xls && intext:"{}"]'.format(customFormatting) else: - req = 'intext:"{}" | intext:"{}" ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt'.format(number,internationalNumber) - for result in search('intext:"{}" | intext:"{}" ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt'.format(number,internationalNumber), stop=10): + req = '[ext:doc | ext:docx | ext:odt | ext:pdf | ext:rtf | ext:sxw | ext:psw | ext:ppt | ext:pptx | ext:pps | ext:csv | ext:txt | ext:xls && intext:"{}" | intext:"{}"]'.format(number,internationalNumber) + for result in search(req, stop=10): if result: print((code_result + "Result found: " + result)) @@ -482,14 +482,17 @@ def osintScan(): if tmpNumAsk.lower() != 'n' and tmpNumAsk.lower() != 'no': print((code_info + '---- Temporary number providers footprints ----')) - - print((code_info + "Searching for phone number on tempophone.com...")) - response = requests.request("GET", "https://tempophone.com/api/v1/phones") - data = json.loads(response.content) - for voip_number in data['objects']: - if voip_number['phone'] == formatNumber(number): - print((code_result + "Found a temporary number provider: tempophone.com")) - askForExit() + + try: + print((code_info + "Searching for phone number on tempophone.com...")) + response = requests.request("GET", "https://tempophone.com/api/v1/phones") + data = json.loads(response.content) + for voip_number in data['objects']: + if voip_number['phone'] == formatNumber(number): + print((code_result + "Found a temporary number provider: tempophone.com")) + askForExit() + except: + print((code_error + "Unable to reach tempophone.com API. Skipping.")) osintDisposableNumScan()