From 6577d5f0e9c5440f0c2fb941a9c16a625d6e352c Mon Sep 17 00:00:00 2001 From: Driven-Element <129630760+Driven-Element@users.noreply.github.com> Date: Sun, 24 Aug 2025 14:20:12 -0400 Subject: [PATCH] Fixed typo, pulled what appeared to be unused modules --- AirlockTools.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/AirlockTools.py b/AirlockTools.py index 967b873..4ef9518 100644 --- a/AirlockTools.py +++ b/AirlockTools.py @@ -20,11 +20,9 @@ import utils.allowlist import utils.hashfunctions import utils.pathfunctions import utils.allowfunctions +import utils.colortext as ct import urllib3 import pandas as pd -import sqlite3 -import pathlib -import utils.colortext as ct urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) dotenv.load_dotenv() @@ -32,7 +30,7 @@ dotenv.load_dotenv() url = "https://172.17.22.240:3129" badpublisherlist = ["Brave Software, Inc.", "Zoom Video Communications, Inc."] path_exclusion_constant = 3 -treat_tolerance_constant = 4 +threat_tolerance_constant = 4 @@ -56,16 +54,16 @@ def apivalidation(): def menu_main(): while True: - print(ct.colorText("\n-----------------------------------", "yellow")) - print(ct.colorText("------------ Main Menu ------------", "yellow")) - print(ct.colorText("-----------------------------------", "yellow")) + print(ct.colorText("\n-----------------------------------", "white")) + print(ct.colorText("------------ Main Menu ------------", "white")) + print(ct.colorText("-----------------------------------", "white")) print(ct.colorText("1. Get All Events for Single Device", "yellow")) print(ct.colorText("2. Placeholder for Local Approval", "yellow")) print(ct.colorText("3. Placeholder for Another Tool", "yellow")) print(ct.colorText("4. Prepare Policy For Enforcement", "yellow")) print(ct.colorText("11. Exit", "yellow")) - choice = input(ct.colorText("Enter Menu Item: ", "white")) + choice = input(ct.colorText("\nEnter Menu Item: ", "white")) if choice == '1': utils.getdeviceevents.devicehistory(url,False) elif choice == "2": @@ -189,7 +187,7 @@ def menu_prepare_to_enforce(): print(ct.colorText("11. Exit", "cyan")) - choice = input(ct.colorText("Enter your choice: ", "yellow")) + choice = input(ct.colorText("\nEnter your choice: ", "white")) if choice == "1": first_policy_tuple = utils.allowlist.listPolicies(url) first_policy = first_policy_tuple[1][first_policy_tuple[0]] @@ -256,7 +254,7 @@ def menu_prepare_to_enforce(): elif choice == "6": if os.path.exists(f"dataframe_csv\\df_path_ineligible_{first_policy}_{second_policy}.csv") == True and os.path.exists(f"dataframe_csv\\df_path_eligible_{first_policy}_{second_policy}.csv") == True: - categorized = utils.hashfunctions.categorizeHashes(pd.read_csv(f"dataframe_csv\\df_augmented_combo_{first_policy}_{second_policy}.csv"), treat_tolerance_constant, badpublisherlist) + categorized = utils.hashfunctions.categorizeHashes(pd.read_csv(f"dataframe_csv\\df_augmented_combo_{first_policy}_{second_policy}.csv"), threat_tolerance_constant, badpublisherlist) categorized[0].to_html(f"dataframe_html\\df_hashes_needing_approval_{first_policy}_{second_policy}.html", index=False) categorized[0].to_csv(f"dataframe_csv\\df_hashes_needing_approval_{first_policy}_{second_policy}.csv", index=False) categorized[1].to_html(f"dataframe_html\\df_automatically_approved_hashes_{first_policy}_{second_policy}.html", index=False)