Added prompt for number of days
This commit is contained in:
+15
-2
@@ -176,6 +176,7 @@ def menu_prepare_to_enforce():
|
||||
allowlist_parent_id = " "
|
||||
allowlist_child_name = " "
|
||||
allowlist_child_id = " "
|
||||
history_days = 1
|
||||
|
||||
#If the directorys where we're going to store our output dont exist, make them.
|
||||
if not os.path.exists("parquet"): os.makedirs("parquet")
|
||||
@@ -208,11 +209,23 @@ def menu_prepare_to_enforce():
|
||||
|
||||
elif choice == "2":
|
||||
|
||||
|
||||
while True:
|
||||
try:
|
||||
history_days = int(input("Enter the how many days in of history do you want to pull - select a number between 1 and 150: "))
|
||||
if 1 <= history_days <= 150:
|
||||
break
|
||||
else:
|
||||
print("Invalid input. Please enter a number between 1 and 150.")
|
||||
except ValueError:
|
||||
print("Invalid input. Please enter a valid integer.")
|
||||
|
||||
|
||||
if not os.path.exists(f"parquet\\execution_history_{first_policy}.parquet"):
|
||||
utils.policyfunctions.getPolicyInfo(url, first_policy, 150)
|
||||
utils.policyfunctions.getPolicyInfo(url, first_policy, history_days)
|
||||
|
||||
if not os.path.exists(f"parquet\\execution_history_{second_policy}.parquet"):
|
||||
utils.policyfunctions.getPolicyInfo(url, second_policy, 150)
|
||||
utils.policyfunctions.getPolicyInfo(url, second_policy, history_days)
|
||||
|
||||
if not os.path.exists(f"parquet\\combined_hashlist_{first_policy}_{second_policy}.parquet"):
|
||||
utils.hashfunctions.combineHashes(url, first_policy, second_policy)
|
||||
|
||||
Reference in New Issue
Block a user