MCPcopy Create free account
hub / github.com/HunxByts/GhostTrack / IP_Track

Function IP_Track

GhostTR.py:41–77  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39# FUNCTIONS FOR MENU
40@is_option
41def IP_Track():
42 ip = input(f"{Wh}\n Enter IP target : {Gr}") # INPUT IP ADDRESS
43 print()
44 print(f' {Wh}============= {Gr}SHOW INFORMATION IP ADDRESS {Wh}=============')
45 req_api = requests.get(f"http://ipwho.is/{ip}") # API IPWHOIS.IS
46 ip_data = json.loads(req_api.text)
47 time.sleep(2)
48 print(f"{Wh}\n IP target :{Gr}", ip)
49 print(f"{Wh} Type IP :{Gr}", ip_data["type"])
50 print(f"{Wh} Country :{Gr}", ip_data["country"])
51 print(f"{Wh} Country Code :{Gr}", ip_data["country_code"])
52 print(f"{Wh} City :{Gr}", ip_data["city"])
53 print(f"{Wh} Continent :{Gr}", ip_data["continent"])
54 print(f"{Wh} Continent Code :{Gr}", ip_data["continent_code"])
55 print(f"{Wh} Region :{Gr}", ip_data["region"])
56 print(f"{Wh} Region Code :{Gr}", ip_data["region_code"])
57 print(f"{Wh} Latitude :{Gr}", ip_data["latitude"])
58 print(f"{Wh} Longitude :{Gr}", ip_data["longitude"])
59 lat = int(ip_data['latitude'])
60 lon = int(ip_data['longitude'])
61 print(f"{Wh} Maps :{Gr}", f"https://www.google.com/maps/@{lat},{lon},8z")
62 print(f"{Wh} EU :{Gr}", ip_data["is_eu"])
63 print(f"{Wh} Postal :{Gr}", ip_data["postal"])
64 print(f"{Wh} Calling Code :{Gr}", ip_data["calling_code"])
65 print(f"{Wh} Capital :{Gr}", ip_data["capital"])
66 print(f"{Wh} Borders :{Gr}", ip_data["borders"])
67 print(f"{Wh} Country Flag :{Gr}", ip_data["flag"]["emoji"])
68 print(f"{Wh} ASN :{Gr}", ip_data["connection"]["asn"])
69 print(f"{Wh} ORG :{Gr}", ip_data["connection"]["org"])
70 print(f"{Wh} ISP :{Gr}", ip_data["connection"]["isp"])
71 print(f"{Wh} Domain :{Gr}", ip_data["connection"]["domain"])
72 print(f"{Wh} ID :{Gr}", ip_data["timezone"]["id"])
73 print(f"{Wh} ABBR :{Gr}", ip_data["timezone"]["abbr"])
74 print(f"{Wh} DST :{Gr}", ip_data["timezone"]["is_dst"])
75 print(f"{Wh} Offset :{Gr}", ip_data["timezone"]["offset"])
76 print(f"{Wh} UTC :{Gr}", ip_data["timezone"]["utc"])
77 print(f"{Wh} Current Time :{Gr}", ip_data["timezone"]["current_time"])
78
79
80@is_option

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected