Comparing version
@@ -184,16 +184,2 @@ /*! | ||
/** | ||
* @function match | ||
* Match specified regex test on string and return array of results | ||
* | ||
* @param {Object} regex - Regex test case | ||
* @param {String} str - String to perform test on | ||
* | ||
* @returns {String} | ||
*/ | ||
match(regex, str) { | ||
return regex.match(str); | ||
} | ||
/** | ||
* @function exists | ||
@@ -200,0 +186,0 @@ * Binary file tests |
{ | ||
"name": "libnmap", | ||
"version": "v0.4.13", | ||
"version": "v0.4.14", | ||
"description": "libnmap for node.js", | ||
@@ -5,0 +5,0 @@ "author": "Jason Gerfen <jason.gerfen@gmail.com>", |
@@ -10,3 +10,3 @@ /*! | ||
const nmap = require('../'); | ||
const timeout = 1024 * 1024; | ||
const timeout = 1024 * 1024 * 3; | ||
const chai = require('chai'); | ||
@@ -17,10 +17,10 @@ const should = chai.should(); | ||
describe('nmap', function() { | ||
context('discovery method', function() { | ||
describe('nmap', function () { | ||
context('discovery method', function () { | ||
this.timeout(timeout); | ||
it('validate report', function(done) { | ||
it('validate report', function (done) { | ||
nmap.discover(function(err, report) { | ||
nmap.discover(function (err, report) { | ||
@@ -33,10 +33,13 @@ /* If 'subnet' doesn't exist in os.networkInterfaces() expect errors */ | ||
done(); | ||
} catch(error) { | ||
} | ||
catch (error) { | ||
done(error); | ||
} | ||
} else { | ||
} | ||
else { | ||
try { | ||
should.not.exist(err); | ||
should.exist(report); | ||
} catch(error) { | ||
} | ||
catch (error) { | ||
done(error); | ||
@@ -43,0 +46,0 @@ } |
@@ -10,3 +10,3 @@ /*! | ||
const nmap = require('../'); | ||
const timeout = 1024 * 1024; | ||
const timeout = 1024 * 1024 * 3; | ||
const chai = require('chai'); | ||
@@ -25,9 +25,9 @@ const should = chai.should(); | ||
describe('scan method', function() { | ||
describe('scan method', function () { | ||
context('reporting', function() { | ||
it('json', function(done) { | ||
context('reporting', function () { | ||
it('json', function (done) { | ||
this.timeout(timeout); | ||
nmap.scan(opts, function(err, report) { | ||
nmap.scan(opts, function (err, report) { | ||
should.not.exist(err); | ||
@@ -40,7 +40,7 @@ | ||
it('xml', function(done) { | ||
it('xml', function (done) { | ||
this.timeout(timeout); | ||
opts.json = false; | ||
nmap.scan(opts, function(err, report) { | ||
nmap.scan(opts, function (err, report) { | ||
should.not.exist(err); | ||
@@ -47,0 +47,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
0
-100%100
25%1612
72.96%3
-25%153654
-34.88%29
-65.06%