Zar-Branch #5
+22
-3
@@ -22,8 +22,8 @@ def allowlistexechistories(url, outputjson: bool):
|
||||
choice = int(choice) - 1
|
||||
endpoint = url + '/v1/logging/exechistories'
|
||||
payload_dict = {
|
||||
"type":[1,2,6,7],
|
||||
"checkpoint":"000000000000000000000"
|
||||
"type":[1],
|
||||
"checkpoint":"68a153c23963989b484541b4",
|
||||
"policy": [policiesnames[choice]]
|
||||
}
|
||||
payload = json.dumps(payload_dict)
|
||||
@@ -33,4 +33,23 @@ def allowlistexechistories(url, outputjson: bool):
|
||||
return response
|
||||
parse_text = json.loads(response.text)
|
||||
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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user