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

Function main

tg_get_ip.py:186–205  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

184
185
186def main():
187 try:
188 check_tshark_availability()
189 args = parse_arguments()
190
191 if args.interface:
192 interface_name = args.interface
193 else:
194 interface_name = choose_interface()
195
196 address = extract_stun_xor_mapped_address(interface_name)
197 if address:
198 print(f"[+] SUCCESS! IP Address: {address}")
199 whois_data = get_whois_info(address)
200 display_whois_info(whois_data)
201 else:
202 print("[!] Couldn't determine the IP address of the peer.")
203 except (KeyboardInterrupt, EOFError):
204 print("\n[+] Exiting gracefully...")
205 pass
206
207
208if __name__ == "__main__":

Callers 1

tg_get_ip.pyFile · 0.85

Calls 6

parse_argumentsFunction · 0.85
choose_interfaceFunction · 0.85
get_whois_infoFunction · 0.85
display_whois_infoFunction · 0.85

Tested by

no test coverage detected