Crates.io | haveibeenpwned |
lib.rs | haveibeenpwned |
version | 1.0.0 |
source | src |
created_at | 2022-06-02 05:32:22.682688 |
updated_at | 2022-06-18 20:57:28.157069 |
description | haveibeenpwned is a command-line application that uses HaveIBeenPwned service and can create and use Binary Fuse filter for efficient query at cost of false positives. |
homepage | https://github.com/CKingX/haveibeenpwned |
repository | https://github.com/CKingX/haveibeenpwned |
max_upload_size | |
id | 598675 |
size | 100,880 |
haveibeenpwned is a command-line application that uses HaveIBeenPwned service and can create and use Binary Fuse filter (which is smaller than Bloom filter or Cuckoo filter for the same false positive ratio) for efficient query at cost of false positives.
haveibeenpwed interactive-online
haveibeenpwned downloader [path to output file]
haveibeenpwned resume-download
haveibeenpwned interactive-file [path to filter file]
(Note that if you use versions of haveibeenpwned with the included filter or have already ran any command with the path to the filter file before, you do not need to input the path to filter file)haveibeenpwned create-filter [path to password file] [output path for filter file]
Be advised that creating a filter requires a significant amount of RAM. Testing on the downloaded passwords file (~34 GB) for creating a small filter alone used 11 GB on Windows. The Small filter has a false positive rate of <0.4%, while the Medium filter has a false positivity rate of 0.0016% and the Large filter has a false positivity rate of <1 in 4 billion.haveibeenpwned file-check [path to file with passwords to test] [path to filter]
(with optional -p [safe/compromised]
command to print either safe or compromised passwords from the file) (If you use the versions of haveibeenpwned with included filter or have loaded a filter manually before, you do not need to enter the path of the filter file again)Prebuilt filters are available (small, medium, large). The Windows installer, the .deb version of haveaibeenpwned, and haveibeenpwned on winget comes with the Small filter included. The Small filter has a size of 909 MiB (with false positivity rate of ~0.4%). The Medium filter has a size of 1.77 GiB (with false positivity rate of 0.0016%) and the Large filter has a size of 3.55 GiB (with false positivity rate of <1 in 4 billion).
As haveibeenpwned was in alpha, the design of the filter was not final at the time. Therefore, filter file compatibility was not maintained between versions until now. Filter created by version 0.4.0-alpha is not compatible with 0.5.0 (and version 0.5.0 has smaller filters than version 0.4.0). However, compatibility from v0.5.0 onwards is maintained.
haveibeenpwned can be downloaded from Releases page for Ubuntu .deb package for 18.04 and later, generic linux executable for 64-bit Intel systems (You may need to run chmod +x <path to binary>
), and Windows releases. For Windows, haveibeenpwned can also be installed with winget install haveibeenpwned
. If you have rustup installed (see Build Guide), you can install by running:
cargo intall haveibeenpwned
Currently, macOS builds are not provided as I do not have a Mac. However, using the build guide and installing with cargo install haveibeenpwned
should work. I will also work on creating a flatpak version of haveibeenpwned
If you use the deb file on Ubuntu, uninstall the deb package with:
sudo apt remove haveibeenpwned
Finally, install with the newer deb file.
For Windows, just replace the older haveibeenpwned.exe with the newer version. If you used winget to install, you can update using winget upgrade haveibeenpwned
. If you have used cargo install to install haveibeenpwned, running cargo install haveibeenpwned
will update it.
If you used the haveibeenpwned linux binary, just replace it with newer one (you may need to run chmod +x <path to haveibeenpwned>
again)
We can use cargo to build haveibeenpwned. We first need to install rustup and build tools (instructions for those can be found here). Then, we can build with:
git clone https://github.com/CKingX/haveibeenpwned.git
cd ./haveibeenpwned
cargo install --path ./
Now you can run by typing haveibeenpwned in terminal. Upgrading can be done with cargo install command again. If you would just like to build the binary, you can build the debug binary with:
cargo build
Release binary can be built with:
cargo build --release
The output of the build command will be in ./target/{debug/release}/haveibeenpwned
haveibeenpwned is licensed as AGPL 3.0. However, there will eventually be an MPL library that can use a filter to check passwords in other programs.