-
Notifications
You must be signed in to change notification settings - Fork 7
/
utils.py
62 lines (49 loc) · 2.16 KB
/
utils.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
55
56
57
58
59
60
61
62
import socket
import phonenumbers
import requests
from phonenumbers import geocoder
import os
import platform
def tool_name():
print('''
___ ____________
|%%%| |@@@@@@@@@@@@|
|%%%| ____ ___ _________ ____________ |@@@@________|
|%%%| |%%%%\ |%%%| |%%% _____| |%%%______%%%| |@@@|
|%%%| |%%%%%\ |%%%| |%%%|_____ |%%| |%%| |@@@| ___
|%%%| |%%%%%%\ |%%%| |%%%_____| |%%| |%%| |@@@| |@@@|
|%%%| |%%%|\%%\ |%%%| |%%%| |%%| |%%| |@@@|______|@@@|
|%%%| |%%%| \%%\ |%%%| |%%%| |%%|______|%%| |@@@@@@@@@@@@@@|
|___| |___| \_______| |___| |____________| |______________|By: Tech-Sec
For more visit: https://github/Tech-Sec
''')
def domain_name():
print(socket.gethostbyname(input('Domain name: ')))
def your_ip():
your_ip=requests.get('https://geolocation-db.com/json/').json()
print('Your public IP address: ',your_ip.get('IPv4'))
hostname = socket.gethostname()
ip_address = socket.gethostbyname(hostname)
print('Your device name: ',hostname)
print('Your private IP address ',ip_address)
def ip_lookup():
enter_ip = input('IP Address: ')
response = requests.get(f"https://geolocation-db.com/json/{enter_ip}&position=true").json()
for key, value in response.items():
print(key, ' : ', value)
def ph_num_lookup():
your_ph_num = input('Your Number: ')
phone_number = phonenumbers.parse(your_ph_num)
# put your phonenumber with the country code eg:+1xxxxxxxx
print(geocoder.description_for_number(phone_number,
'en'))
from phonenumbers import carrier
service_provider = phonenumbers.parse(your_ph_num)
# put your phonenumber with the country code eg:+1xxxxxxxx
print(carrier.name_for_number(service_provider,
'en'))
def ip_grabber():
if platform.system() == 'Windows':
print('IP-Grabber is not supported on Windows')
else:
os.system('cd IP-Grabber && sudo chmod 777 * && bash ip-grabber.sh')