feat: add infrastructure audit and diagnostic helper scripts
This commit is contained in:
20
scripts/test_sem_redirect.py
Normal file
20
scripts/test_sem_redirect.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import urllib.request
|
||||
import ssl
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
def test_url(url):
|
||||
print(f"Testing {url}:")
|
||||
try:
|
||||
req = urllib.request.Request(url, headers={'User-Agent': 'Mozilla/5.0'})
|
||||
with urllib.request.urlopen(req, context=ctx) as resp:
|
||||
print("Status:", resp.status)
|
||||
print(resp.read().decode())
|
||||
except urllib.error.HTTPError as e:
|
||||
print(f"HTTP {e.code}:", e.read().decode())
|
||||
|
||||
test_url("https://semaphore.snarfnet.net/api/auth/oidc/authentik/redirect")
|
||||
test_url("https://semaphore.snarfnet.net/api/auth/oidc/authentik/redirect/")
|
||||
|
||||
Reference in New Issue
Block a user