MCPcopy
hub / github.com/n0a/telegram-get-remote-ip / display_whois_info

Function display_whois_info

tg_get_ip.py:98–114  ·  view source on GitHub ↗

Display the fetched whois data.

(data)

Source from the content-addressed store, hash-verified

96
97
98def display_whois_info(data):
99 """Display the fetched whois data."""
100 if not data:
101 return
102
103 print(f"[!] Country: {data.get('country', 'N/A')}")
104 print(f"[!] Country Code: {data.get('countryCode', 'N/A')}")
105 print(f"[!] Region: {data.get('region', 'N/A')}")
106 print(f"[!] Region Name: {data.get('regionName', 'N/A')}")
107 print(f"[!] City: {data.get('city', 'N/A')}")
108 print(f"[!] Zip Code: {data.get('zip', 'N/A')}")
109 print(f"[!] Latitude: {data.get('lat', 'N/A')}")
110 print(f"[!] Longitude: {data.get('lon', 'N/A')}")
111 print(f"[!] Time Zone: {data.get('timezone', 'N/A')}")
112 print(f"[!] ISP: {data.get('isp', 'N/A')}")
113 print(f"[!] Organization: {data.get('org', 'N/A')}")
114 print(f"[!] AS: {data.get('as', 'N/A')}")
115
116
117def is_excluded_ip(ip):

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected