Created
October 6, 2026 14:18
-
-
Save spencermacca/900a147e13181f9d2573a9df96b96c56 to your computer and use it in GitHub Desktop.
Toy Story 5 script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import argparse, socket | |
| import subprocess | |
| from eggman.pondnet import traceutils | |
| def get_ip_address(url): | |
| try: | |
| print(f"Resolving IP address for {url}...") | |
| hostname = url.split("://")[-1].split("/")[0] | |
| print (f"Resolving IP address of {hostname}...") | |
| ip_address = socket.gethostbyname(hostname) | |
| print(f"IP address of {hostname}: {ip_address}") | |
| return ip_address | |
| except socket.gaierror: | |
| print(f"Error: Unable to resolve IP address for {url}.") | |
| return None | |
| def launch_gps_tracker(ip_address): | |
| try: | |
| print(f"LAUNCHING GPS TRACKER for {ip_address}") | |
| result = subprocess.run([traceutils.gps_tracker, ip_address], capture_output=True, text=True, check=True) | |
| print(result.stdout) | |
| except FileNotFoundError: | |
| print(f"Error: gps-tracker program not found.") | |
| except subprocess.CalledProcessError as e: | |
| print("Error: gps-tracker encountered an issue.\n" + e.stderr) | |
| if __name__ == "__main__": | |
| parser = argparse.ArgumentParser(description="Resolve a URL to its physical address") | |
| parser.add_argument("url", help="The URL to resolve") | |
| args = parser.parse_args() | |
| ip_address = get_ip_address(args.url) | |
| if ip_address: | |
| launch_gps_tracker(ip_address) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment