()
| 184 | |
| 185 | |
| 186 | def 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 | |
| 208 | if __name__ == "__main__": |
no test coverage detected