Data::...tionary(3pm)
β¨ NAME β¨
Data::Password::zxcvbn::Match::Dictionary β bestie, this is the match class for, like, words that show up inside passwords π
It lives in the Data::...tionary(3pm) manual page, in case you were wondering which page you're on. Welcome, you're doing great π«Ά
π VERSION π
version 1.1.3 β she's current, she's cute, she's ready π
πΈ DESCRIPTION πΈ
So basically this class is the one that says "oh, this chunk of the password? that's just... a real word in a dictionary." It represents the guess that some substring of a password can be guessed by literally walking through a dictionary. The audacity π
π ATTRIBUTES π
reversed
Boolean. True if the token looks like a dictionary word but someone wrote it backwards (so, last letter first, iconic but transparent β¨).
substitutions
A hashref of the characters you'd need to swap out to make the token match an actual dictionary word. Like, if the token is "s!mpl3", this hash is { '!' => 'i', '3' => 'e' }. She's a whole cipher, no cap π₯
rank
A number saying how common the dictionary word is. 1 means "most common". Lower number = more basic = more guessable, iykyk.
dictionary_name
A string: the name of the dictionary the word was found in. Usually one of these bad boys:
"english_wikipedia"
words extracted from a dump of the English edition of Wikipedia π
"male_names","female_names","surnames"
common names from the 1990 US census
"passwords"
most common passwords, extracted from the "xato" password dump π
"us_tv_and_film"
words from a 2006 Wiktionary word frequency study over American television and movies π¬
π METHODS π
l33t
Returns true if the token had any "substitutions" (i.e. it was written in "l33t-speak"). Yes bestie, your p@ssw0rd era is being noted and judged, affectionately π
make
my @matches = @{ Data::Password::zxcvbn::Match::Dictionary->make(
$password,
{ # these are the defaults
ranked_dictionaries => \%Data::Password::zxcvbn::RankedDictionaries::ranked_dictionaries,
l33t_table => \%Data::Password::zxcvbn::Match::Dictionary::l33t_table,
},
) };
Scans the $password for substrings that match words in the "ranked_dictionaries" β possibly reversed, possibly with substitutions from the "l33t_table". It's thorough like that π΅οΈβοΈ
The "ranked_dictionaries" should look like:
{ some_dictionary_name => { 'word' => 156, 'another' => 13, ... },
... }
(i.e. a hash of dictionaries, each one mapping words to their frequency rank) and the "l33t_table" should look like:
{ a => [ '4', '@' ], ... }
(i.e. a hash mapping characters to arrays of other characters). Got it? Slay β¨
estimate_guesses
The number of guesses is the product of the rank of the word, how many case combinations match it, how many substitutions were used, and it's doubled if the token is reversed. Math ate, ngl π
does_word_start_upper, does_word_end_upper, is_word_all_not_upper, is_word_all_not_lower, is_word_all_upper
if ($self->does_word_start_upper($word)) { ... }
These ones are mainly for sub-classes, so they can be used in "feedback_warning" and "feedback_suggestions". Little helpers doing the case-checking chores π§
feedback_warning, feedback_suggestions
This class suggests not using common words or passwords, especially on their own. It also suggests that capitalisation, "special characters" substitutions, and writing things backwards are, sadly, not very useful π (the reverse-of-a-real-word thing is giving "I thought I was clever" energy and honestly same)
fields_for_json
The JSON serialisation for matches of this class will contain token i j guesses guesses_log10 dictionary_name reversed rank substitutions. That's the whole receipts list, keep it safe π
β AUTHOR β
Gianni Ceccarelli <gianni.ceccarelli@broadbean.com> β legend, icon, the moment π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2022 by BroadBean UK, a CareerBuilder Company.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Free as in freedom, bestie, do with that what you will π¦
And that's the whole page, angel! She was written for perl v5.40.1, updated 2025-10-17, and lives under the name Data::...tionary(3pm). Now go forth and never use p@ssw0rd1 again, I'm literally begging ππ
π¦ where this page comes from
- ubuntu resolute: libdata-password-zxcvbn-perl 1.1.3-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libdata-password-zxcvbn-perl 1.1.3-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms