{"id":19478573,"url":"https://github.com/justin-credible/network-scanner","last_synced_at":"2026-05-16T02:05:20.921Z","repository":{"id":38068888,"uuid":"195747456","full_name":"Justin-Credible/network-scanner","owner":"Justin-Credible","description":"A simple tool for *nix systems to scan and report unknown devices on a LAN.","archived":false,"fork":false,"pushed_at":"2022-12-08T05:51:22.000Z","size":27,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-08T06:47:01.354Z","etag":null,"topics":["network-scanner","personal-utility","push-notifications"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":false,"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/Justin-Credible.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}},"created_at":"2019-07-08T06:09:18.000Z","updated_at":"2022-02-26T23:03:43.000Z","dependencies_parsed_at":"2023-01-25T14:15:47.510Z","dependency_job_id":null,"html_url":"https://github.com/Justin-Credible/network-scanner","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justin-Credible%2Fnetwork-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justin-Credible%2Fnetwork-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justin-Credible%2Fnetwork-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Justin-Credible%2Fnetwork-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Justin-Credible","download_url":"https://codeload.github.com/Justin-Credible/network-scanner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240709729,"owners_count":19845038,"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":["network-scanner","personal-utility","push-notifications"],"created_at":"2024-11-10T19:50:35.238Z","updated_at":"2026-05-16T02:05:20.874Z","avatar_url":"https://github.com/Justin-Credible.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# network-scanner\n\nA simple tool to scan a LAN looking for unknown devices. If any are found, it can then send a push notification.\n\nScanning for hosts is done using [`arp-scan`](https://linux.die.net/man/1/arp-scan).\n\nHosts are \"known\" if they are located in the hosts file (e.g. `/etc/hosts`). Additionally, you can specify the path to a [`dnsmasq`](https://linux.die.net/man/8/dnsmasq) DHCP reservation file using the `--dnsmasq-dhcp` option with the format:\n\n```\n$ cat /etc/dnsmasq.d/04-pihole-static-dhcp.conf \ndhcp-host=aa:bb:cc:dd:ee:ff,192.168.1.20,my-device\n```\n\nIf a host is during the scan that is not in one of these two files, it will be considered \"unknown\".\n\nA list of unknown devices will be printed to the console. Additionally, if the `--push-notification` option is used a push notification will be sent with up to 3 of the unknown devices included. Push notifications for a given unknown host will only be sent once per 24 hours. Push notifications are sent using [Pushover.net](https://pushover.net/) and API keys can be specified via `appsettings.json`.\n\nThis tool is intended to be ran periodically via a cron job.\n\nCommands are options explained via the `--help` option:\n\n```\n$ ./network-scanner --help\n\n network-scanner 1.0.0\n\nUsage: network-scanner [options] [command]\n\nOptions:\n  -?|-h|--help  Show help information\n  -v|--version  Show version information\n\nCommands:\n  list-active  Lists the active hosts on the network by using arp-scan on the given interface.\n  list-known   Lists the known hosts by parsing the hosts file as well as a dnsmasq DHCP reservations file (optional).\n  notified     Shows the list of hosts that have recently had push notifications sent for.\n  scan         Scans the network using an arp-scan broadcast and reports any unidentified hosts.\n\nUse \"network-scanner [command] --help\" for more information about a command.\n```\n\nExample usage; scan using the interface named `ens192` using `/etc/hosts` and the given DHCP reservation file from [PiHole](https://pi-hole.net/), and if any unknown hosts are found, send a push notification:\n\n`$ network-scanner scan ens192 --dnsmasq-dhcp /etc/dnsmasq.d/04-pihole-static-dhcp.conf --push-notification`\n\n## Requirements\n\nA macOS or Linux-like machine that has the `arp-scan` utility installed. In order to scan the network, `arp-scan` requires root. So you'll need to run this utility as root or by using `sudo` or similar.\n\n## Running and Building\n\nThis project was coded in C# using [.NET Core](https://dotnet.microsoft.com/download).\n\nTo build, install the .NET Core SDK (tested with v2.2), clone the source, and then run:\n\n`$ dotnet publish --runtime debian-x64 --configuration release`\n\nThis will create a native binary at `bin/release/netcoreapp2.2/debian-x64/publish/` that can be run on a Debian system without the .NET Core SDK being installed.\n\nIf you wish to build for another platform, substitute the `debian-x64` [runtime identifier](https://docs.microsoft.com/en-us/dotnet/core/rid-catalog) with the one for your target platform.\n\nAlternatively, you can run the tool directly without creating a native binary by using the `dotnet` CLI tool, placing commands and options for `network-scanner` after a `--` break:\n\n`$ dotnet run -- scan --help`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-credible%2Fnetwork-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustin-credible%2Fnetwork-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-credible%2Fnetwork-scanner/lists"}