This commit is contained in:
=
2025-08-20 15:04:57 -04:00
parent 7d7db9eb2a
commit 0645982090
7 changed files with 47 additions and 10 deletions
+4 -1
View File
@@ -3,7 +3,7 @@ import requests
import json
import os
def allowlistexechistories(url):
def allowlistexechistories(url, outputjson: bool):
endpoint = url + '/v1/group'
print("[+] Grabbing All Policies")
payload = {}
@@ -23,11 +23,14 @@ def allowlistexechistories(url):
endpoint = url + '/v1/logging/exechistories'
payload_dict = {
"type":[1,2,6,7],
"checkpoint":"000000000000000000000"
"policy": [policiesnames[choice]]
}
payload = json.dumps(payload_dict)
print(payload)
response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False)
if outputjson == True:
return response
parse_text = json.loads(response.text)
for item in parse_text['response']['exechistories']:
print(item['checkpoint'])