RustImplementation #23

Merged
mysticmomba merged 118 commits from RustImplementation into master 2025-11-04 18:13:24 -05:00
5 changed files with 8 additions and 10 deletions
Showing only changes of commit e58f6c9e77 - Show all commits
+4 -2
View File
@@ -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":
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

-3
View File
@@ -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")
+2 -4
View File
@@ -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):
+2 -1
View File
@@ -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'