{"id":50846922,"url":"https://github.com/aykutsp/network-magician","last_synced_at":"2026-06-14T10:34:12.635Z","repository":{"id":349365122,"uuid":"1202052802","full_name":"aykutsp/network-magician","owner":"aykutsp","description":"Rust CLI utility for scanning local hosts, TCP or UDP services, and nearby Wi-Fi networks","archived":false,"fork":false,"pushed_at":"2026-04-05T14:44:34.000Z","size":6122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-14T10:34:11.508Z","etag":null,"topics":["cidr","cli","device-discovery","fast-scanner","ip-scanner","json-output","network-scanner","network-tools","network-utility","port-scanner","tcp","udp","wifi-scanner"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aykutsp.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-05T14:33:26.000Z","updated_at":"2026-04-24T08:00:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aykutsp/network-magician","commit_stats":null,"previous_names":["aykutsp/network-magician"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aykutsp/network-magician","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykutsp%2Fnetwork-magician","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykutsp%2Fnetwork-magician/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykutsp%2Fnetwork-magician/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykutsp%2Fnetwork-magician/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aykutsp","download_url":"https://codeload.github.com/aykutsp/network-magician/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aykutsp%2Fnetwork-magician/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34318523,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["cidr","cli","device-discovery","fast-scanner","ip-scanner","json-output","network-scanner","network-tools","network-utility","port-scanner","tcp","udp","wifi-scanner"],"created_at":"2026-06-14T10:34:11.736Z","updated_at":"2026-06-14T10:34:12.628Z","avatar_url":"https://github.com/aykutsp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# network-magician\n\n[![CI](https://github.com/aykutsp/network-magician/actions/workflows/ci.yml/badge.svg)](https://github.com/aykutsp/network-magician/actions/workflows/ci.yml)\n![Rust](https://img.shields.io/badge/rust-2021-black?logo=rust)\n![Platforms](https://img.shields.io/badge/platforms-Windows%20%7C%20macOS%20%7C%20Linux-2563eb)\n[![License](https://img.shields.io/badge/license-MIT-16a34a.svg)](LICENSE)\n\n`network-magician` is a Rust CLI for quick LAN checks. It scans a CIDR block, a plain IPv4 range, or a single host, probes selected TCP and UDP ports, and can also list nearby Wi-Fi networks with channel and signal details.\n\nIt exists for the in-between jobs that do not need a full network inventory stack: checking which lab devices are up, verifying a small service rollout, or taking a repeatable snapshot before and after a network change.\n\n## Quick start\n\nBuild a release binary:\n\n```bash\ncargo build --release\n```\n\nRun a mixed TCP and UDP scan:\n\n```bash\n./target/release/network-magician scan 192.168.1.0/24 --ports 22,80,443 --udp-ports 53,161\n```\n\nList nearby Wi-Fi networks:\n\n```bash\n./target/release/network-magician wifi scan\n```\n\n## Screenshots\n\nmacOS Wi-Fi scan:\n\n![macOS Wi-Fi scan](assets/macos-wifi.png)\n\nLinux device scan with TCP and UDP results:\n\n![Linux device scan](assets/linux-device-scan.png)\n\nJSON output:\n\n![JSON output](assets/json-output.png)\n\n## Features\n\n- Scan a CIDR target such as `192.168.1.0/24`\n- Scan a direct IPv4 range such as `192.168.1.10-192.168.1.50`\n- Probe a single host when you only need a quick service check\n- Accept explicit TCP and UDP port lists or ranges\n- Show each discovered device together with its TCP and UDP results\n- Mark UDP ports that look `open|filtered` when there is no direct reply\n- Scan nearby Wi-Fi networks and show channel plus signal strength\n- Print a compact terminal summary with elapsed time\n- Write scan reports as JSON for later diffing or automation\n- Compare two saved reports with `diff`\n\n## Build and install\n\n### Build from source\n\n```bash\ncargo build --release\n```\n\nThe binary will be available at:\n\n```bash\n./target/release/network-magician\n```\n\n### Run without installing\n\n```bash\ncargo run -- scan 192.168.1.0/24\n```\n\n## Why this tool\n\n`network-magician` is aimed at the practical middle ground between a one-off socket check and a heavier network inventory stack. It is useful when you want a fast answer to questions like:\n\n- Which hosts in this range respond on the ports I actually care about?\n- Which devices exposed new services after a rollout?\n- Which Wi-Fi networks are visible here, and what channel are they using?\n\n## Usage\n\n```text\nnetwork-magician scan \u003cTARGET\u003e [--ports \u003cTCP_PORTS\u003e] [--udp-ports \u003cUDP_PORTS\u003e] [--timeout-ms \u003cMS\u003e] [--concurrency \u003cN\u003e] [--no-progress] [--json \u003cPATH\u003e]\nnetwork-magician diff \u003cOLD_REPORT.json\u003e \u003cNEW_REPORT.json\u003e\nnetwork-magician wifi scan [--json \u003cPATH\u003e]\n```\n\n`TARGET` can be one of:\n\n- a CIDR block like `192.168.1.0/24`\n- an IPv4 range like `192.168.1.20-192.168.1.40`\n- a single host like `192.168.1.15`\n\nIf you are not used to CIDR notation, the `/24` part is the network prefix length. `192.168.1.0/24` is the same network as subnet mask `255.255.255.0`, which usually means a local range covering `192.168.1.1` through `192.168.1.254`. A smaller block like `192.168.1.0/28` uses mask `255.255.255.240`, which narrows the scan to 16 addresses total, usually 14 usable host addresses.\n\n`--ports` and `--udp-ports` accept individual ports and ranges:\n\n```bash\n--ports 22,80,443,8000-8010\n```\n\n## Examples\n\nScan a subnet with the default port set:\n\n```bash\nnetwork-magician scan 192.168.1.0/24\n```\n\nScan a smaller host range with specific ports:\n\n```bash\nnetwork-magician scan 192.168.1.10-192.168.1.40 --ports 22,80,443,502\n```\n\nScan both TCP and UDP ports:\n\n```bash\nnetwork-magician scan 192.168.1.0/24 --ports 22,80,443 --udp-ports 53,161\n```\n\nProbe one host and write the report to disk:\n\n```bash\nnetwork-magician scan 192.168.1.15 --ports 22,443,8443 --json reports/edge-router.json\n```\n\nEmit JSON to stdout:\n\n```bash\nnetwork-magician scan 192.168.1.15 --ports 22,443 --udp-ports 53 --json -\n```\n\nCompare two saved reports:\n\n```bash\nnetwork-magician diff reports/before.json reports/after.json\n```\n\nList nearby Wi-Fi networks:\n\n```bash\nnetwork-magician wifi scan\n```\n\nSave a Wi-Fi scan as JSON:\n\n```bash\nnetwork-magician wifi scan --json reports/wifi.json\n```\n\n## Example output\n\n```text\nTarget: 192.168.1.0/24\nTCP ports: 22,80,443\nUDP ports: 53,161\nScanned hosts: 254\nReachable hosts: 3\nElapsed: 741 ms\n\n192.168.1.1      tcp: 80,443  udp?: 53\n192.168.1.12     tcp: 22      udp: 161\n192.168.1.14     udp?: 53,161\n```\n\n## Limitations\n\n- Host discovery is inferred from successful TCP connects and UDP probe behavior on the requested ports.\n- Devices that do not expose any of the scanned ports may not appear as reachable.\n- UDP results are best-effort. A `udp?` entry means the probe got no explicit rejection, which usually maps to `open|filtered` rather than a confirmed open socket.\n- The tool does not use ARP, ICMP echo, or raw sockets.\n- The current implementation targets IPv4 local network use cases.\n- Wi-Fi scanning depends on a platform command being available: `netsh` on Windows, `airport` on macOS, or `nmcli` on Linux.\n\n## Validation\n\nThe repository includes a small cross-platform CI workflow and local parser tests for target parsing, TCP/UDP option parsing, diff output, and Wi-Fi command parsing.\n\n## Project layout\n\n```text\n.\n├── Cargo.toml\n├── Cargo.lock\n├── LICENSE\n├── README.md\n├── assets\n│   ├── json-output.png\n│   ├── linux-device-scan.png\n│   └── macos-wifi.png\n├── src\n│   ├── cli.rs\n│   ├── lib.rs\n│   ├── main.rs\n│   ├── model.rs\n│   ├── output.rs\n│   ├── scanner.rs\n│   ├── target.rs\n│   ├── util.rs\n│   └── wifi.rs\n└── tests\n    ├── model_tests.rs\n    ├── target_tests.rs\n    ├── util_tests.rs\n    └── wifi_tests.rs\n```\n\n## Notes\n\nUse this tool only on networks you own or are authorized to inspect.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n\nFeel free to use this project however you like - fork it, ship it, tear it apart, build something bigger on top of it. If you end up using it in something public, a small credit or a link back would make my day, but it's not a requirement. Thanks for taking a look.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faykutsp%2Fnetwork-magician","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faykutsp%2Fnetwork-magician","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faykutsp%2Fnetwork-magician/lists"}