Nemo 5ee877fdf3 | ||
---|---|---|
.github/workflows | ||
_scripts | ||
tests | ||
.editorconfig | ||
.gitignore | ||
.npmignore | ||
HACKING.md | ||
LICENSE | ||
README.md | ||
finder.js | ||
fingerprint.js | ||
index.js | ||
os.js | ||
package-lock.json | ||
package.json | ||
utils.js | ||
version.js | ||
versions.json | ||
zip.js |
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
Version Constraint (Unsupported): <v7.0.0
Fingerprint: v3.1.7-v3.1.8
v3.1.8 is currently not supported
$ which-electron HashTag-win32-x64.zip
Found Version file: v7.1.10
v7.1.10 is currently not supported
Fingerprint: v7.1.10
v7.1.10 is currently not supported
$ which-electron Appium-linux-1.21.0.AppImage
Fingerprint: v7.2.4-v7.3.3
v7.3.3 is currently not supported
How does it work?
We attempt multiple pathways:
- 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. - A
version
text file is sometimes included in the final binary. - The
node_modules/electron/package.json
file is sometimes present. - A lookup table of hashes from various electron releases is used to guess the version. In case of multiple matches, it returns a range of versions.
- 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. It has been tested against various file formats: zip/dmg/exe/AppImage/tar.gz etc. It extracts limited files using 7-zip.
Known Issues
It is known to not work against:
- Windows setup files (ones with
-setup
in their name) - Breaks with newer AppImage and deb files
License
Licensed under the MIT License. See LICENSE file for details.