Skip to content

passwordsim lets you search for passwords similar to your specified password in any passwords dataset. The similarity metric used is the Damerau-Levenshtein distance.

License

Notifications You must be signed in to change notification settings

elliotwutingfeng/passwordsim

passwordsim

Go Reference Go Report Card Coveralls

GitHub license

Summary

passwordsim lets you search for passwords similar to your specified password in any passwords dataset. The similarity metric used is the Damerau-Levenshtein distance.

Use cases

  • Choosing strong passwords
  • Guessing password variants

Requirements

Tested on Linux x64

  • Fast multicore CPU
  • At least 32 GB RAM recommended for larger datasets (multi-GB)
  • Go 1.19

Installation

go get github.com/elliotwutingfeng/passwordsim

Setup

passwordsim executable will be created in the folder 'dist/'

make build_cli

Usage

Search for passwords similar to 'correct horse battery staple' in 'test/passwords.txt', with a normalised Damerau-Levenshtein distance score no larger than 0.3.

dist/passwordsim -f 'test/passwords.txt' -o 'output.txt' -p 'correct horse battery staple' -t 0.3

For Windows systems, use back slashes \.

Terminal output

Searching for similar passwords...
3 similar passwords found in 'test/passwords.txt'. Threshold: 0.30
Results saved to file 'output.txt'.

File output

Filename: output.txt

correct horse battery staple 0
incorrect horse battery staple 0.06666666666666667
incorrect horse battery st@ple 0.1

The number on the right of each password is its normalised Damerau-Levenshtein distance score relative to your specified password. Scores range from 0 to 1. The smaller the number, the more similar the password. 0 implies exact match.

Password datasets

About

passwordsim lets you search for passwords similar to your specified password in any passwords dataset. The similarity metric used is the Damerau-Levenshtein distance.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks