testing
This commit is contained in:
+4
-1
@@ -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'])
|
||||
Reference in New Issue
Block a user