Checkpoint Stomper
This commit is contained in:
Binary file not shown.
Binary file not shown.
+22
-2
@@ -22,7 +22,8 @@ def allowlistexechistories(url):
|
|||||||
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":"68a153c23963989b484541b4",
|
||||||
"policy": [policiesnames[choice]]
|
"policy": [policiesnames[choice]]
|
||||||
}
|
}
|
||||||
payload = json.dumps(payload_dict)
|
payload = json.dumps(payload_dict)
|
||||||
@@ -30,4 +31,23 @@ def allowlistexechistories(url):
|
|||||||
response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False)
|
response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False)
|
||||||
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']:
|
||||||
|
filenametest.add(item['filename'])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user