-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlinex.py
54 lines (47 loc) · 1.87 KB
/
linex.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import json
import requests
import os
import time
import argparse
from colorama import Fore
parser = argparse.ArgumentParser()
parser.add_argument("-numero", type=str, required=True, help="Añadir numero de telefono")
args = parser.parse_args()
logo = f"""{Fore.BLUE}▄▀▀▀▀▄ ▄▀▀█▀▄ ▄▀▀▄ ▀▄ ▄▀▀█▄▄▄▄ ▄▀▀▄ ▄▀▄
█ █ █ █ █ █ █ █ █ ▐ ▄▀ ▐ █ █ █
▐ █ ▐ █ ▐ ▐ █ ▀█ █▄▄▄▄▄ ▐ ▀▄▀
█ █ █ █ █ ▌ ▄▀ █
▄▀▄▄▄▄▄▄▀ ▄▀▀▀▀▀▄ ▄▀ █ ▄▀▄▄▄▄ █ ▄▀
█ █ █ █ ▐ █ ▐ ▄▀ ▄▀
▐ ▐ ▐ ▐ ▐ █ ▐"""
with open('keys.json', 'r') as configuracion:
configuracion_dat = json.load(configuracion)
def info():
if os.name == "nt":
os.system("cls")
else:
os.system("clear")
numero = args.numero
print(logo)
print(f'{Fore.YELLOW}\n[~] Escaneando: {numero}...')
time.sleep(2)
payload = {}
headers = {
"apikey": configuracion_dat['key']
}
api = f"https://api.apilayer.com/number_verification/validate?number={numero}"
try:
data = requests.request("GET", api, headers=headers, data = payload).json()
if data['valid'] == False:
print(f'{Fore.RED}\n[!] El numero no es valido!')
else:
print(f'{Fore.GREEN}\n[~] Numero: ', data['number'])
print('[~] Codigo del pais: ', data['country_code'])
print('[~] Nombre del pais: ', data['country_name'])
print('[~] Ubicacion: ', data['location'])
print('[~] Transportador: ', data['carrier'])
except Exception as e:
print(f'{Fore.RED}\n[!] Ocurrio un error: {e}')
exit()
if __name__ == "__main__":
info()