Merge branch 'feature/countryName' into develop

This commit is contained in:
sundowndev 2019-02-18 11:50:40 +01:00
commit e3b4778cd4
4 changed files with 46 additions and 68 deletions

File diff suppressed because one or more lines are too long

View File

@ -4,90 +4,84 @@
/ ___/| | | | (_) | | | | __/\/ /_ | | | | _| (_) | (_| | (_| | / ___/| | | | (_) | | | | __/\/ /_ | | | | _| (_) | (_| | (_| |
\/ |_| |_|\___/|_| |_|\___\____/ |_| |_|_| \___/ \__, |\__,_| \/ |_| |_|\___/|_| |_|\___\____/ |_| |_|_| \___/ \__, |\__,_|
|___/ |___/
PhoneInfoga Ver. v1.1.0-rc1 PhoneInfoga Ver. v1.0.0
Coded by Sundowndev Coded by Sundowndev
[!] ---- Fetching informations for 8562099453217 ---- [!] [!] ---- Fetching informations for 8562099453217 ---- [!]
[*] Running local scan... [-] Running local scan...
[+] International format: +856 20 99 453 217 [+] International format: +856 20 99 453 217
[+] Local format: 02099453217 [+] Local format: 02099453217
[+] Country code: +856 [+] Country found: Laos (+856)
[+] Location: Laos [+] City/Area: Laos
[+] Carrier: Unitel [+] Carrier: Unitel
[+] Area: Laos
[+] Timezone: Asia/Vientiane [+] Timezone: Asia/Vientiane
[*] The number is valid and possible. [-] The number is valid and possible.
[*] Scan finished. [-] Scan finished.
[!] ---- Fetching informations for 59172768361 ---- [!] [!] ---- Fetching informations for 59172768361 ---- [!]
[*] Running local scan... [-] Running local scan...
[+] International format: +591 72768361 [+] International format: +591 72768361
[+] Local format: 072768361 [+] Local format: 072768361
[+] Country code: +591 [+] Country found: Bolivia (+591)
[+] Location: Bolivia [+] City/Area: Bolivia
[+] Carrier: Entel [+] Carrier: Entel
[+] Area: Bolivia
[+] Timezone: America/La_Paz [+] Timezone: America/La_Paz
[*] The number is valid and possible. [-] The number is valid and possible.
[*] Scan finished. [-] Scan finished.
[!] ---- Fetching informations for 32474123456 ---- [!] [!] ---- Fetching informations for 32474123456 ---- [!]
[*] Running local scan... [-] Running local scan...
[+] International format: +32 474 12 34 56 [+] International format: +32 474 12 34 56
[+] Local format: 0474123456 [+] Local format: 0474123456
[+] Country code: +32 [+] Country found: Belgium (+32)
[+] Location: Belgium [+] City/Area: Belgium
[+] Carrier: Proximus [+] Carrier: Proximus
[+] Area: Belgium
[+] Timezone: Europe/Brussels [+] Timezone: Europe/Brussels
[*] The number is valid and possible. [-] The number is valid and possible.
[*] Scan finished. [-] Scan finished.
[!] ---- Fetching informations for 15417543010 ---- [!] [!] ---- Fetching informations for 15417543010 ---- [!]
[*] Running local scan... [-] Running local scan...
[+] International format: +1 541-754-3010 [+] International format: +1 541-754-3010
[+] Local format: 05417543010 [+] Local format: 05417543010
[+] Country code: +1 [+] Country found: United States (+1)
[+] Location: Corvallis, OR [+] City/Area: Corvallis, OR
[+] Carrier: [+] Carrier:
[+] Area: Corvallis, OR
[+] Timezone: America/Los_Angeles [+] Timezone: America/Los_Angeles
[*] The number is valid and possible. [-] The number is valid and possible.
[*] Scan finished. [-] Scan finished.
[!] ---- Fetching informations for 8659122848571 ---- [!] [!] ---- Fetching informations for 8659122848571 ---- [!]
[*] Running local scan... [-] Running local scan...
[+] International format: +86 591 2284 8571 [+] International format: +86 591 2284 8571
[+] Local format: 059122848571 [+] Local format: 059122848571
[+] Country code: +86 [+] Country found: China (+86)
[+] Location: Fuzhou, Fujian [+] City/Area: Fuzhou, Fujian
[+] Carrier: [+] Carrier:
[+] Area: Fuzhou, Fujian
[+] Timezone: Asia/Shanghai [+] Timezone: Asia/Shanghai
[*] The number is valid and possible. [-] The number is valid and possible.
[*] Scan finished. [-] Scan finished.
[!] ---- Fetching informations for 74964819375 ---- [!] [!] ---- Fetching informations for 74964819375 ---- [!]
[*] Running local scan... [-] Running local scan...
[+] International format: +7 496 481-93-75 [+] International format: +7 496 481-93-75
[+] Local format: 04964819375 [+] Local format: 04964819375
[+] Country code: +7 [+] Country found: Russia (+7)
[+] Location: Moscow [+] City/Area: Moscow
[+] Carrier: [+] Carrier:
[+] Area: Moscow
[+] Timezone: Europe/Moscow [+] Timezone: Europe/Moscow
[*] The number is valid and possible. [-] The number is valid and possible.
[*] Scan finished. [-] Scan finished.
[!] ---- Fetching informations for 39172768361 ---- [!] [!] ---- Fetching informations for 39172768361 ---- [!]
[*] Running local scan... [-] Running local scan...
[*] Scan finished. [-] Scan finished.

View File

@ -4,28 +4,27 @@
/ ___/| | | | (_) | | | | __/\/ /_ | | | | _| (_) | (_| | (_| | / ___/| | | | (_) | | | | __/\/ /_ | | | | _| (_) | (_| | (_| |
\/ |_| |_|\___/|_| |_|\___\____/ |_| |_|_| \___/ \__, |\__,_| \/ |_| |_|\___/|_| |_|\___\____/ |_| |_|_| \___/ \__, |\__,_|
|___/ |___/
PhoneInfoga Ver. v1.1.0-rc1 PhoneInfoga Ver. v1.0.0
Coded by Sundowndev Coded by Sundowndev
[!] ---- Fetching informations for 8659122848571 ---- [!] [!] ---- Fetching informations for 8659122848571 ---- [!]
[*] Running local scan... [-] Running local scan...
[+] International format: +86 591 2284 8571 [+] International format: +86 591 2284 8571
[+] Local format: 059122848571 [+] Local format: 059122848571
[+] Country code: +86 [+] Country found: China (+86)
[+] Location: Fuzhou, Fujian [+] City/Area: Fuzhou, Fujian
[+] Carrier: [+] Carrier:
[+] Area: Fuzhou, Fujian
[+] Timezone: Asia/Shanghai [+] Timezone: Asia/Shanghai
[*] The number is valid and possible. [-] The number is valid and possible.
[*] Running Numverify.com scan... [-] Running Numverify.com scan...
[+] Number: (+86) 059122848571 [+] Number: (+86) 059122848571
[+] Country: China (People's Republic of) (CN) [+] Country: China (People's Republic of) (CN)
[+] Location: Fuzhou [+] Location: Fuzhou
[+] Carrier: [+] Carrier:
[+] Line type: landline [+] Line type: landline
(!) This is most likely a landline, but it can still be a fixed VoIP number. (!) This is most likely a landline, but it can still be a fixed VoIP number.
[*] Running OVH scan... [-] Running OVH scan...
[*] Scan finished. [-] Scan finished.

View File

@ -264,18 +264,6 @@ def localScan(InputNumber):
numberCountryCode = phonenumbers.format_number( numberCountryCode = phonenumbers.format_number(
PhoneNumberObject, phonenumbers.PhoneNumberFormat.INTERNATIONAL).split(' ')[0] PhoneNumberObject, phonenumbers.PhoneNumberFormat.INTERNATIONAL).split(' ')[0]
try:
countries = json.load(open('data/CountryCodes.json'))
for country in countries:
if (country['dial_code'].replace(' ', '') == numberCountryCode):
print(code_info + 'Country code found: {} ({})'.format(country['name'],country['code']))
numberCountry = country['code']
break
except:
print(code_error + 'Unable to find country code.')
print(numberCountry)
localNumber = phonenumbers.format_number( localNumber = phonenumbers.format_number(
PhoneNumberObject, phonenumbers.PhoneNumberFormat.E164).replace(numberCountryCode, '') PhoneNumberObject, phonenumbers.PhoneNumberFormat.E164).replace(numberCountryCode, '')
internationalNumber = phonenumbers.format_number( internationalNumber = phonenumbers.format_number(
@ -283,11 +271,9 @@ def localScan(InputNumber):
print(code_result + 'International format: {}'.format(internationalNumber)) print(code_result + 'International format: {}'.format(internationalNumber))
print(code_result + 'Local format: 0{}'.format(localNumber)) print(code_result + 'Local format: 0{}'.format(localNumber))
print(code_result + 'Country code: {}'.format(numberCountryCode)) print(code_result + 'Country found: {} ({})'.format(geocoder.country_name_for_number(PhoneNumberObject, "en"), numberCountryCode))
print(code_result + 'Location: {}'.format(geocoder.description_for_number(PhoneNumberObject, "en"))) print(code_result + 'City/Area: {}'.format(geocoder.description_for_number(PhoneNumberObject, "en")))
print(code_result + print(code_result + 'Carrier: {}'.format(carrier.name_for_number(PhoneNumberObject, 'en')))
'Carrier: {}'.format(carrier.name_for_number(PhoneNumberObject, 'en')))
print(code_result + 'Area: {}'.format(geocoder.description_for_number(PhoneNumberObject, 'en')))
for timezoneResult in timezone.time_zones_for_number(PhoneNumberObject): for timezoneResult in timezone.time_zones_for_number(PhoneNumberObject):
print(code_result + 'Timezone: {}'.format(timezoneResult)) print(code_result + 'Timezone: {}'.format(timezoneResult))
@ -636,13 +622,13 @@ def scanNumber(InputNumber):
try: try:
if args.no_ansi or args.output: if args.no_ansi or args.output:
code_info = '[*] ' code_info = '[-] '
code_warning = '(!) ' code_warning = '(!) '
code_result = '[+] ' code_result = '[+] '
code_error = '[!] ' code_error = '[!] '
code_title = '' code_title = ''
else: else:
code_info = Fore.RESET + Style.BRIGHT + '[*] ' code_info = Fore.RESET + Style.BRIGHT + '[-] '
code_warning = Fore.YELLOW + Style.BRIGHT + '(!) ' code_warning = Fore.YELLOW + Style.BRIGHT + '(!) '
code_result = Fore.GREEN + Style.BRIGHT + '[+] ' code_result = Fore.GREEN + Style.BRIGHT + '[+] '
code_error = Fore.RED + Style.BRIGHT + '[!] ' code_error = Fore.RED + Style.BRIGHT + '[!] '