Skip to content

Commit

Permalink
Update main.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Euronymou5 authored Apr 13, 2024
1 parent d3cfd6c commit 15ffb37
Showing 1 changed file with 168 additions and 69 deletions.
237 changes: 168 additions & 69 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,40 @@
# https://github.com/Euronymou5
# https://twitter.com/Euronymou51

import os
import opencage
import requests
import argparse
from colorama import Fore
from opencage.geocoder import OpenCageGeocode
import phonenumbers
import json
from phonenumbers import geocoder
import requests
from phonenumbers import geocoder, carrier, timezone
import os
from googlesearch import search
import subprocess
import json
import random
import time
from colorama import Fore
import sys

parser = argparse.ArgumentParser()
parser.add_argument("-phoneinfoga", action="store_true", help="Añadir escaneo de la tool phoneinfoga.")
parser.add_argument("-numero", "-n", type=str, help="Agregar numero telefonico.")
parser.add_argument("-phonenumbers", action="store_true", help="Añadir escaneo de la libreria phonenumbers.")
parser.add_argument("-numverify", action="store_true", help="Agregar escaneo de numverify.")
parser.add_argument("-opencage", action="store_true", help="Agregar escaneo con opencage.")
parser.add_argument("-abstract", action="store_true", help="Agregar escaneo con abstract api.")
parser.add_argument("-veriphone", action="store_true", help="Agregar escaneo con VeriPhone.")
parser.add_argument("-dork", type=int, help="Agregar escaneo con google dorks.")
args = parser.parse_args()

logo = f"""{Fore.MAGENTA}
██████ █████ ██████ ██ ██ ██ ██ ██ ██ ██████ ██████ ██████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ███████ ██████ █████ █████ ███████ ████ ██ ██ ██████ ██ ██
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██████ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██████ ██ ██ ██████
"""
{Fore.LIGHTRED_EX} |By: Euronymou5|
"""

with open('config.json', 'r') as configuracion:
configuracion_dat = json.load(configuracion)
Expand All @@ -31,66 +46,150 @@ def clear():
else:
os.system("clear")


def menu():
clear()
print(logo)
dom = ["com","com.tw","co.in","be","de","co.uk","co.ma","dz","ru","ca"]
numero = input(f'{Fore.BLUE}[~] Ingresa un numero telefonico: ')
time.sleep(2)
# ---- NumVerify ----- #
api = f"https://api.apilayer.com/number_verification/validate?number={numero}"
try:
key = configuracion_dat['Numverifykey']
apikey = {
"apikey": key,
}
payload = {}
lol = requests.request("GET", api, headers=apikey, data = payload).json()
if lol['valid'] == False:
print(f'{Fore.RED}\n[!] El numero no es valido!')
exit()
def scan():
clear()
print(logo)
numero = args.numero

# ---Numverify
if args.numverify:
print(f'{Fore.BLUE}\n[~] Realizando escaneo con numverify...')
time.sleep(2)
api = f"https://api.apilayer.com/number_verification/validate?number={numero}"
try:
key = configuracion_dat['Numverifykey']
apikey = {
"apikey": key,
}

payload = {}
lol = requests.request("GET", api, headers=apikey, data = payload).json()

if lol['valid'] == False:
print(f'{Fore.RED}\n[!] El numero no es valido!')
sys.exit(1)
else:
print(f'{Fore.GREEN}\n[~] Numero: ', lol['number'])
print('[~] Codigo del pais: ', lol['country_code'])
print('[~] Nombre del pais: ', lol['country_name'])
print('[~] Ubicacion: ', lol['location'])
print('[~] Transportador: ', lol['carrier'])

except Exception as e:
print(f'{Fore.RED}\n[!] ERROR: {e}')
# Abstract api
if args.abstract:
print(f'{Fore.BLUE}\n[~] Realizando escaneo con Abstract API...')
time.sleep(2)

url = f"https://phonevalidation.abstractapi.com/v1/?api_key={configuracion_dat['Abstract']}&phone={numero}"

try:
r = requests.get(url)
except Exception as e:
print(f"{Fore.RED}[!] ERROR: {e}")

var = r.json()
if var["valid"] == False:
print(f'\n{Fore.RED}[!] ERROR: El numero no es valido.')
else:
print(f'{Fore.GREEN}\n[~] Numero: {var["format"]["international"]}')
print(f'{Fore.GREEN}[~] Codigo de pais: {var["country"]["code"]}')
print(f'{Fore.GREEN}[~] Pais: {var["country"]["name"]}')
print(f'{Fore.GREEN}[~] Ubicacion: {var["location"]}')
print(f'{Fore.GREEN}[~] Tipo de linea: {var["type"]}')
print(f'{Fore.GREEN}[~] Transportador: {var["carrier"]}')
# --- VeriPhone
if args.veriphone:
print(f'{Fore.BLUE}\n[~] Realizando escaneo con VeriPhone...')
time.sleep(2)
pag = f"https://api.veriphone.io/v2/verify?phone={numero}&key={configuracion_dat['VeriPhone']}"

try:
r = requests.get(pag)
except Exception as e:
print(f"{Fore.RED}[!] ERROR: {e}")

var = r.json()
if var["phone_valid"] == False:
print(f'\n{Fore.RED}[!] ERROR: El numero no es valido.')
else:
print(f'{Fore.GREEN}\n[~] Numero: {var["format"]["international"]}')
print(f'[~] Tipo de linea: {var["phone_type"]}')
print(f'[~] Región del teléfono: {var["phone_region"]}')
print(f'[~] Pais: {var["country"]}')
print(f'[~] Codigo de pais: {var["country_code"]}')
print(f'[~] Formato internacional: {var["international_number"]}')
print(f'[~] Formato local: {var["local_number"]}')
print(f'[~] Transportador: {var["carrier"]}')
# -- Phonenumbers
if args.phonenumbers:
print(f'{Fore.BLUE}\n[~] Realizando escaneo con PhoneNumbers...')
time.sleep(2)

phone = phonenumbers.parse(numero)
international = phonenumbers.format_number(phone, phonenumbers.PhoneNumberFormat.INTERNATIONAL)
countrycode = international.split(' ')[0]
country = geocoder.country_name_for_number(phone, 'en')
location = geocoder.description_for_number(phone, 'en')
carrierr = carrier.name_for_number(phone, 'en')

print(f'\n{Fore.GREEN}[~] Formato internacional: {international}')
print(f'[~] Nombre del país: {country} ({countrycode})')
print(f'[~] Ciudad / Provincia: {location}')
print(f'[~] Transportador: {carrierr}')
for tiempo in timezone.time_zones_for_number(phone):
print(f'[~] Zona horaria: {tiempo}')
print('\n[~] Escaneo completo.')
# Opencage
if args.opencage:
print(f'{Fore.BLUE}\n[~] Realizando escaneo con Opencage...')
time.sleep(2)

geo = OpenCageGeocode(configuracion_dat['OpencageKey'])
num = phonenumbers.parse(numero)
location = geocoder.description_for_number(num, 'en')
query = str(location)
results = geo.geocode(query)

lat = results[0]['geometry']['lat']
lng = results[0]['geometry']['lng']

print(f'\n{Fore.GREEN}[~] Municipio: {location}')
print(f'[~] Latitud: {lat}')
print(f'[~] Longitud: {lng}')
# Phonenumbers
if args.phoneinfoga:
print(f'{Fore.BLUE}\n[~] Realizando escaneo con Phoneinfoga...')
time.sleep(2)

subprocess.run(["./phoneinf/phoneinfoga", "scan", "-n", f"{numero}"])
# Dorking
if args.dork:
print(f'{Fore.BLUE}\n[~] Realizando escaneo con Google dorking...')
valor_entero = args.dork
dom = ["com","com.tw","co.in","be","de","co.uk","co.ma","dz","ru","ca"]
tld = random.choice(dom)
dork_list = [f"intext:{numero}", f"intext:{numero} filetype:pdf", f"site:facebook.com intext:{numero}", f"site:twitter.com intext:{numero}", f"site:instagram.com intext:{numero}"]

for dorks in dork_list:
resultados = search(dorks, tld, num=valor_entero, stop=valor_entero, pause=valor_entero)
for resultados_obtenidos in resultados:
print(f'{Fore.GREEN}\n[ ✔ ] Busqueda encontrada!: {resultados_obtenidos}')
else:
print('\n[~] Numero: ', lol['number'])
print('[~] Codigo del pais: ', lol['country_code'])
print('[~] Nombre del pais: ', lol['country_name'])
print('[~] Ubicacion: ', lol['location'])
print('[~] Transportador: ', lol['carrier'])
except KeyError:
print(f'{Fore.RED}\n[!] A ocurrido un error.')
# --- Opencage --- #
geo = OpenCageGeocode(configuracion_dat['OpencageKey'])
phone = phonenumbers.parse(numero)
location = geocoder.description_for_number(phone, 'en')
query = str(location)
results = geo.geocode(query)
lat = results[0]['geometry']['lat']
lng = results[0]['geometry']['lng']
# --- Phonenumbers --- #
print(f'\n[~] Municipio: {location}')
print(f'[~] Latitud: {lat}')
print(f'[~] Longitud: {lng}')
# --- Dorking --- #
print('\n[~] Realizando busqueda con dorking...')
time.sleep(2)
tld = random.choice(dom)
command = f'intext:{numero}'
command2 = f"site:@ filetype:PDF intext:{numero}"
command3 = f"site:facebook.com intext:{numero}"
command4 = f"site:twitter.com intext:{numero}"
command5 = f"site:instagram.com intext:{numero}"
for j in search(command, tld, num=10, stop=10, pause=2):
print(f'{Fore.GREEN}\nResultados encontrados!: {j}')
print('\n[~] Buscando numero telefonico en archivos pdf...')
for i in search(command2, tld, num=10, stop=10, pause=2):
print(f'\nResultados encontrados!: {i}')
print('\n[~] Buscando numero telefonico en redes sociales..')
for a in search(command3, tld, num=10, stop=10, pause=2):
print(f'\nResultados encontrados!: {a}')
for b in search(command4, tld, num=10, stop=10, pause=2):
print(f'\nResultados encontrados!: {b}')
for c in search(command5, tld, num=10, stop=10, pause=2):
print(f'\nResultados encontrados!: {c}')


menu()
print(f'''{Fore.RED}[!] ERROR: Debes agregar algun argumento de escaneo:
-phoneinfoga Añadir escaneo de la tool phoneinfoga.
-phonenumbers Añadir escaneo de la libreria phonenumbers.
-numverify Añadir escaneo de numverify.
-opencage Añadir escaneo con opencage.
-abstract Añadir escaneo con abstract api.
-veriphone Añadir escaneo con VeriPhone.
-dork Añadir escaneo con google dorking.
''')

if args.numero:
scan()
else:
print(f'{Fore.RED}[!] ERROR: Debes de ingresar un numero telefonico.\n[~] Ejemplo: python3 main.py -n <numero>')
sys.exit(1)

0 comments on commit 15ffb37

Please sign in to comment.