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.6
to
0.0.7
+1
-1
package.json
{
"name": "node-isbot",
"version": "0.0.6",
"version": "0.0.7",
"description": "isbot for nodejs, Contains most of the world's bot or spider",

@@ -5,0 +5,0 @@ "main": "index.js",

+23
-13
# node-isbot
[![NPM](https://nodei.co/npm/node-isbot.png)](https://nodei.co/npm/node-isbot/)
[![npm version](https://badge.fury.io/js/npm-utils-kingwell.svg)](http://badge.fury.io/js/node-isbot)

@@ -8,3 +12,3 @@

$ npm install node-isbot --save
$ npm install node-isbot --save

@@ -14,19 +18,25 @@ ### usage

const http = require('http');
const isbot = require('node-isbot');
isbot(req.headers['user-agent'])
isbot("Googlebot/2.1 (+http://www.google.com/bot.html)") // true
isbot("Googlebot") // true
isbot("yahoo") // true
isbot("Sogou Pic Spider") // true
isbot("PHP") // true
isbot("Baiduspider") // true
isbot("360Spider") // true
isbot("java/") // true
isbot("Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36") // false
http.createServer(function(req, res, next) {
isbot(req.headers['user-agent']);
isbot("Googlebot/2.1 (+http://www.google.com/bot.html)"); // true
isbot("Googlebot"); // true
isbot("yahoo"); // true
isbot("Sogou Pic Spider"); // true
isbot("PHP"); // true
isbot("Baiduspider"); // true
isbot("360Spider"); // true
isbot("java/"); // true
isbot("Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36"); // false
});
### test

@@ -56,2 +66,2 @@

http_client
yahoo
yahoo