Merge branch 'Zar-Branch' of https://git.racooncity.org/brotoskyj/Airlocktools into Zar-Branch

This commit is contained in:
=
2025-08-20 15:08:49 -04:00
+21 -2
View File
@@ -22,8 +22,8 @@ def allowlistexechistories(url, outputjson: bool):
choice = int(choice) - 1 choice = int(choice) - 1
endpoint = url + '/v1/logging/exechistories' endpoint = url + '/v1/logging/exechistories'
payload_dict = { payload_dict = {
"type":[1,2,6,7], "type":[1],
"checkpoint":"000000000000000000000" "checkpoint":"68a153c23963989b484541b4",
"policy": [policiesnames[choice]] "policy": [policiesnames[choice]]
} }
payload = json.dumps(payload_dict) payload = json.dumps(payload_dict)
@@ -34,3 +34,22 @@ def allowlistexechistories(url, outputjson: bool):
parse_text = json.loads(response.text) parse_text = json.loads(response.text)
for item in parse_text['response']['exechistories']: for item in parse_text['response']['exechistories']:
print(item['checkpoint']) print(item['checkpoint'])
print(item['datetime'])
print(item['hostname'])
print(item['filename'])
# checkpoint_stomper(item['checkpoint'], endpoint, headers, policiesnames[choice])
def checkpoint_stomper(checkpoint, endpoint, headers, policyname):
print(checkpoint)
payload_dict = {
"type":[1,2,6,7],
"checkpoint": checkpoint,
"policy":[policyname]
}
payload = json.dumps(payload_dict)
response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False)
parse_text = json.loads(response.text)
# Send Whole JSON Response
for item in parse_text['response']['exechistories']:
print("test")