Skip to main content

An electron application wrapper that utilizes the remote debug console to inject code into electron applications to enable developer tools

Project description

💉 electron-inject

You find yourself locked out of closed source electron applications with no easy way to enable developer tools? ↷ electron-inject is here to help 👲

electron-inject is an application wrapper that utilizes the remote debug console to inject javascript code into electron based applications. For example, this can be pretty handy to enable otherwise unavailable features like the built-in developer console.



$ pip install electron-inject


$ python install


$ python -m electron_inject --help
           electron_inject [options] - <electron application>

           electron_inject --enable-devtools-hotkeys - /path/to/electron/powered/application [--app-params app-args]

  -h, --help            show this help message and exit
  -d, --enable-devtools-hotkeys
                        Enable Hotkeys F12 (Toggle Developer Tools) and F5
                        (Refresh) [default: False]
  -b, --browser         Launch Devtools in default browser. [default: False]
  -t TIMEOUT, --timeout=TIMEOUT
                        Try hard to inject for the time specified [default:
                        Add a script to be injected into each window (render


Inject hotkeys F12:toggle devconsole and F5:reload into closed source apps with devconsole disabled.

--enable-devtools-hotkeys .. enable developer hotkeys --timeout=xx .. patch all known remote webContent/windows in a timeframe of xx seconds. set this to an arbitrary high value to make sure we're patching all future windows.


$ python -m electron_inject -d -t 60 - \\PATH\TO\Local\WhatsApp\app-0.2.2244\WhatsApp.exe

whatsapp gif

If this gives you an error try launching it with the alternative browser method:

$ python -m electron_inject --browser - \PATH\TO\Local\WhatsApp\app-0.2.2244\WhatsApp.exe


$ python -m electron_inject -d -t 60 - \\PATH\TO\Local\slack\app-2.5.2\slack.exe


Render Scripts

Passing the -r file parameter allows to pass a list of scripts to be injected into the render thread. It does not follow imports, just evaluate the text

python -m electron_inject -r ./test.js -r ~/test2.js -r /usr/bin/test3.js - /opt/electron-api-demos/Electron\ API\ Demos


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

electron-inject-0.6.tar.gz (5.1 kB view hashes)

Uploaded source

Built Distributions

electron_inject-0.6-py3-none-any.whl (5.7 kB view hashes)

Uploaded py3

electron_inject-0.6-py2-none-any.whl (5.7 kB view hashes)

Uploaded py2

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page