Try to find out which Electron version is bundled in an application file.
Go to file
Nemo 949d12789c Find a list of files worth hashing
Based on https://github.com/captn3m0/electron-fingerprints/#which-files-are-present
2021-07-16 19:45:02 +05:30
.github/workflows Add GitHub Actions for test 2021-07-16 12:33:40 +05:30
_scripts Adds tests for os file list guesser 2021-07-16 12:27:39 +05:30
tests Find a list of files worth hashing 2021-07-16 19:45:02 +05:30
.editorconfig Initial commit 2021-07-15 20:56:36 +05:30
.gitignore Initial commit 2021-07-15 20:56:36 +05:30
HACKING.md Add note about generating fixtures 2021-07-16 12:42:09 +05:30
LICENSE Initial commit 2021-07-15 20:56:36 +05:30
README.md Add documentation on working 2021-07-16 12:41:12 +05:30
finder.js Find a list of files worth hashing 2021-07-16 19:45:02 +05:30
fingerprint.js Add fingerprint lookups and some tests 2021-07-16 11:54:17 +05:30
index.js Adds tests for os file list guesser 2021-07-16 12:27:39 +05:30
os.js Add tests for os detection from filename 2021-07-16 12:01:47 +05:30
package-lock.json Add fingerprint lookups and some tests 2021-07-16 11:54:17 +05:30
package.json Add fingerprint lookups and some tests 2021-07-16 11:54:17 +05:30
utils.js Initial commit 2021-07-15 20:56:36 +05:30
versions.json Change supported.json to list all versions 2021-07-16 19:27:43 +05:30
zip.js Get it working for some files 2021-07-15 21:36:12 +05:30

README.md

which-electron

Try to find out which Electron version is bundled inside an application.

Usage

npm install which-electron
which-electron Google.Play.Music.Desktop.Player.OSX.zip
which-electron Google.Play.Music.Desktop.Player.OSX.dmg
which-electron Google.Play.Music.Desktop.Player.deb

How does it work?

We attempt multiple pathways:

  1. The presence of a electron.asar file denotes an electron version <v7.0.0, since later releases dropped that file and embedded it in the binary instead.
  2. A version text file is sometimes included in the final binary.
  3. The node_modules/electron/package.json file is sometimes present.
  4. A lookup table of hashes from various electron releases is used to guess the version. (WIP)
  5. Get the electron version from the electron binary (WIP)

Note that this can be run against untrusted binaries as it does not try to run the application.

License

Licensed under the MIT License. See LICENSE file for details.