#password-hash #password #security #nist #command-line-tool

app haveibeenpwned-downloader

cli tool to download leaked password hashes from haveibeenpwned api

3 releases (breaking)

new 0.3.0 Nov 28, 2024
0.2.0 Nov 28, 2024
0.1.0 Jun 30, 2024

#852 in Command line utilities

Download history 11/week @ 2024-09-12 7/week @ 2024-09-19 1/week @ 2024-09-26

123 downloads per month

MIT license

22KB
384 lines

Have I Been Pwned Downloader

Inspired by https://github.com/HaveIBeenPwned/PwnedPasswordsDownloader


haveibeenpwned-downloader is a cli tool to download all Pwned Passwords hash ranges and save them offline so they can be used without a dependency on the k-anonymity API.

Installation

With cargo:

cargo install haveibeenpwned-downloader

Or just grab a release from release page.

Usage

Usage: haveibeenpwned-downloader [OPTIONS]

Options:
  -o, --output <OUTPUT>  Output of the program, can be stdout, or file [default: -]
  -f, --format <FORMAT>  Output format, can be text or binary. Only affects `file` output [default: text] [possible values: text, binary]
  -s, --sorted           Whether output should be sorted
  -h, --help             Print help
  -V, --version          Print version

Download all SHA1 hashes to a single txt file called pwnedpasswords.txt

haveibeenpwned-downloader -o pwnedpasswords.txt

Download all SHA1 hashes to a single binary file called pwnedpasswords.bin

haveibeenpwned-downloader -f binary -o pwnedpasswords.txt 

Download all SHA1 hashes and output them to stdout in sorted order

haveibeenpwned-downloader -s -o -

Binary Format

Binary output format writes file that is just a sequence of items, where each item is:

0                        20                28
|------------------------|-----------------| 
|   password sha1 hash   |    prevalence   |
|------------------------|-----------------| 

Dependencies

~18–32MB
~478K SLoC