{"id":21032192,"url":"https://github.com/rami-sabbagh/node-interception","last_synced_at":"2025-09-07T06:04:27.916Z","repository":{"id":39026949,"uuid":"393677283","full_name":"Rami-Sabbagh/node-interception","owner":"Rami-Sabbagh","description":"A windows library for intercepting and controlling keyboards and mouses with multiple devices support.","archived":false,"fork":false,"pushed_at":"2022-08-18T09:46:47.000Z","size":456,"stargazers_count":15,"open_issues_count":9,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-07T05:20:09.121Z","etag":null,"topics":["bindings","interception","keyboard","mouse","node-addon-api","nodejs","typescript","wrapper"],"latest_commit_sha":null,"homepage":"https://rami-sabbagh.github.io/node-interception/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rami-Sabbagh.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":"2021-08-07T12:26:29.000Z","updated_at":"2025-04-19T23:45:34.000Z","dependencies_parsed_at":"2022-07-25T02:45:08.785Z","dependency_job_id":null,"html_url":"https://github.com/Rami-Sabbagh/node-interception","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/Rami-Sabbagh/node-interception","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rami-Sabbagh%2Fnode-interception","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rami-Sabbagh%2Fnode-interception/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rami-Sabbagh%2Fnode-interception/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rami-Sabbagh%2Fnode-interception/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rami-Sabbagh","download_url":"https://codeload.github.com/Rami-Sabbagh/node-interception/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rami-Sabbagh%2Fnode-interception/sbom","scorecard":{"id":117664,"data":{"date":"2025-08-11","repo":{"name":"github.com/Rami-Sabbagh/node-interception","commit":"181a6f21316119d79e5eee4db7739c4d3d41a0e7"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/18 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":5,"reason":"binaries present in source code","details":["Warn: binary detected: interception/driver/install-interception.exe:1","Warn: binary detected: interception/ia32/interception.dll:1","Warn: binary detected: interception/ia32/interception.lib:1","Warn: binary detected: interception/x64/interception.dll:1","Warn: binary detected: interception/x64/interception.lib:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/Rami-Sabbagh/node-interception/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/Rami-Sabbagh/node-interception/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/Rami-Sabbagh/node-interception/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/Rami-Sabbagh/node-interception/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:12: update your workflow using https://app.stepsecurity.io/secureworkflow/Rami-Sabbagh/node-interception/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/Rami-Sabbagh/node-interception/docs.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/Rami-Sabbagh/node-interception/docs.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU Lesser General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 25 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"12 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j","Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22","Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp","Warn: Project is vulnerable to: GHSA-5v2h-r2cx-5xgj","Warn: Project is vulnerable to: GHSA-rrrm-qjm4-v8hf","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36","Warn: Project is vulnerable to: GHSA-pq67-2wwv-3xjx","Warn: Project is vulnerable to: GHSA-8cj5-5rvv-wf4v"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T01:45:25.305Z","repository_id":39026949,"created_at":"2025-08-16T01:45:25.305Z","updated_at":"2025-08-16T01:45:25.305Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274001216,"owners_count":25205213,"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","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"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":["bindings","interception","keyboard","mouse","node-addon-api","nodejs","typescript","wrapper"],"created_at":"2024-11-19T12:41:31.395Z","updated_at":"2025-09-07T06:04:27.894Z","avatar_url":"https://github.com/Rami-Sabbagh.png","language":"C++","readme":"\n# node-interception\n\n[![GitHub](https://flat.badgen.net/badge/icon/GitHub?icon=github\u0026color=black\u0026label)][GitHub]\n[![NPM](https://flat.badgen.net/npm/v/node-interception?icon=npm\u0026color=red\u0026label)][NPM]\n[![License](https://flat.badgen.net/github/license/Rami-Sabbagh/node-interception?color=yellow\u0026label)][License]\n[![Documentation](https://flat.badgen.net/npm/types/node-interception?icon=typescript\u0026label)][Documentation]\n[![Dependabot](https://flat.badgen.net/github/dependabot/Rami-Sabbagh/node-interception?icon=dependabot\u0026label)][Dependabot]\n\nA **windows** library for intercepting and controlling keyboards and mouses with multiple devices support.\n\nThe package provides Node.js bindings for the original [Interception](https://github.com/oblitum/Interception) library by [Oblitum](https://github.com/oblitum), and supports it with a wrapper and TypeScript definitions.\n\n## Example\n\n```ts\n// Increase the process priority to prevent input lagging.\nimport * as os from 'os';\nos.setPriority(os.constants.priority.PRIORITY_HIGH);\n\nimport { Interception, FilterKeyState, FilterMouseState } from 'node-interception';\nconst interception = new Interception();\n\n// Display the list of available devices.\nconsole.log('Devices:', interception.getDevices().map(device =\u003e `${device}`));\n\n// Enable the capturing of all strokes.\ninterception.setFilter('keyboard', FilterKeyState.ALL);\ninterception.setFilter('mouse', FilterMouseState.ALL);\n\nconst SCANCODE_ESC = 0x01;\n\nasync function listen() {\n    console.info('Press any key or move the mouse to generate strokes.');\n    console.info('Press ESC to exit and restore back control.');\n\n    while (true) {\n        const device = await interception.wait();\n        const stroke = device?.receive();\n\n        if (!device || !stroke || (stroke?.type === 'keyboard' \u0026\u0026 stroke.code === SCANCODE_ESC)) break;\n\n        console.log(`${device}`, stroke);\n    }\n\n    interception.destroy();\n}\n\n// Start listening for keyboard and mouse strokes.\nlisten().catch(console.error);\n```\n\n## Features\n\n- Contains prebuilt binaries for 32-bit (`ia32`) and 64-bit (`x64`) Windows machines.\n- Written using N-API and `node-addon-api` so it should work with different node versions and electron without rebuilding.\n- Written in TypeScript to provide enhanced IDE support.\n- Allows working with each mouse and keyboard as independent devices, so different logic can be used for each keyboard/mouse.\n- Allows blocking or modifying the devices strokes.\n\n## Interception use cases\n\nAs the original library author ([Oblitum]) written:\n\n\u003e Interception has been used around the world in cases I couldn't imagine when I first created it:\n\u003e\n\u003e - Helping people with accessibility limitations, tailoring systems according to their limitations.\n\u003e - By companies in aviation training, to connect many devices at once and customizing each one.\n\u003e - By companies providing SCADA (supervisory control and data acquisition) solutions.\n\u003e - In game applications like BOTs and control customization.\n\u003e - To construct an emacs mode of the system.\n\u003e - To customize supermarket cashier's systems.\n\u003e - In doctoral thesis about typing pattern recognition for security applications.\n\u003e - Home theater automation.\n\u003e - ...\n\n## Documentation\n\nThe API documentation is generated using [TypeDoc](https://typedoc.org/) and available on [GitHub Pages][Documentation].\n\n## When in need for more help\n\nYou can create an issue here or email me on [rami.sab07@gmail.com](mailto:rami.sab07@gmail.com).\n\nPlease mind that I made this project in my free time for nothing in return.\nAnd that it usually takes up to 5 days for me to reply back (possibly more on some occasions).\n\n## Installation\n\n### Installing the package\n\n```cmd\nyarn add node-interception\nrem -- or using npm\nnpm install node-interception\n```\n\n### Installing the driver\n\nUsing a command prompt with **Administrative Privileges**:\n\n```cmd\nnpx node-interception /install\n```\n\n\u003e You can uninstall it later using `/uninstall` instead.\n\nYou'll need to **restart** for the driver installation to be complete.\n\n## License\n\nThe binding and wrapper are licensed under `LGPL-3.0-or-later`, check the `LICENSE` file.\n\nThe original Interception library is licensed under `LGPL-3.0` too for un-commercial usage and has a seperate license for commercial usage, check it in it's repository.\n\nThe package and repository of this module contains a redistribution of the interception library as that's permitted by the `LGPL-3.0` license, please create an issue if that's incorrect.\n\n## Credits\n\n- [Oblitum] for creating the original interception library.\n- [Rami Sabbagh] for writing the binding and wrapper.\n\n[NPM]: https://www.npmjs.com/package/node-interception\n[GitHub]: https://github.com/Rami-Sabbagh/node-interception/\n[Documentation]: https://rami-sabbagh.github.io/node-interception/\n[License]: https://github.com/Rami-Sabbagh/node-interception/blob/main/LICENSE\n[Actions]: https://github.com/Rami-Sabbagh/node-interception/actions\n[Dependabot]: https://github.com/Rami-Sabbagh/node-interception/network/updates\n[Interception]: https://github.com/oblitum/Interception\n[Oblitum]: https://github.com/oblitum\n[Rami Sabbagh]: https://github.com/Rami-Sabbagh\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frami-sabbagh%2Fnode-interception","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frami-sabbagh%2Fnode-interception","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frami-sabbagh%2Fnode-interception/lists"}