Enhanced Quiet Finder
This commit is contained in:
+11
-6
@@ -17,6 +17,7 @@ import dotenv
|
||||
import os
|
||||
import urllib3
|
||||
import utils.clientfunctions
|
||||
import utils.localapproval as la
|
||||
import utils.otpfunctions
|
||||
import utils.policyfunctions
|
||||
import utils.utils as ct
|
||||
@@ -39,8 +40,8 @@ threat_tolerance_constant = 4
|
||||
policy_relationship_map ={ #Enforcement : Audit
|
||||
"bf0b1f9b-bfea-4f44-97c0-80e27ff61712" : "538d3218-92f4-4943-a6ee-db9267ab62d8", #AT Servers General, AT Servers General Audit
|
||||
"31ababac-65de-4c6a-86dd-6691d7e3ee3b" : "fc05b42a-b846-4e72-88ca-c35d416e699f", #AT Epic, #AT Epic Audit
|
||||
"d1f58960-f866-49e0-848a-a5b09fffd4cd" : "d55c03a6-c376-4391-8626-4f843b882a7c" #AT DMZ Enforced, #AT DMZ Audit
|
||||
|
||||
"d1f58960-f866-49e0-848a-a5b09fffd4cd" : "d55c03a6-c376-4391-8626-4f843b882a7c", #AT DMZ Enforced, #AT DMZ Audit
|
||||
"504dd011-86b6-489a-b78f-eff589cef8aa" : "88a1cfdc-3b30-448b-b309-be16fe437ca3" #AT Workstations BCA, #AT Workstations BCA Audit3
|
||||
}
|
||||
|
||||
def main():
|
||||
@@ -57,14 +58,17 @@ def main():
|
||||
os.makedirs("scheduling", exist_ok=True)
|
||||
os.makedirs("OTP/HTML", exist_ok=True)
|
||||
os.makedirs("OTP/PARQ", exist_ok=True)
|
||||
|
||||
os.makedirs("Local_Approval/HTML", exist_ok=True)
|
||||
os.makedirs("Local_Approval/PARQ", exist_ok=True)
|
||||
ct.apivalidation()
|
||||
|
||||
register_function("monitorOTP", utils.otpfunctions.monitorOTP)
|
||||
register_function("updateAudit", utils.policyfunctions.updateAuditPoliciesFromEnforcementPolices)
|
||||
register_function("monitorLA", la.monitorLA)
|
||||
|
||||
if not os.path.exists("scheduling\\jobs.json"):
|
||||
recurring_job("monitorOTP", "monitorOTP", interval=60, unit="seconds", args=[url, pups])
|
||||
recurring_job("monitorLA", "monitorLA", interval=45, unit="seconds", args=[url, pups])
|
||||
recurring_job("updateAudit", "updateAudit", interval=10, unit="minutes", args=[url, policy_relationship_map])
|
||||
else:
|
||||
reload_jobs()
|
||||
@@ -104,9 +108,10 @@ def menu_main():
|
||||
utils.clientfunctions.findAgents(url, devicelist, False)
|
||||
|
||||
elif choice == "7":
|
||||
devicelist = utils.clientfunctions.promptForDevices()
|
||||
device_df = utils.clientfunctions.findAgents(url, devicelist, True)
|
||||
utils.clientfunctions.returnToEnforcement(url, device_df, policy_relationship_map, bad_publisher_list, pups, badpathparts, threat_tolerance_constant, path_exclusion_constant, min_files_for_path)
|
||||
la.generateLocalApprovals(url)
|
||||
|
||||
elif choice == "8":
|
||||
p
|
||||
elif choice == "Q":
|
||||
break
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user