Revamped Menu & Split Exec History Function
This commit is contained in:
+23
-18
@@ -4,23 +4,8 @@ import json
|
||||
import os
|
||||
import time
|
||||
|
||||
def allowlistexechistories(url, outputjson: bool):
|
||||
endpoint = url + '/v1/group'
|
||||
print("[+] Grabbing All Policies")
|
||||
payload = {}
|
||||
headers = {
|
||||
"X-APIKey": os.getenv('APIKEY')
|
||||
}
|
||||
response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False)
|
||||
parse_text = json.loads(response.text)
|
||||
policiesnames = []
|
||||
policyids = []
|
||||
for index, list in enumerate(parse_text['response']['groups'], start=1):
|
||||
print(f"{index}. {list['name']}")
|
||||
policiesnames.append(list['name'])
|
||||
policyids.append(list['groupid'])
|
||||
choice = input("Select Policy Group: ")
|
||||
choice = int(choice) - 1
|
||||
def pullPolicyExechistories(url, choice, outputjson: bool):
|
||||
|
||||
checkpoint = '000000000000000000000000'
|
||||
json_output = {'error': 'Success', 'response': {'exechistories': []}}
|
||||
while True:
|
||||
@@ -88,4 +73,24 @@ def checkpoint_stomper(checkpoint, url, policy, headers):
|
||||
# response_fuzzer(checkpoint, url, policyname)
|
||||
|
||||
|
||||
print("Finished")
|
||||
print("Finished")
|
||||
|
||||
|
||||
def listPolicies(url):
|
||||
endpoint = url + '/v1/group'
|
||||
print("[+] Grabbing All Policies")
|
||||
payload = {}
|
||||
headers = {
|
||||
"X-APIKey": os.getenv('APIKEY')
|
||||
}
|
||||
response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False)
|
||||
parse_text = json.loads(response.text)
|
||||
policiesnames = []
|
||||
policyids = []
|
||||
for index, list in enumerate(parse_text['response']['groups'], start=1):
|
||||
print(f"{index}. {list['name']}")
|
||||
policiesnames.append(list['name'])
|
||||
policyids.append(list['groupid'])
|
||||
choice = input("Select Policy Group: ")
|
||||
choice = int(choice) - 1
|
||||
return choice
|
||||
Reference in New Issue
Block a user