Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
The isbot-fast
package is needed to quickly identify most bots/crawlers/spiders using a user-agent. It runs more than 10 times faster than the isbot
package.
In addition to the search bots, isbot-fast
identifies:
Note: the purpose of the package is not to determine absolutely all bots, since this will significantly slow down the speed of work. isbot-fast
probably determines 99.5% of all requests sent by bots at the moment. If you want to identify even more existing bots, then pay attention to the isbot
package.
The result of the function is a boolean value.
npm install isbot-fast --save
const isBot = require('isbot-fast');
isBot('Googlebot/2.1 (+http://www.google.com/bot.html)');
// true
isBot('Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14');
// false
If you want to maintain performance and exclude some bots that bother you, then add these bots to the additional exclusion list as shown in the example below.
const isBot = require('isbot-fast');
isBot('W3C_Validator/1.3');
// false
isBot.extend(['validator', 'image']);
isBot('W3C_Validator/1.3');
// true
const isBot = require('isbot-fast');
const ua = req.headers['user-agent'] || '';
if (isBot(ua)) {
// Provide static page for spiders when you have a single page app
} else {
// Making cookies
}
isbot-fast
is MIT licensed.
FAQs
JavaScript module detecting bots/crawlers/spiders via user-agent
The npm package isbot-fast receives a total of 8,960 weekly downloads. As such, isbot-fast popularity was classified as popular.
We found that isbot-fast demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.