eviltik / evilscan

NodeJS Simple Network Scanner
https://github.com/eviltik/evilscan
MIT License
547 stars 64 forks source link

Concurrency error #45

Closed lluiscab closed 7 years ago

lluiscab commented 7 years ago

I'm getting this strange error when running the script from another script TypeError: Cannot read property 'concurrency' of undefined at evilscan.init (/home/lluiscab/electron-boilerplate-master/boilerplate/node_modules/evilscan/main.js:189:36) at /home/lluiscab/electron-boilerplate-master/boilerplate/node_modules/evilscan/main.js:35:18

My settings `var scanner = new evilscan({ target: conf.get('server.ip') + '/' + conf.get('server.mask'), port: conf.get('server.port'), status:'O', concurrency: 50 });

        scanner.on('result',function(data) {
            console.log(data);
        });

        scanner.on('error',function(err) {
            throw new Error(data.toString());
        });

        scanner.on('done', function() {
            scanning = false;
        });`
    `
mstephenhunt commented 7 years ago

@lluiscab -- I was running into this issue too. Turns out it was due to a bad ip range being passed into my options:

  const scanOptions = {
    target:'192.168.156.99/256', // <-- What I did
    // target:'192.168.156.99/16', // <-- What I meant to do
    port: ['502', '5502'],
    status:'O',
    banner:true
  }

Not sure if this is your issue, but I'd double check that your target: conf.get('server.ip') + '/' + conf.get('server.mask') is giving you the correct format.