An experimental injection method using NODE_OPTIONS via an Electron security bypass (Linux only, possibly Windows in future if demand).
GIEx2 is injected via NODE_OPTIONS. This is usually disabled in packaged production Electron apps, but we found a bypass. The way Electron checks if the app is packaged is by checking the binary name.
If you hardlink, rename, copy, etc. the binary to electron NODE_OPTIONS is no longer disabled.
Injecting using NODE_OPTIONS has it's own challenges; mostly how you cannot access Electron simply via require as it injects too early. Our injection script gets around this by using require.cache.
Setup (once / possibly per host update) steps:
- Open a terminal session
cdto your Discord install directory- Make a hardlink called
electronto the Discord binary (eg:ln DiscordCanary electron), you will need root for this step - Clone GIEx2 to somewhere accessible
Run command in terminal (roughly, replace with own paths):
NODE_OPTIONS="-r <GIEx2_clone_dir>/inject.js" <discord_install_dir>/electron