{"id":24953375,"url":"https://github.com/iamfarrokhnejad/anteater","last_synced_at":"2025-03-28T19:46:03.888Z","repository":{"id":239515143,"uuid":"799748039","full_name":"IAmFarrokhnejad/Anteater","owner":"IAmFarrokhnejad","description":"A port scanner using Rust","archived":false,"fork":false,"pushed_at":"2024-10-20T22:47:53.000Z","size":31559,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-03T03:35:01.579Z","etag":null,"topics":["functional","functional-programming","network-monitoring","network-programming","rust","rust-lang"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IAmFarrokhnejad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-05-13T02:42:31.000Z","updated_at":"2025-01-02T01:27:40.000Z","dependencies_parsed_at":"2024-05-15T21:25:25.426Z","dependency_job_id":"3d939a05-4736-4804-8593-478d610a2fbd","html_url":"https://github.com/IAmFarrokhnejad/Anteater","commit_stats":null,"previous_names":["iamfarrokhnejad/anteater"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmFarrokhnejad%2FAnteater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmFarrokhnejad%2FAnteater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmFarrokhnejad%2FAnteater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IAmFarrokhnejad%2FAnteater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IAmFarrokhnejad","download_url":"https://codeload.github.com/IAmFarrokhnejad/Anteater/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246093097,"owners_count":20722395,"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":["functional","functional-programming","network-monitoring","network-programming","rust","rust-lang"],"created_at":"2025-02-03T03:35:32.864Z","updated_at":"2025-03-28T19:46:03.859Z","avatar_url":"https://github.com/IAmFarrokhnejad.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Anteater\n\n\n\nThis project implements a multi-threaded port scanner in Rust, utilizing asynchronous programming with `Tokio` for concurrency. The scanner supports both TCP and UDP protocols, service detection, banner grabbing, rate limiting, and can handle large scans efficiently by leveraging concurrency controls.\n\n## Key Features\n\n- **Target Resolution**: Supports scanning a target defined by IP address, hostname, or CIDR notation. It also resolves hostnames to IP addresses and supports both IPv4 and IPv6.\n- **TCP and UDP Scanning**: The scanner can probe TCP and UDP ports to check if they are open, closed, or filtered. \n- **Banner Grabbing**: Optionally grabs service banners from open ports for further identification.\n- **Service Detection**: Attempts to detect common services (like HTTP, FTP) running on specific ports.\n- **Rate Limiting**: Implements a custom rate limiter to control the scan speed (packets per second), ensuring scans are not too aggressive.\n- **Concurrency**: Configurable concurrency settings allow controlling the number of ports to be scanned simultaneously.\n- **Timeouts**: Scans have customizable timeouts for determining port state.\n- **Interface Selection**: Supports selecting specific network interfaces for scanning.\n- **Output**: Results can be printed to the console or saved to a file in plain text or JSON format.\n\n## Command-Line Arguments\n\nThe scanner accepts a wide range of arguments to customize its behavior:\n\n- `--target/-t` (required): Specifies the target (IP, hostname, or CIDR).\n- `--start-port/-s`: Starting port for the scan (default is 1).\n- `--end-port/-e`: Ending port for the scan (default is 65535).\n- `--timeout`: Timeout in seconds for each port scan (default is 3 seconds).\n- `--verbose/-v`: Prints detailed information about all ports, including closed ones.\n- `--concurrency/-c`: Sets the number of concurrent port scans (default is 100).\n- `--output/-o`: File path to save scan results.\n- `--json-output/-j`: Outputs scan results in JSON format.\n- `--service-detection/-d`: Enables service detection on well-known ports.\n- `--banner-grabbing/-b`: Enables grabbing banners from open ports.\n- `--udp/-u`: Enables UDP scanning.\n- `--interface/-i`: Specifies the network interface to use for scanning.\n- `--rate-limit`: Sets the scan rate in packets per second (default is 100).\n- `--ipv6/-6`: Enables IPv6 scanning.\n\n## Port Scanning Logic\n\n1. **TCP Scanning**: \n   - The scanner attempts to establish a TCP connection to each target port.\n   - If the connection is successful, the port is considered open, and optional banner grabbing is performed.\n   - If the connection fails, the port is marked as closed or filtered, depending on the nature of the failure.\n\n2. **UDP Scanning**:\n   - A UDP packet is sent to each target port, and the scanner waits for a response.\n   - If a response is received, the port is marked as open. Lack of response could indicate the port is filtered or closed.\n\n3. **Service Detection**:\n   - The scanner has a built-in database of common services (like HTTP, FTP) associated with well-known ports. This can be expanded to include more services.\n\n4. **Rate Limiting**:\n   - The scanner implements a rate limiter that controls how many packets are sent per second. This prevents overwhelming the target network and makes the scan less aggressive.\n\n5. **Concurrency**:\n   - The scanner leverages Rust’s asynchronous capabilities to scan multiple ports in parallel, drastically reducing scan time.\n\n## Output\n\n- **Console**: Open ports are printed with details including IP address, port number, protocol (TCP/UDP), service name (if detected), banner (if grabbed), and latency.\n- **File Output**: Results can be saved to a specified file in plain text or JSON format.\n\nExample output:\n\n```text\nScan complete! Found 3 open ports:\n127.0.0.1:80 is open [TCP] (HTTP) - latency: 35ms\n127.0.0.1:443 is open [TCP] (HTTPS) - latency: 30ms\n127.0.0.1:53 is open [UDP] (DNS) - latency: 10ms\nResults have been saved to file: scan_results.json\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamfarrokhnejad%2Fanteater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamfarrokhnejad%2Fanteater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamfarrokhnejad%2Fanteater/lists"}