java.lang.Object
me.gosimple.nbvcxz.matching.match.BaseMatch
me.gosimple.nbvcxz.matching.match.DictionaryMatch
- All Implemented Interfaces:
Match
public final class DictionaryMatch extends BaseMatch
- Author:
- Adam Brusselback
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DictionaryMatch(java.lang.String match, Configuration configuration, int start_index, int end_index, java.lang.String dictionary_value, int rank, java.util.List<java.lang.Character[]> leetSubstitution, boolean excluded, boolean reversed, java.lang.String dictionary_name, int distance)Create a newDictionaryMatch -
Method Summary
Modifier and Type Method Description java.lang.StringgetDetails()Returns details about this match in the form of a String to be printed directlyjava.lang.StringgetDictionaryName()java.lang.StringgetDictionaryValue()intgetDistance()java.util.List<java.lang.Character[]>getLeetSubstitution()intgetRank()booleanisLeet()booleanisReversed()Methods inherited from class me.gosimple.nbvcxz.matching.match.BaseMatch
calculateEntropy, getAverageEntropy, getEndIndex, getLength, getStartIndex, getToken, log2, nCk, setEntropy
-
Constructor Details
-
DictionaryMatch
public DictionaryMatch(java.lang.String match, Configuration configuration, int start_index, int end_index, java.lang.String dictionary_value, int rank, java.util.List<java.lang.Character[]> leetSubstitution, boolean excluded, boolean reversed, java.lang.String dictionary_name, int distance)Create a newDictionaryMatch- Parameters:
match- theStringwe are creating theDictionaryMatchfrom.configuration- theConfigurationobject.start_index- the start index in the password for this match.end_index- the end index in the password for this match.dictionary_value- the dictionary valuerank- The rank of the match in the dictionaryleetSubstitution- If leet substitution was used or notexcluded- if the dictionary was an exclusion dictionaryreversed- if the password was reversed to matchdictionary_name- the name of the dictionary matcheddistance- the distance for this dictionary match
-
-
Method Details
-
getRank
public int getRank()- Returns:
- the rank of the password in the dictionary
-
isLeet
public boolean isLeet()- Returns:
- true if the password is written in leet, false otherwise
-
getDictionaryName
public java.lang.String getDictionaryName()- Returns:
- the dictionary name that created this match
-
getLeetSubstitution
public java.util.List<java.lang.Character[]> getLeetSubstitution()- Returns:
- the
ArrayListof the leet substitution
-
isReversed
public boolean isReversed()- Returns:
- true if the reversed password matches the dictionary entry
-
getDistance
public int getDistance()- Returns:
- the distance from the dictionary entry the match was made with
-
getDictionaryValue
public java.lang.String getDictionaryValue()- Returns:
- the value in the dictionary that the token matched (may not match exactly)
-
getDetails
public java.lang.String getDetails()Description copied from interface:MatchReturns details about this match in the form of a String to be printed directly- Specified by:
getDetailsin interfaceMatch- Overrides:
getDetailsin classBaseMatch- Returns:
- all specific details about this
Matchin printable String format.
-