-
Notifications
You must be signed in to change notification settings - Fork 8
Open
Labels
new blogFuture blog ideasFuture blog ideas
Description
- https://voidsec.com/instrumenting-electron-app/
- https://www.contextis.com/en/blog/basic-electron-framework-exploitation
- Modifying app.asar and adding proxy settings.
- Chromium switches (these do not work if passed to bundled applications).
- Are these different?
// app.commandLine.appendSwitch('proxy-server', 'http://127.0.0.1:8090');
// app.commandLine.appendSwitch('ignore-certificate-errors', 'true');
// app.commandLine.appendSwitch('allow-insecure-localhost', 'true');
app.on('ready', function() {
mainWindow = new BrowserWindow({ width: 1024, height: 728 });
mainWindow.webContents.session.setProxy({proxyRules:"http=localhost:8090;https=localhost:8090"}, function() {mainWindow.loadURL('file://' + __dirname + '/app/app.html');});
electron.session.defaultSession.webRequest.onBeforeSendHeaders((details, callback) => {
details.requestHeaders['Origin'] = 'electron://graphiql-app';
callback({ cancel: false, requestHeaders: details.requestHeaders });
});Did not work
- Changing the WinINET proxy settings (also known as internet explorer proxy settings) which is the closest Windows has to a system-wide proxy settings. This is what Chrome desktop (and many other Electron apps) use.
- Passing
--proxy-serverto the GraphiQL executable command line.- Seems like this does not work with bundled applications.
- Extracting app.asar, adding the command line parameters for a proxy to main.js before
app.on('ready'. Then repacking app.asar and running GraphiQL.
app.commandLine.appendSwitch('proxy-server', '127.0.0.1:8090');
app.commandLine.appendSwitch('ignore-certificate-errors', 'true');
app.commandLine.appendSwitch('allow-insecure-localhost', 'true');
app.on('ready', function() {
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
new blogFuture blog ideasFuture blog ideas