{"id":23897727,"url":"https://github.com/tkwonn/traceroute","last_synced_at":"2025-11-14T00:04:40.190Z","repository":{"id":264990358,"uuid":"894816397","full_name":"tkwonn/traceroute","owner":"tkwonn","description":"CLI Project #2","archived":false,"fork":false,"pushed_at":"2024-11-27T03:42:57.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-04T17:17:22.262Z","etag":null,"topics":["cli","icmp","network"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tkwonn.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-27T03:33:11.000Z","updated_at":"2024-12-02T11:52:38.000Z","dependencies_parsed_at":"2024-11-27T14:16:51.828Z","dependency_job_id":null,"html_url":"https://github.com/tkwonn/traceroute","commit_stats":null,"previous_names":["tkwonn/traceroute"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkwonn%2Ftraceroute","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkwonn%2Ftraceroute/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkwonn%2Ftraceroute/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tkwonn%2Ftraceroute/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tkwonn","download_url":"https://codeload.github.com/tkwonn/traceroute/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240286509,"owners_count":19777354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","icmp","network"],"created_at":"2025-01-04T17:17:27.982Z","updated_at":"2025-11-14T00:04:40.146Z","avatar_url":"https://github.com/tkwonn.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Traceroute\n\nWritten in Python using raw sockets, ICMP request, and reply messages.\n\n## traceroute.py\n\nTraceroute is a network diagnostic tool used to track the pathway taken by a packet on an IP network from source to destination. It records the IP addresses of all the routers it passes through until it reaches its destination or is discarded.  \nIn order to keep it simple, this program does not follow the official spec in RFC 1739. \n\n## Demo\n\n[![asciicast](https://asciinema.org/a/oBjkDptRGJcYiEp8sMAtmovxR.svg)](https://asciinema.org/a/oBjkDptRGJcYiEp8sMAtmovxR)\n\n## Instructions\n\nTo run traceroute.py: `sudo python3 traceroute.py [options] host`\n\n### Options\n\n- `-c, --count COUNT`: Number of packets to send per hop (default is 3).\n- `-m, --maxhops MAXHOPS`: Maximum number of hops (default is 64).\n- `-t, --timeout TIMEOUT`: Timeout in milliseconds for each reply (default is 4000 ms).\n- `-p, --packet_size PACKET_SIZE`: Packet size in bytes (default is 38 bytes).\n- `-d, --debug`: Enable debug mode for detailed output.\n\n## Features\n\n**Raw Socket Communication**  \nUtilizes raw sockets to send and receive ICMP packets, providing low-level network access.\n\n**TTL Manipulation**  \nAdjusts the Time To Live (TTL) field in the IP header to control how far the packet can travel in the network. By incrementing the TTL value starting from 1, the script discovers each router (hop) along the path to the destination.\n\n**ICMP Packet Construction**  \nManually constructs ICMP Echo Request packets, including headers and payload.\n\n**Packet Unpacking and Route Mapping**   \nReceives ICMP Time Exceeded and Echo Reply messages, parses the headers, and maps the route by extracting the IP addresses of intermediate routers.\n\n**Round-Trip Time Calculation**  \nMeasures the time taken for packets to reach the target and return, providing RTT statistics.\n\n\n## Environment\n\n```\n$ python3 --version\nPython 3.13.0\n\n$ uname\nDarwin\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkwonn%2Ftraceroute","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftkwonn%2Ftraceroute","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftkwonn%2Ftraceroute/lists"}