{"id":16703295,"url":"https://github.com/krystianity/mac-scanner","last_synced_at":"2025-07-05T23:06:16.856Z","repository":{"id":85215181,"uuid":"113765446","full_name":"krystianity/mac-scanner","owner":"krystianity","description":"Monitor private network MAC address appearance, leaves and IP changes","archived":false,"fork":false,"pushed_at":"2017-12-11T14:08:37.000Z","size":6,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-11T06:06:37.479Z","etag":null,"topics":["address","events","ip","mac","mac-address","monitor","network","private"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/krystianity.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":"2017-12-10T16:30:08.000Z","updated_at":"2023-09-11T11:25:34.000Z","dependencies_parsed_at":"2023-04-24T06:01:57.729Z","dependency_job_id":null,"html_url":"https://github.com/krystianity/mac-scanner","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/krystianity/mac-scanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fmac-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fmac-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fmac-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fmac-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krystianity","download_url":"https://codeload.github.com/krystianity/mac-scanner/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krystianity%2Fmac-scanner/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263819154,"owners_count":23516116,"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":["address","events","ip","mac","mac-address","monitor","network","private"],"created_at":"2024-10-12T19:07:44.017Z","updated_at":"2025-07-05T23:06:16.845Z","avatar_url":"https://github.com/krystianity.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MacScanner\n\n## What does it do?\n\n- with macscanner you can monitor mac-address appearances, leaves and ip address changes\n- almost in real-time (depdening on configuration and network size)\n- you can only monitor private networks, of which the host running the scanner is a client\n- it works by calculating all hosts in the network, pinging them and grabbing the mac-address from an arp table\n\n## What does it require?\n\n- will not work on windows (tested on ubuntu only, but mac should work as well)\n- requires `arp`\n- requires access to `raw sockets`, there is a good chance that you need to start the app with elevated rights\n- starting with elevated rights can work like this `sudo $(which node) index.js`\n- requires node version \u003e= 8\n\n## How to use it?\n\n- install via `npm -g mac-scanner`\n- checkout the example [here](example/index.js)\n\n```javascript\n\"use strict\";\nconst {MacScanner} = require(\"mac-scanner\");\n\nconst scanner = new MacScanner(config);\nscanner.start();\n\nscanner.on(\"entered\", target =\u003e {\n    console.log(\"he is here\", target.ip, target.mac);\n});\n\nscanner.on(\"left\", target =\u003e {\n    console.log(\"he is gone\", target.ip, target.mac);\n});\n\nscanner.on(\"changed\", target =\u003e {\n    console.log(\"changed ip\", target.mac, \"from\", target.oldIP, \"to\", target.newIP);\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrystianity%2Fmac-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrystianity%2Fmac-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrystianity%2Fmac-scanner/lists"}