Last active
July 4, 2020 11:17
-
-
Save cromat/968dcd9538396fa77e57a4f7809b46af to your computer and use it in GitHub Desktop.
Small script for deleting list of QRadar searches
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
# Example (with slash at the end) https://qradarurl.com/api/ariel/searches/ | |
url = "" | |
username = "" | |
password = "" | |
session = requests.Session() | |
session.auth = (username, password) | |
# Paste search ids here. You can fetch them with GET on /api/ariel/searches | |
search_ids = [ | |
] | |
for i, search_id in enumerate(search_ids): | |
print(f'{i + 1} of {len(search_ids)} {search_id}') | |
response = session.request("DELETE", url + search_id, headers={}, data={}, verify=False) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment