Working preflight
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user