22 lines
617 B
Python
22 lines
617 B
Python
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 |