diff --git a/utils/__pycache__/allowlist.cpython-313.pyc b/utils/__pycache__/allowlist.cpython-313.pyc index f029c4b..3f3e038 100644 Binary files a/utils/__pycache__/allowlist.cpython-313.pyc and b/utils/__pycache__/allowlist.cpython-313.pyc differ diff --git a/utils/__pycache__/getdeviceevents.cpython-313.pyc b/utils/__pycache__/getdeviceevents.cpython-313.pyc index a7fc471..f039bb8 100644 Binary files a/utils/__pycache__/getdeviceevents.cpython-313.pyc and b/utils/__pycache__/getdeviceevents.cpython-313.pyc differ diff --git a/utils/allowlist.py b/utils/allowlist.py index c8bbbdb..edb3c6f 100644 --- a/utils/allowlist.py +++ b/utils/allowlist.py @@ -22,7 +22,8 @@ def allowlistexechistories(url): choice = int(choice) - 1 endpoint = url + '/v1/logging/exechistories' payload_dict = { - "type":[1,2,6,7], + "type":[1], + "checkpoint":"68a153c23963989b484541b4", "policy": [policiesnames[choice]] } payload = json.dumps(payload_dict) @@ -30,4 +31,23 @@ def allowlistexechistories(url): response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False) parse_text = json.loads(response.text) for item in parse_text['response']['exechistories']: - print(item['checkpoint']) \ No newline at end of file + 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']: + filenametest.add(item['filename']) +