Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 738 Bytes

README.md

File metadata and controls

29 lines (20 loc) · 738 Bytes

Electron Injector

Injects an arbitrary JavaScript file into any Electrion-based application by modifying the asar archive. This file will be ran at startup in an Electron context using preload.

Usage

Usage: electron-injector.exe [OPTIONS] --asar <ASAR> --script <SCRIPT>

Options:
  -a, --asar <ASAR>      The path to the asar file to read
  -s, --script <SCRIPT>  The JavaScript script to inject into the electron preload
  -o, --output <OUTPUT>  [default: injected.asar]
  -h, --help             Print help

Example

Inject a simple script into app.asar

echo "alert('Hello, world!')" > script.js
electron-injector -a app.asar -s script.js -o output-app.asar

License

See LICENSE