Working preflight

This commit is contained in:
brotoskyj
2025-08-28 12:27:15 -04:00
parent 710382ce61
commit 942efd38e8
3 changed files with 33 additions and 9 deletions
+22
View File
@@ -0,0 +1,22 @@
import requests
import dotenv
import json
import os
import utils.pretty as ct
url = 'https://172.17.22.240:3129'
policiesnames = []
policyids=[]
dotenv.load_dotenv()
endpoint = url + '/v1/application'
print(ct.colorText("[+] Grabbing All Allowlists", "cyan"))
payload = {}
headers = {
"X-APIKey": os.getenv('APIKEY')
}
response = requests.request("POST", endpoint, headers=headers, data=payload, verify=False)
parse_text = json.loads(response.text)
for index, list in enumerate(parse_text['response']['applications'], start=1):
if index >= 38:
print(list)
#Need else and catch for upper bound