From b69d5b19d845fb526b27ec452f4cfa45fb3ec1b8 Mon Sep 17 00:00:00 2001 From: bandrel Date: Fri, 26 Oct 2018 10:57:33 -0400 Subject: [PATCH] corrected rule choice logic to allow for a 0. --- hate_crack.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hate_crack.py b/hate_crack.py index 4ff4587..3aa5509 100755 --- a/hate_crack.py +++ b/hate_crack.py @@ -892,10 +892,12 @@ def quick_crack(): print("\nWhich rule(s) would you like to run?") rule_number = 1 + print('(0) To run without any rules') for rule in hcatRules: print('({0}) {1}'.format(rule_number, rule)) rule_number += 1 - print(('(99) YOLO...run all of the rules')) + print('(99) YOLO...run all of the rules') + while rule_choice is None: rule_choice = input('Enter Comma separated list of rules you would like to run. To run rules chained use the + symbol.\n' 'For example 1+1 will run {0} chained twice and 1,2 would run {0} and then {1} sequentially.\n' @@ -922,6 +924,7 @@ def quick_crack(): for rule in hcatRules: selected_hcatRules.append('-r {hcatPath}/rules/{selected_rule}'.format(selected_rule=rule, hcatPath=hcatPath)) + #Run Quick Crack with each selected rule for chain in selected_hcatRules: hcatQuickDictionary(hcatHashType, hcatHashFile, chain)