New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

node-isbot

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-isbot - npm Package Compare versions

Comparing version
0.0.4
to
0.0.5
+8
browser.txt
"Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.76 Mobile Safari/537.36"
Mozilla/5.0 (Android; Mobile; rv:14.0) Gecko/14.0 Firefox/14.0
Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19
Mozilla/5.0 (compatible; WOW64; MSIE 10.0; Windows NT 6.2)
Mozilla/4.0 (Windows; MSIE 6.0; Windows NT 5.2)
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)
Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)
java/
360Spider
Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)
bingbot
Googlebot
http_client
yahoo
var isbot = require('./index.js');
var fs = require('fs');
var expect = require('chai').expect;
var path = require('path');
var browserPath = path.join(__dirname, 'browser.txt');
var crawlersPath = path.join(__dirname, 'crawlers.txt');
var browserFile = fs.readFileSync(browserPath, 'utf-8').trim().split('\n');
var crawlersFile = fs.readFileSync(crawlersPath, 'utf-8').trim().split('\n');
describe('Browser:', function() {
browserFile.forEach(function(item) {
item = item.replace(/\s/ig, '');
if (!item.length) {
return;
}
it('should not detect ' + item + ' as bot', function() {
expect(isbot(item)).to.be.false;
});
});
});
describe('Crawlers:', function() {
crawlersFile.forEach(function(item) {
item = item.replace(/\s/ig, '');
if (!item.length) {
return;
}
it('should detect ' + item + ' as bot', function() {
expect(isbot(item)).to.be.true;
});
});
});
+7
-3
{
"name": "node-isbot",
"version": "0.0.4",
"version": "0.0.5",
"description": "isbot for nodejs, Contains most of the world's bot or spider",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
"test": "mocha test.js"
},

@@ -39,3 +39,7 @@ "keywords": [

},
"homepage": "https://github.com/lengjh/node-isbot#readme"
"homepage": "https://github.com/lengjh/node-isbot#readme",
"devDependencies": {
"chai": "^4.1.1",
"mocha": "^3.5.0"
}
}