diff --git a/lib/debug.js b/lib/debug.js index 198de6b..f8fa866 100644 --- a/lib/debug.js +++ b/lib/debug.js @@ -1,5 +1,5 @@ try { module.exports = require('debug'); } catch(e) { - module.exports = function() { } + module.exports = function(){ return function(){} } } diff --git a/lib/electron.js b/lib/electron.js index a7d094a..09719fd 100644 --- a/lib/electron.js +++ b/lib/electron.js @@ -203,11 +203,11 @@ ipcMain.on('app-bounce-cancel', (e, id) => app.dock.cancelBounce(Number(id))); process.on('uncaughtException', reason => { if(reason.code === 'EADDRINUSE' && mainWindow !== null) return; - debug.electron(`Uncaught ${reason.stack}`); + (typeof debug.electron !== 'function' ? console.error : debug.electron)(`Uncaught ${reason.stack}`); process.exit(1); }); process.on('unhandledRejection', (reason, p) => { - debug.electron(`Uncaught [Promise] ${reason.stack}`); + (typeof debug.electron !== 'function' ? console.error : debug.electron)(`Uncaught [Promise] ${reason.stack}`); process.exit(1); }); diff --git a/package.json b/package.json index adaddca..5331a87 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "wssip", - "version": "1.0.8", + "version": "1.0.9", "description": "Intercepting Proxy Application to capture, modify and send custom data from one WebSocket host to another, primarily for penetration testing. Supports WebSocket RFC6455 implementations and Socket.io.", "main": "lib/electron.js", "bin": {