Crates.io | electron-injector |
lib.rs | electron-injector |
version | 1.0.2 |
source | src |
created_at | 2023-03-18 22:03:10.842202 |
updated_at | 2023-07-29 11:12:47.946704 |
description | electron-injector is an open source command-line tool written in Rust that enables you to inject JavaScript code into Electron apps at runtime. It is inspired by the Python project electron-inject and offers similar functionality. |
homepage | |
repository | https://github.com/itsKaynine/electron-injector |
max_upload_size | |
id | 814007 |
size | 72,297 |
electron-injector
is an open source command-line tool written in Rust that enables you to inject JavaScript code into Electron apps at runtime. It is inspired by the Python project electron-inject and offers similar functionality.
You can download pre-compiled binaries from the releases page and add the binary to your PATH
environment variable.
Alternatively, you can install electron-injector
using Cargo, Rust's package manager.
$ cargo install electron-injector
To use electron-injector
, simply specify the path to the Electron app and the JavaScript file that you want to inject.
$ electron-injector --script=/path/to/script.js /path/to/electron/app
-a, --arg <ARG> Additional arg for the electron app
-s, --script <SCRIPT> Path to the javascript file to be injected
--host <HOST> The remote debugging host [default: 127.0.0.1]
-p, --port <PORT> The remote debugging port [default: 8315]
-t, --timeout <TIMEOUT> Timeout in ms for injecting scripts [default: 10000]
-d, --delay <DELAY> Delay in ms to wait after spawning the process [default: 10000]
--prelude Inject prelude script
-h, --help Print help
-V, --version Print version
We welcome contributions from the community. To contribute to electron-injector
, please follow these steps:
electron-injector
is dual licensed under the MIT License and Apache-2.0 License. See the LICENSE-MIT and LICENSE-APACHE-2.0 files for more information.