harryhorton/node-nmap

A bug in killChild

dharmax opened this issue · 6 comments

index.ts, lines 83 +
} private killChild(){ this.cancelled = true; this.child.kill(); }
i don't know why it gets there, maybe because it starts before it finished a previous scan, but it crashes on this.child = undefined.
perhaps it would be better to write:
this.child && this.child.kill();

Btw, is this module maintain? reliable?

I have the same issue. index.js:66
this.child.kill()
TypeError: cannot call method 'kill' of undefined.

Is this perhaps a permissions error?

Hey guys, I'll look into this bug. @dharmax are you attempting to run simultaneous scans?

@menja12 I typically ran this with admin permissions. I'll try to recreate this issue.
What OS
Version of Node
Version of NMAP installed

@dharmax @menja12 I'm absolutely up to continuing to maintain this repo, however I was unsure of usage due to lack of feedback. I wanted to make an nmap module that didn't require a firm understanding of NMAP itself. If you have any feedback, I'd love to hear it.

I've also been toying with the idea of creating an alternate module that relies on Node's core APIs rather than NMAP. Is that something anyone would be interested in? It'd definitely be more performant.

I'm doing a single scan.
OS: Raspian Jessie (Raspberry pi os)
Node version: running through a node-red module
version of NMAP: Embarrassed look...

Node version 0.10.29
Nmap version 6.47
Still getting the cannot call method 'kill' of undefined error..

Hey guys, I'll look into this bug. @dharmax are you attempting to run simultaneous scans?

i do a scan, cancel it and attempt to do a new scan.

I've also been toying with the idea of creating an alternate module that relies on Node's core APIs rather than NMAP. Is that something anyone would be interested in? It'd definitely be more performant.

Yes, i believe the performance and behavior might be much better, but will it be able to discover all the information nmap does?