
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
code-identifier
Advanced tools
A stateless, valid verification code verification tool based on keygrip.
opts.interval time intervalopts.max the max key countopts.app the name of application, for different app to generate codeconst CodeIdentifier = require('code-identifier');
const identifier = new CodeIdentifier({
interval: 51 * 1000,
max: 10,
app: 'my-test-app',
});
generate the code
len the length of codeprefix the prefix to generate code, such as track cookie, user account and so on. [optional]// { code: '512567', hash: 'flplYRZqe145QQJOlObmW8uNNY8' }
const result1 = identifier.genCode();
// { code: '53684948', hash: 'xixBFHNqGw6YdkPRLrTFR4NkyVI' }
const result2 = identifier.genCode(8);
// { code: '414337', hash: 'mTwUjHLhx_IGJ5FYbRT-np3b2ho' }
const result3 = identifier.genCode(6, 'track cookie');
verify the code
codehash the hash of genCodeprefix the same as genCode use// true
const valid1 = identifier.verify('512567', 'flplYRZqe145QQJOlObmW8uNNY8');
// true
const valid2 = identifier.verify('414337', 'mTwUjHLhx_IGJ5FYbRT-np3b2ho', 'track cookie');
Use custom function for get code
identifier.getCode = (len) => crypto.randomBytes(len).toString('hex');
// { code: 'df19f3', hash: 'IfR9zTryXWkA_k93zF2hb0D0YHk' }
const result = identifier.genCode(3);
FAQs
stateless code identifier
We found that code-identifier 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.