diff --git a/AirlockTools.py b/AirlockTools.py index bb7c7b6..6d1b728 100644 --- a/AirlockTools.py +++ b/AirlockTools.py @@ -23,12 +23,11 @@ import utils.policyfunctions import utils.utils as ct import pandas as pd + from utils.perstscheduler import register_function, run_once_job, recurring_job, reload_jobs, start_scheduler urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) - dotenv.load_dotenv() - #Constants url = os.getenv('url') bad_publisher_list = ["Brave","Zoom", "GlavSoft", "VNC"] @@ -117,6 +116,9 @@ def menu_main(): elif choice == "8": las = la.getLocalApprovals(url) las.to_csv("la.csv", index=False) + + elif choice == "9": + pass elif choice == "10": utils.clientfunctions.moveAgentToAudit(url,"6a221ece-0c10-4eb8-b1e5-06a1000a5696",policy_relationship_map) elif choice == "11": diff --git a/icon.ico b/icon.ico new file mode 100644 index 0000000..eb6d558 Binary files /dev/null and b/icon.ico differ diff --git a/utils/clientfunctions.py b/utils/clientfunctions.py index 08ae71f..3e73fe2 100644 --- a/utils/clientfunctions.py +++ b/utils/clientfunctions.py @@ -90,8 +90,6 @@ def getPolicyFromClientID(url, clientid): policy_id = data.loc[0, "groupid"] return policy_name, policy_id - - def getPolicyName(url, groupid): endpoint = url + '/v1/group/' payload = {} @@ -113,7 +111,6 @@ def getPolicyName(url, groupid): return name - def devicehistory(url, outputjson: bool): endpoint = url + '/v1/getexechistory' print("\n") diff --git a/utils/pathfunctions.py b/utils/pathfunctions.py index 7082edb..e347bcb 100644 --- a/utils/pathfunctions.py +++ b/utils/pathfunctions.py @@ -19,15 +19,13 @@ import utils.pathfunctions as pathf import utils.utils as ct #Standard Libary Imports: -import ast -import gc -import json + import os import re #3rd Party Imports: import pandas as pd -import requests + def split_filepaths_grouped(df, col="filename", group_parts=4, min_parts=4): def clean_split(path): diff --git a/utils/policyfunctions.py b/utils/policyfunctions.py index 53058da..b1d9e52 100644 --- a/utils/policyfunctions.py +++ b/utils/policyfunctions.py @@ -174,6 +174,7 @@ def pullPolicyExechistories(url, policiesnames, type, days, outputjson: bool): with tqdm.tqdm(file=sys.stdout, leave=True, total=10000, desc=f"Checkpoint Progess: {checkpoint}", colour="blue", initial=1) as filebar: with tqdm.tqdm(file=sys.stdout, leave=True, total=100, desc=f"Total of {policiesnames} Complete: ") as pbar: while True: + item = {} json_response_data = checkpoint_stomper(checkpoint, url, type, policiesnames, headers) histories = json_response_data['response']['exechistories'] filebar.total=len(histories) @@ -631,7 +632,7 @@ def getDestAllowlist(url, groupid): allowlists = getPolicyAllowlists(url, groupid) - matches = allowlists.loc[ + matches = allowlists[ allowlists['name'].str.contains('local', case=False, na=False) & allowlists['name'].str.contains('approval', case=False, na=False), 'applicationid'