mirror of
https://github.com/gnh1201/welsonjs.git
synced 2024-11-26 07:21:43 +00:00
Update nmap.js
This commit is contained in:
parent
cde58c21a4
commit
2e9143c220
30
lib/nmap.js
30
lib/nmap.js
|
@ -1,14 +1,28 @@
|
|||
////////////////////////////////////////////////////////////////////////
|
||||
// NMAP API
|
||||
// NMAP interface API
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
var NMAPObject = function() {
|
||||
this.binPath = "bin\\32bit\\nmap-7.92\\nmap.exe";
|
||||
var client = require("lib/catproxy");
|
||||
|
||||
this.start = function() {
|
||||
var cmd = [];
|
||||
// .. todo ..
|
||||
};
|
||||
var PortScanner = function(binpath, url) {
|
||||
this.url = url;
|
||||
this.binpath = binpath;
|
||||
|
||||
this.scan = function(hosts) {
|
||||
var worker = client.create(url);
|
||||
worker.set_method("scan_ports_by_hosts");
|
||||
|
||||
var result = worker.exec({
|
||||
"binpath": this.binpath,
|
||||
"hosts": hosts
|
||||
});
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
exports.NMAPObject = NMAPObject;
|
||||
exports.PortScanner = PortScanner;
|
||||
|
||||
exports.VERSIONINFO = "NMAP interface version 0.2";
|
||||
exports.AUTHOR = "abuse@catswords.net";
|
||||
exports.global = global;
|
||||
exports.require = global.require;
|
||||
|
|
Loading…
Reference in New Issue
Block a user