passwordsim

package module
v0.0.0-...-10f154f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2024 License: BSD-3-Clause Imports: 10 Imported by: 0

README

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

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPasswords

func CheckPasswords(passwords string, output string, passwordToCheck string, threshold float64)

CheckPasswords scans passwords dataset for passwords similar to passwordToCheck, where the normalised Damerau-Levenshtein distance is no higher than threshold, and writes the passwords and their respective normalised Damerau-Levenshtein distance scores to file output.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL