-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
35 lines (28 loc) · 877 Bytes
/
main.js
File metadata and controls
35 lines (28 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// var http = require("http");
// http.createServer(function (request, response) {
// // Send the HTTP header
// // HTTP Status: 200 : OK
// // Content Type: text/plain
// response.writeHead(200, {'Content-Type': 'text/plain'});
// // Send the response body as "Hello World"
// response.end('Hello World\n');
// }).listen(8081);
// Console will print the message
// console.log('Server running at http://127.0.0.1:8081/');
// var nmap = require('libnmap')
// , opts = {
// timeout: 900, // 900s = 10m and increases the reliability of scan results
// range: [
// '10.10.1.0/24'
// ]
// };
var nmap = require('libnmap')
, opts = {
range: ['10.10.1.0/24']
};
nmap.scan(opts, function(err, report) {
if (err) throw new Error(err);
for (var item in report) {
console.log(JSON.stringify(report[item]));
}
});