
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
A library to test if a url(request) is crawled, usually used in a web crawler. Compatible with `request` and `node-crawler`
A library to test if a url/request is crawled, usually used in a web crawler. Compatible with request and node-crawler. The 1.x or newer version has quite different APIs and is not compatible with 0.x versions. Please read the upgrade guide document.
$ npm install seenreq --save
const seenreq = require('seenreq')
, seen = new seenreq();
//url to be normalized
let url = "http://www.GOOGLE.com";
console.log(seen.normalize(url));//{ sign: "GET http://www.google.com/\r\n", options: {} }
//request options to be normalized
let option = {
uri: 'http://www.GOOGLE.com',
rupdate: false
};
console.log(seen.normalize(option));//{sign: "GET http://www.google.com/\r\n", options:{rupdate: false} }
seen.initialize().then(()=>{
return seen.exists(url);
}).then( (rst) => {
console.log(rst[0]);//false if ask for a `request` never see
return seen.exists(opt);
}).then( (rst) => {
console.log(rst[0]);//true if got same `request`
}).catch(e){
console.error(e);
};
When you call exists
, the module will do normalization itself first and then check if exists.
seenreq
stores keys in memory by default, memory usage will soar as number of keys increases. Redis will solve this problem. Because seenreq uses ioredis
as redis client, all ioredis
' options are recived and supported. You should first install:
npm install seenreq-repo-redis --save
and then set repo to redis
:
const seenreq = require('seenreq')
let seen = new seenreq({
repo:'redis',// use redis instead of memory
host:'127.0.0.1',
port:6379,
clearOnQuit:false // clear redis cache or don't when calling dispose(), default true.
});
seen.initialize().then(()=>{
//do stuff...
}).catch(e){
console.error(e);
}
It is similar with redis above:
npm install seenreq-repo-mongo --save
const seenreq = require('seenreq')
let seen = new seenreq({
repo:'mongo',
url:'mongodb://xxx/seenreq',
collection: 'foor'
});
Instance of seenreq
Initialize the repo, returns a promise.
uri
String, option
is Option of request or node-crawlerReturns normalized Object: {sign,options}.
Returns a promise with an Boolean array, e.g. [true, false, true, false, false].
Dispose resources of repo. If you are using repo other than memory, like Redis you should call dispose
to release connection. Returns a promise.
ts
property in the url like http://www.xxx.com/index?ts=1442382602504
which is timestamp and it should be same whenever you visit.repo update
. Store in repo so that seenreq
can hit the same req
next time (Default true).mysql
repo to persist keys to disk.FAQs
A library to test if a url(request) is crawled, usually used in a web crawler. Compatible with `request` and `node-crawler`
The npm package seenreq receives a total of 2,918 weekly downloads. As such, seenreq popularity was classified as popular.
We found that seenreq 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.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.