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.
@sunknudsen/totp
Advanced tools
@sunknudsen/totp has zero dependencies and 100% unit test code coverage.
Package is used in production by Superbacked and many others.
$ npm install @sunknudsen/totp
import {
generateSecret,
generateUri,
generateToken,
validateToken,
} from "@sunknudsen/totp"
const secret = generateSecret()
console.log(secret)
// DMJKP7AU22WKWRG3DNIQ3ERA
const uri = generateUri(
"Superbacked",
"john@protonmail.com",
"DMJKP7AU22WKWRG3DNIQ3ERA",
"Superbacked"
)
console.log(uri)
// otpauth://totp/Superbacked:john%40protonmail.com?secret=DMJKP7AU22WKWRG3DNIQ3ERA&issuer=Superbacked&algorithm=SHA1&digits=6&period=30
const token = generateToken("DMJKP7AU22WKWRG3DNIQ3ERA")
console.log(token)
// 616692
const result = validateToken("DMJKP7AU22WKWRG3DNIQ3ERA", "616692")
console.log(result)
// true
FAQs
Generate and validate TOTP tokens.
The npm package @sunknudsen/totp receives a total of 7,698 weekly downloads. As such, @sunknudsen/totp popularity was classified as popular.
We found that @sunknudsen/totp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.