early alpha OTP'less local approval

This commit is contained in:
2025-09-29 22:36:12 -04:00
parent 789a8ed975
commit 4feb3ecca9
4 changed files with 74 additions and 29 deletions
+9 -8
View File
@@ -65,13 +65,14 @@ def main():
ct.apivalidation()
register_function("monitorOTP", utils.otpfunctions.monitorOTP)
register_function("updateAudit", utils.policyfunctions.updateAuditPoliciesFromEnforcementPolices)
# register_function("monitorLA", la.monitorLA)
register_function("monitorLA", la.scheduleAddingLAHashes)
register_function("updateAuditPolicies", utils.policyfunctions.updateAuditPoliciesFromEnforcementPolices)
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])
recurring_job("monitorLA", "monitorLA", interval=50, unit="seconds", args=[url, policy_relationship_map, bad_publisher_list, pups, threat_tolerance_constant])
recurring_job("updateAuditPolicies", "updateAudit", interval=5, unit="minutes", args=[url, policy_relationship_map])
else:
reload_jobs()
start_scheduler()
@@ -84,12 +85,13 @@ def main():
def menu_main():
while True:
ct.displayIntro();
print(ct.colorText("1. 🖥️ - Get All Events for Single Device", "yellow"))
print(ct.colorText("1. 🖥️ - Get All Events for Single Device", "yellow"))
print(ct.colorText("2. 🎫 - OTP", "yellow"))
print(ct.colorText("3. 🔇 - Find Quiet Hosts", "yellow"))
print(ct.colorText("4. 🔒 - Prepare Policy For Enforcement", "yellow"))
print(ct.colorText("5. 🔄 - Update Audit Policies from Enforcement Policies", "yellow"))
print(ct.colorText("6 🔍 - Device Search", "yellow"))
print(ct.colorText("6. 🔍 - Device Search", "yellow"))
print(ct.colorText("7. ➡️ - Move Devices to Local Approval", "yellow"))
print(ct.colorText("Q. 🔚 - Quit", "yellow"))
choice = input(ct.colorText("\nEnter Menu Item: ", "white"))
@@ -110,8 +112,7 @@ def menu_main():
utils.clientfunctions.findAgents(url, devicelist, False)
elif choice == "7":
pass
la.moveToLocalApproval(url, policy_relationship_map)
elif choice == "8":
las = la.getLocalApprovals(url)