{"id":41251804,"url":"https://github.com/robgonnella/go-lanscan","last_synced_at":"2026-01-23T01:40:18.806Z","repository":{"id":192355526,"uuid":"686552548","full_name":"robgonnella/go-lanscan","owner":"robgonnella","description":"A network scanning CLI and Golang Package that makes it easy to perform ARP \u0026 SYN scanning for a LAN","archived":false,"fork":false,"pushed_at":"2024-07-15T13:34:09.000Z","size":246,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-24T13:58:23.574Z","etag":null,"topics":["arp","arp-scan","arp-scanner","lan-network","lan-scan","lan-scanner","network","network-analysis","network-scann","network-scanner","ops","port-scanner","scann","scanning","syn-scan","syn-scanning","synscanner"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robgonnella.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":"2023-09-03T07:07:24.000Z","updated_at":"2025-01-24T23:53:05.000Z","dependencies_parsed_at":"2023-09-04T11:53:59.274Z","dependency_job_id":"a0444eea-7a7e-444d-afad-38b175c19751","html_url":"https://github.com/robgonnella/go-lanscan","commit_stats":null,"previous_names":["robgonnella/go-lanscan"],"tags_count":34,"template":false,"template_full_name":null,"purl":"pkg:github/robgonnella/go-lanscan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robgonnella%2Fgo-lanscan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robgonnella%2Fgo-lanscan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robgonnella%2Fgo-lanscan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robgonnella%2Fgo-lanscan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robgonnella","download_url":"https://codeload.github.com/robgonnella/go-lanscan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robgonnella%2Fgo-lanscan/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677711,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"ssl_error","status_checked_at":"2026-01-23T01:00:19.529Z","response_time":144,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arp","arp-scan","arp-scanner","lan-network","lan-scan","lan-scanner","network","network-analysis","network-scann","network-scanner","ops","port-scanner","scann","scanning","syn-scan","syn-scanning","synscanner"],"created_at":"2026-01-23T01:40:18.077Z","updated_at":"2026-01-23T01:40:18.799Z","avatar_url":"https://github.com/robgonnella.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-lanscan\n![Coverage](https://img.shields.io/badge/Coverage-91.6%25-brightgreen)\n\nA network cli and golang package that allows you to perform arp and syn\nscanning on a local area network.\n\n## Cli Usage\n\n### Prerequisites\n\nFirst you must install the following dependencies\n\n- [golang]\n- [libpcap]\n  - mac - `brew install libpcap`\n  - linux/debian - `sudo apt update \u0026\u0026 sudo apt install -y libpcap-dev`\n\n### Installation\n\nOnce dependencies are installed, run the following command to install go-lanscan\n\n```bash\ngo install github.com/robgonnella/go-lanscan@latest\n```\n\n### Pre-built Binaries\n\nSome pre-built binaries are provided in the releases section of github:\nhttps://github.com/robgonnella/go-lanscan/releases. These binaries still have\na prerequisite on libpcap being installed first.\n\n### Docker\n\nA docker image is provided with go-lanscan prebuilt.\nhttps://hub.docker.com/r/rgonnella/go-lanscan\n\nSee [docker-compose.yml](./docker-compose.yml) for an example setup.\n\n**Linux**\n\n```bash\ndocker run --rm --network host -v $(pwd)/reports:/reports rgonnella/go-lanscan:latest\n```\n\n**MacOS**\n\nOn MacOS, host network does not work so you will only be able to scan whatever\ndocker network the container is in. See\n[docker-compose.yml](./docker-compose.yml) for an example.\n\n```bash\ndocker run --rm -v $(pwd)/reports:/reports rgonnella/go-lanscan:latest\n```\n\n### Usage\n\n```bash\n# print usage info for this cli\ngo-lanscan --help\n\n# scan all ports on current LAN\nsudo go-lanscan\n\n# scan specific ports\nsudo go-lanscan --ports 22,111,3000-9000\n\n# scan specific targets   single ip          ip range          cidr\nsudo go-lanscan --targets 192.22.22.1,192.168.1.1-192.168.1.50,192.56.42.1/24\n\n# include vendor look-ups on mac addresses (scan will be a little slower)\nsudo go-lanscan --vendor\n\n# include reverse dns lookup for hostnames\nsudo go-lanscan --hostnames\n\n# update static database used for vendor lookups\n# static file is located at ~/.config/go-lanscan/oui.txt\nsudo go-lanscan update-vendors\n\n# choose specific interface when scanning\nsudo go-lanscan --interface en0\n\n# only output final result as table text\nsudo go-lanscan --no-progress\n\n# only output final result in json\nsudo go-lanscan --no-progress --json\n\n# run only arp scanning (skip syn scanning)\nsudo go-lanscan --arp-only\n\n# set timing - this is how fast packets are sent to hosts\n# default is 100µs between packets\n# the faster you send packets (shorter the timing), the less accurate the results will be\nsudo go-lanscan --timing 1ms # set to 1 millisecond\nsudo go-lanscan --timing 500µs # set to 500 microseconds\nsudo go-lanscan --timing 500us # alternate symbol for microseconds\n```\n\n## Package Usage\n\n### Prerequisites\n\nFirst you must install the following dependencies\n\n- [libpcap]\n  - mac - `brew install libpcap`\n  - linux/debian - `sudo apt update \u0026\u0026 sudo apt install -y libpcap-dev`\n\n### Example Usage\n\n- [arp-scanner](./examples/arp/arpscan.go)\n- [syn-scanner](./examples/syn/synscan.go)\n- [full-scanner](./examples/full/fullscan.go)\n\n### Package Options\n\nYou can provide the following options to all scanners\n\n- Provide specific timing duration\n\nThis option is used to set a specific time to wait between sending packets\nto hosts. The default is 100µs. The shorter the timing, the faster packets\nwill be sent, and the less accurate your results will be\n\n```go\n  timing := time.Microsecond * 200\n\n  fullScanner := scanner.NewFullScanner(\n\t\tnetInfo,\n\t\ttargets,\n\t\tports,\n\t\tlistenPort,\n\t\tscanner.WithTiming(timing),\n  )\n\n  // or\n  fullScanner.SetTiming(timing)\n\n  // or\n  option := scanner.WithTiming(timing)\n  option(fullScanner)\n```\n\n- Provide channel for notifications when packet requests are sent to target\n\n```go\n  requests := make(chan *scanner.Request)\n\n  synScanner := scanner.NewSynScanner(\n    targets,\n    netInfo,\n    ports,\n    listenPort,\n    synResults,\n    synDone,\n    scanner.WithRequestNotifications(requests),\n  )\n\n  // or\n  synScanner.SetRequestNotifications(requests)\n\n  // or\n  option := scanner.WithRequestNotifications(requests)\n  option(synScanner)\n```\n\n- Provide your own idle timeout. If no packets are received from our targets\n  for this duration, a timeout occurs and the scanner is marked done\n\n```go\n  arpScanner := scanner.NewArpScanner(\n    targets,\n    netInfo,\n    arpResults,\n    arpDone,\n    scanner.WithIdleTimeout(time.Second*10)\n  )\n\n  // or\n  arpScanner.SetIdleTimeout(time.Second*10)\n\n  // or\n  option := scanner.WithIdleTimeout(time.Second*10)\n  option(arpScanner)\n```\n\n- The next option performs vendor look-ups for mac addresses and can only be\napplied to arpScanner and fullScanner. Vendor lookup is performed by downloading\na static database from https://standards-oui.ieee.org/oui/oui.txt and performing\nqueries against this file. The file is stored at `~/.config/go-lanscan/oui.txt`\n\n```go\n  import (\n    ...\n    \"github.com/robgonnella/go-lanscan/pkg/oui\"\n  )\n\n  vendorRepo, err := oui.GetDefaultVendorRepo()\n\n  if err != nil {\n    panic(err)\n  }\n\n  arpScanner := scanner.NewArpScanner(\n    targets,\n    netInfo,\n    arpResults,\n    arpDone,\n    scanner.WithVendorInfo(vendorRepo)\n  )\n\n  // or\n  arpScanner.IncludeVendorInfo(vendorRepo)\n\n  // or\n  option := scanner.WithVendorInfo(vendorRepo)\n  option(arpScanner)\n```\n\n- Perform reverse dns lookup to find hostnames for found devices\n\n```go\n  arpScanner := scanner.NewArpScanner(\n    targets,\n    netInfo,\n    arpResults,\n    arpDone,\n    scanner.WithHostnames(true)\n  )\n\n  // or\n  arpScanner.IncludeHostnames(true)\n\n  // or\n  option := scanner.WithHostnames(true)\n  option(arpScanner)\n```\n\n[golang]:  https://go.dev/doc/install\n[libpcap]: https://github.com/the-tcpdump-group/libpcap\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobgonnella%2Fgo-lanscan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobgonnella%2Fgo-lanscan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobgonnella%2Fgo-lanscan/lists"}