Class DictionaryMatch

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
  • 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 new DictionaryMatch
      Parameters:
      match - the String we are creating the DictionaryMatch from.
      configuration - the Configuration object.
      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 value
      rank - The rank of the match in the dictionary
      leetSubstitution - If leet substitution was used or not
      excluded - if the dictionary was an exclusion dictionary
      reversed - if the password was reversed to match
      dictionary_name - the name of the dictionary matched
      distance - 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 ArrayList of 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: Match
      Returns details about this match in the form of a String to be printed directly
      Specified by:
      getDetails in interface Match
      Overrides:
      getDetails in class BaseMatch
      Returns:
      all specific details about this Match in printable String format.