All Projects → moltar → pwnedpasswords

moltar / pwnedpasswords

Licence: other
A wrapper for PwnedPasswords API by Troy Hunt (haveibeenpwned.com).

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pwnedpasswords

pywnedpasswords
Checkt pwnedpasswords.com in a secure way
Stars: ✭ 22 (+57.14%)
Mutual labels:  password, pwnedpasswords
Vital
Malware for Discord, designed to steal passwords, tokens, and inject discord folders for long-term use.
Stars: ✭ 50 (+257.14%)
Mutual labels:  password
oneshellcrack
a very very fast brute force webshell password tool
Stars: ✭ 42 (+200%)
Mutual labels:  password
lockd
Generate strong passwords and save them in Keychain. Made with SwiftUI
Stars: ✭ 38 (+171.43%)
Mutual labels:  password
PasswordX
Offline password manager for iOS/macOS
Stars: ✭ 26 (+85.71%)
Mutual labels:  password
secrets.clj
A library designed to generate cryptographically strong random numbers.
Stars: ✭ 64 (+357.14%)
Mutual labels:  password
FlowerPassword
🌸花密,不一样的密码管理器
Stars: ✭ 37 (+164.29%)
Mutual labels:  password
password
Fast and secure password generator and library
Stars: ✭ 38 (+171.43%)
Mutual labels:  password
Pwdb-Public
A collection of all the data i could extract from 1 billion leaked credentials from internet.
Stars: ✭ 2,529 (+17964.29%)
Mutual labels:  password
password-dart
A set of high-level APIs over PointyCastle and CryptoUtils to hash and verify passwords securely.
Stars: ✭ 40 (+185.71%)
Mutual labels:  password
macos-receiver
A MacOS TabBar (StatusBar) application that securely receives one-time passwords (OTPs) that you tapped in Raivo for iOS.
Stars: ✭ 44 (+214.29%)
Mutual labels:  password
OormiPass
Free open source cross platform password manager
Stars: ✭ 50 (+257.14%)
Mutual labels:  password
libopaque
c implementation of the OPAQUE protocol with bindings for python, php, ruby, lua, zig, java, erlang, golang and js.
Stars: ✭ 30 (+114.29%)
Mutual labels:  password
FlashPaper
One-time encrypted password/secret sharing
Stars: ✭ 85 (+507.14%)
Mutual labels:  password
ItroublveTSC
Official Source of ItroublveTSC, totally open source. No virus or anything. Feel free to have a look :)
Stars: ✭ 82 (+485.71%)
Mutual labels:  password
LAPSforMac
Local Administrator Password Solution for Mac
Stars: ✭ 29 (+107.14%)
Mutual labels:  password
kubectl-gopass
Plugin for kubectl to support reading and writing secrets directly from/to gopass
Stars: ✭ 28 (+100%)
Mutual labels:  password
CockyGrabber
C# library for the collection of browser information such as cookies, logins, and more
Stars: ✭ 46 (+228.57%)
Mutual labels:  password
ZipCrack
Crack password protected zip files
Stars: ✭ 23 (+64.29%)
Mutual labels:  password
service-desk
Application for support team who need to check and reset user passwords
Stars: ✭ 23 (+64.29%)
Mutual labels:  password

pwnedpasswords

Travis npm Known Vulnerabilities

A dependency-free Node.js module for interfacing with the PwnedPasswords API by Troy Hunt (haveibeenpwned.com).

This module implements the new and improved version 2 of the API. This version of the API implements k-Anonymity and does NOT send even the hashed version of the passwords to third party. It only sends the first 5 characters of the SHA-1 hash. You can read more about it in the Troy Hunt's blog announcement post.

The reason I chose not to use any dependencies (e.g. request or got) is first, because it is a pretty simple API and can be handled easily by the built-in https module. But mainly, it is for security reasons. Dependency chain can get deep and unpredictable. One rogue module down the chain can intercept requests and hand over passwords elsewhere.

Installation

Please review the code before use.

Install and save exact module version, to avoid installing, another, potentially vulnerable version in the future.

If you need to upgrade, again, review the code and upgrade to an exact version you have witnessed yourself.

npm install --save-exact pwnedpasswords

Usage

The module implements three interfaces. Callback, promises and CLI.

Return value is an integer with a count of input password prevalence.

Zero (0) is returned when the password is not found.

Promises

const pwnedpasswords = require('pwnedpasswords')

pwnedpasswords('password')
  .then(count => {
    console.log('Password was found %d times.', count)
  })
  .catch(err => {
    console.error(err)
  })

Callback

const pwnedpasswords = require('pwnedpasswords')

pwnedpasswords('password', (err, count) => {
  if (err) {
    console.error(err)
  }

  console.log('Password was found %d times.', count)
})

CLI

It is not recommended to use this command with real passwords, as you are exposing the password to the process list and shell history. But this can be used for testing and educational scenarios or in other shell scripts.

$> ./node_modules/.bin/pwnedpasswords password
3730471

Or if installed globally, then run:

$> pwnedpasswords password
3730471

Or via npx:

$> npx -q pwnedpasswords password
3730471

Dependencies

None

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].