def do_run_jtr_wordlist_mode(pJTR: JohnTheRipper, pWordlist: str, pRule: str) -> None: lCrackingMode = "Wordlist {}".format(os.path.basename(pWordlist)) if pRule: lCrackingMode += " with rule {}".format(pRule) lWatcher = Watcher(pCrackingMode=lCrackingMode, pJTR=pJTR) lWatcher.start_timer() lWatcher.print_mode_start_message() pJTR.run_wordlist_mode(pWordlist=pWordlist, pRule=pRule) lWatcher.stop_timer() lWatcher.print_mode_finsihed_message() gReporter.appendRecord( pMode=lCrackingMode, pMask="", pWordlist=pWordlist, pRule=pRule, pNumberPasswordsCracked=lWatcher.number_passwords_cracked_by_this_mode, pNumberPasswordsCrackedPerSecond=lWatcher. number_passwords_cracked_by_this_mode_per_second, pPercentPasswordsCracked=lWatcher. percent_passwords_cracked_by_this_mode)
def do_run_jtr_prince_mode(pJTR: JohnTheRipper) -> None: lCrackingMode = "John the Ripper (JTR) Prince Mode" lWatcher = Watcher(pCrackingMode=lCrackingMode, pJTR=pJTR) lWatcher.start_timer() lWatcher.print_mode_start_message() pJTR.prince_element_count_min = 2 pJTR.prince_element_count_max = 3 pJTR.path_to_wordlist = "dictionaries" pJTR.wordlist = "prince.txt" pJTR.run_prince_mode() pJTR.prince_element_count_min = 2 pJTR.prince_element_count_max = 2 pJTR.wordlist = "short-list.txt" pJTR.run_prince_mode() pJTR.wordlist = "top-10000-english-words.txt" pJTR.run_prince_mode() lWatcher.stop_timer() lWatcher.print_mode_finsihed_message() gReporter.appendRecord( pMode=lCrackingMode, pMask="", pWordlist="", pRule="", pNumberPasswordsCracked=lWatcher.number_passwords_cracked_by_this_mode, pNumberPasswordsCrackedPerSecond=lWatcher. number_passwords_cracked_by_this_mode_per_second, pPercentPasswordsCracked=lWatcher. percent_passwords_cracked_by_this_mode)
def do_run_jtr_single_mode(pJTR: JohnTheRipper) -> None: lCrackingMode = "John the Ripper (JTR) Single Crack" lWatcher = Watcher(pCrackingMode=lCrackingMode, pJTR=pJTR) lWatcher.start_timer() lWatcher.print_mode_start_message() pJTR.run_single_crack() lWatcher.stop_timer() lWatcher.print_mode_finsihed_message() gReporter.appendRecord( pMode=lCrackingMode, pMask="", pWordlist="", pRule="", pNumberPasswordsCracked=lWatcher.number_passwords_cracked_by_this_mode, pNumberPasswordsCrackedPerSecond=lWatcher. number_passwords_cracked_by_this_mode_per_second, pPercentPasswordsCracked=lWatcher. percent_passwords_cracked_by_this_mode)