Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return new Promise((resolve, reject) => {
const scanner = new evilscan({
target: ip,
port:'8022',
status:'O'
});
scanner.on('result', (data) => {
if (data.status === "open") {
writeLog("Found EON at ", data.ip);
sender.send(types.SCAN_NETWORK_RESULT,data);
writeLog(`Found open port on ${ip}`);
}
});
scanner.on('error', (err) => {
// writeLog('Error:',err);
writeLog(`Failed to scan ${ip}...`, err);
reject(err);