{"id":23777561,"url":"https://github.com/potat-dev/networks-coursework-ping","last_synced_at":"2026-04-08T11:30:17.185Z","repository":{"id":269761613,"uuid":"905142855","full_name":"potat-dev/networks-coursework-ping","owner":"potat-dev","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-26T00:35:49.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-26T01:17:19.312Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/potat-dev.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-12-18T08:46:52.000Z","updated_at":"2024-12-26T00:35:52.000Z","dependencies_parsed_at":"2024-12-26T01:17:20.900Z","dependency_job_id":"bd0dbe6b-aedc-49eb-8180-97eb83e3dcd8","html_url":"https://github.com/potat-dev/networks-coursework-ping","commit_stats":null,"previous_names":["potat-dev/networks-coursework-ping"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potat-dev%2Fnetworks-coursework-ping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potat-dev%2Fnetworks-coursework-ping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potat-dev%2Fnetworks-coursework-ping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potat-dev%2Fnetworks-coursework-ping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/potat-dev","download_url":"https://codeload.github.com/potat-dev/networks-coursework-ping/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239971629,"owners_count":19727207,"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":[],"created_at":"2025-01-01T08:45:51.875Z","updated_at":"2026-04-08T11:30:17.108Z","avatar_url":"https://github.com/potat-dev.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ping Utility\n\nA custom ping implementation in Golang with flexible configuration options, supporting both ICMP and UDP protocols.\n\n## Features\n\n-   Support for ICMP and UDP ping protocols\n-   Customizable packet size\n-   Configurable ping count\n-   Adjustable timeout and interval\n-   Detailed ping statistics\n-   Output similar to standard ping utility\n-   Uses common UDP ports (53, 123, 8053, 33434) to increase the chance of receiving a response\n-   Sends a DNS query packet for UDP ping to elicit a response\n\n## Prerequisites\n\n-   Go 1.21 or higher\n-   Root/administrator privileges for raw socket access\n\n## Installation\n\n1. Clone the repository\n    ```bash\n    git clone https://github.com/yourusername/ping-utility.git\n    cd ping-utility\n    ```\n2. Install dependencies\n    ```bash\n    go mod tidy\n    ```\n\n## Usage\n\nRun the ping utility with default settings (ICMP to Google's DNS):\n\n```bash\nsudo go run cmd/ping/main.go\n```\n\nCommand-line options:\n\n```\n  -host string\n        Host to ping (default \"8.8.8.8\")\n  -count int\n        Number of ping attempts (default 4)\n  -size int\n        Size of ping packet (default 64)\n  -timeout duration\n        Timeout for each ping (default 2s)\n  -interval duration\n        Interval between pings (default 1s)\n  -protocol string\n        Ping protocol (icmp or udp) (default \"icmp\")\n  -port int\n        Port to use for UDP ping (default 33434)\n```\n\nExamples:\n\n1. ICMP Ping to Google's DNS:\n    ```bash\n    sudo go run cmd/ping/main.go -host 8.8.8.8\n    ```\n2. ICMP Ping with Custom Parameters:\n    ```bash\n    sudo go run cmd/ping/main.go -host google.com -count 5 -size 128 -timeout 3s\n    ```\n3. Basic UDP Ping:\n    ```bash\n    sudo go run cmd/ping/main.go -host 8.8.8.8 -protocol udp\n    ```\n4. UDP Ping with Custom Port:\n    ```bash\n    sudo go run cmd/ping/main.go -host 8.8.8.8 -protocol udp -port 53 -count 3\n    ```\n5. UDP Ping to a specific domain using DNS port:\n    ```bash\n    sudo go run cmd/ping/main.go -host google.com -protocol udp -port 53 -count 4\n    ```\n\n## Building\n\nTo build the executable:\n\n```bash\nmake build\n```\n\nThen run with:\n\n```bash\nsudo ./build/ping [options]\n```\n\n## Makefile Targets\n\n-   `build`: Builds the ping utility executable\n-   `clean`: Cleans up the build directory\n-   `test`: Runs tests\n-   `deps`: Installs dependencies\n-   `run`: Builds and runs the ping utility\n-   `install`: Installs the ping utility to /usr/local/bin\n\n## Limitations\n\n-   Requires root/administrator privileges\n-   Currently supports only IPv4\n-   UDP ping relies on the target host responding to specific types of UDP packets (DNS queries on common ports)\n\n## Troubleshooting\n\n-   If UDP ping shows 100% packet loss, the target host may not be responding to the UDP packets. Try different ports or hosts.\n-   Ensure you have the necessary privileges to run the utility (sudo or administrator).\n-   Check your network firewall settings, as they might be blocking ICMP or UDP packets.\n\n## Future Improvements\n\n-   Add IPv6 support\n-   Implement more detailed error messages\n-   Add more protocol options (e.g., TCP ping)\n-   Enhanced statistics and graphing\n-   Configurable UDP packet types\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotat-dev%2Fnetworks-coursework-ping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotat-dev%2Fnetworks-coursework-ping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotat-dev%2Fnetworks-coursework-ping/lists"}