error while scanning
dotob opened this issue · 4 comments
i get:
Unable to find nmap-services! Resorting to /etc/services
Cannot find nmap-payloads. UDP payloads are disabled.
here is my code:
let ipaddressRange = "192.168.0.0/24";
var scan = new nmap.nodenmap.NmapScan(ipaddressRange, '-p 5432 --open');
scan.on('complete', function (data: any[]) {
let hosts = _.map(data, (d) => { return { hostname: d.hostname, ip: d.ip } });
resolve(hosts);
});
scan.on('error', function (error) {
console.error(error);
reject(error);
});
scan.startScan();
I got a similar error here. Try running this command in NMAP outside of the library. It seems to fail there as well.
Apologies for the wait.
hi @Johnhhorton,
yes nmap logs the same message but its not an error. On the command line it works, meaning i get the desired result. It seems to be a kind of warning that can be ignored, at least for that command. perhaps node-nmap is to strict with output of nmap.
thanks for your reply.
dotob
@dotob Not sure if you're still using this library, but try the latest version of NMAP as well as this module (note the changelog for a simple breaking change in implementation.
I got this error when placing the script in the same directory as the nmap GUI