Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to display version of Electron environment in an Electron app?

Tags:

electron

I would like to find out which version of Electron an Electron desktop app like Signal Desktop or Visual Studio Code is using. Is there a simple way - like entering a command in the Development Console?

Thanks! Johannes

(Why? I would like to see if it is affected by bugs like https://www.trustwave.com/Resources/SpiderLabs-Blog/CVE-2018-1000136---Electron-nodeIntegration-Bypass/)

like image 996
Johannes S. Avatar asked May 15 '18 08:05

Johannes S.


People also ask

How do you tell if an app is Electron based?

If you see an app. asar file, or something similar with the . asar suffix, it is most likely an Electron App. Windows: Open up the program files directory of the application you are wondering about, and check the file folder for any file with .

What is Electron_run_as_node?

ELECTRON_RUN_AS_NODE ​Starts the process as a normal Node. js process. In this mode, you will be able to pass cli options to Node. js as you would when running the normal Node.


1 Answers

You can, if the App enabled developer tools and enabled nodeIntegration. take VS Code as an example:

open the Developer Tools, in the console tab, type

process.versions.electron

documentation here: https://electronjs.org/docs/api/process

or try parsing version from userAgent string

navigator.userAgent.match(/Electron\/([\d\.]+\d+)/)[1]

enter image description here

like image 53
feedpanda Avatar answered Sep 28 '22 21:09

feedpanda