コード例 #1
0
def Phonenumber(ph):
		print ('[+]' + ' Fetching Phonenumber Details...' + '\n')
		apikey=phoneapis()
		if apikey == "":
				print("Add you phoneapis api key to src/api.py")
				exit()
		ph=''.join([i for i in ph if i.isdigit()])
		for api_key in apikey.split(","):
			url = ("http://apilayer.net/api/validate?access_key="+api_key+"&number="+str(ph))
			try:
				response=requests.get(url)
				if 'error' in response.json().keys():
					continue
				elif response.json()['valid']==False:
					print("Error: Invalid Mobile Number")
					return
				else:
					get=response.json()
					print("Number: "+get['number'])
					print("Type: "+get['line_type'])
					print("CountryCode: "+get['country_code'])
					print("Country: "+get['country_name'])
					print("Location: "+get['location'])
					print("Carrier: "+get['carrier'])
					print("")
					return 
			except:
				continue
		print(str(response.json()['error']['info']).split(".")[0])
				
コード例 #2
0
def Phonenumber(ph):
    print(R + " [ + ]" + C + " Получение сведений о телефонном номере..." + C +
          "\n")
    apikey = phoneapis()
    if apikey == "":
        print(C + " Добавьте ключ API phoneapis")
        exit()
    ph = "".join([i for i in ph if i.isdigit()])
    for api_key in apikey.split(","):
        url = ("http://apilayer.net/api/validate?access_key=" + api_key +
               "&number=" + str(ph))
        try:
            response = requests.get(url)
            if "error" in response.json().keys():
                continue
            elif response.json()["valid"] == False:
                print(C + " Ошибка: неверный номер мобильного телефона")
                return
            else:
                get = response.json()
                print(R + " [ + ]" + C + " Сам номер: " + get["number"])
                print(R + " [ + ]" + C + " Тип: " + get["line_type"])
                print(R + " [ + ]" + C + " Код страны: " + get["country_code"])
                print(R + " [ + ]" + C + " Страна: " + get["country_name"])
                print(R + " [ + ]" + C + " Геолокация: " + get["location"])
                print(R + " [ + ]" + C + " Оператор: " + get["carrier"])
                print("")
                return
        except:
            continue
    print(str(response.json()["error"]["info"]).split(".")[0])
コード例 #3
0
ファイル: Phonenumber.py プロジェクト: Divarion-D/OSINT-SAN
def Phonenumber(ph):
    print(R + '[ + ]' + C + ' Получение сведений о телефонном номере...' + C +
          '\n')
    apikey = phoneapis()
    if apikey == "":
        print("Add you phoneapis api key to src/api.py")
        exit()
    ph = ''.join([i for i in ph if i.isdigit()])
    for api_key in apikey.split(","):
        url = ("http://apilayer.net/api/validate?access_key=" + api_key +
               "&number=" + str(ph))
        try:
            response = requests.get(url)
            if 'error' in response.json().keys():
                continue
            elif response.json()['valid'] == False:
                print("Error: Invalid Mobile Number")
                return
            else:
                get = response.json()
                print(R + "[ + ] Сам номер: " + get['number'])
                print(R + "[ + ] Тип: " + get['line_type'])
                print(R + "[ + ] Код страны: " + get['country_code'])
                print(R + "[ + ] Страна: " + get['country_name'])
                print(R + "[ + ] Геолокация: " + get['location'])
                print(R + "[ + ] Оператор: " + get['carrier'])
                print("")
                return
        except:
            continue
    print(str(response.json()['error']['info']).split(".")[0])
コード例 #4
0
def Phonenumber(ph):
    print ('[+]' + ' Fetching Phonenumber Details...' + '\n')
    api_key=phoneapis()
    if api_key == "":
        print("Add you phoneapis api key to src/api.py")
        exit()
    url = ("http://apilayer.net/api/validate?access_key="+api_key+"&number="+str(ph))
    response=requests.get(url)
    try:
        if "91" not in str(ph):
            print("Error: CountryCode is missing")
        else:
            if response.status_code ==200:
                get=response.json()
                print("Number: "+get['number'])
                print("Type: "+get['line_type'])
                print("CountryCode: "+get['country_code'])
                print("Country: "+get['country_name'])
                print("Location: "+get['location'])
                print("Carrier: "+get['carrier'])
                print("")
            else:
                print("Error: Invalid Mobile Number")
    except:
        print(str(response.json()['error']['info']).split(".")[0])