feat: add infrastructure audit and diagnostic helper scripts

This commit is contained in:
2026-11-06 12:37:49 -05:00
parent 06c203485f
commit aea8608f3d
44 changed files with 1141 additions and 1 deletions

View File

@@ -0,0 +1,24 @@
import urllib.request
import ssl
import json
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
# Test authorize URL for pihole1
url1 = "https://authentik.snarfnet.net/application/o/authorize/?client_id=H5MRodgRNAMuKv2fXsj3roxfO1f9ImOSRAN2Pi47&redirect_uri=https%3A%2F%2Fpihole1.snarfnet.net%2Foutpost.goauthentik.io%2Fcallback%3FX-authentik-auth-callback%3Dtrue&response_type=code&scope=ak_proxy+openid+entitlements+profile+email"
req = urllib.request.Request(url1, headers={'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64)'})
try:
with urllib.request.urlopen(req, context=ctx, timeout=8) as resp:
print("Status code:", resp.status)
print("Final URL:", resp.url)
content = resp.read().decode('utf-8')
print("Content sample (first 500 chars):")
print(content[:500])
except urllib.error.HTTPError as e:
print(f"HTTP Error {e.code}: {e.read().decode('utf-8')[:500]}")
except Exception as e:
print("Exception:", e)