feat: add automation scripts for NAS fixes, Authentik monitoring, and Technitium DNS management
This commit is contained in:
21
scripts/check_sn_nas_html.py
Normal file
21
scripts/check_sn_nas_html.py
Normal file
@@ -0,0 +1,21 @@
|
||||
import urllib.request
|
||||
import ssl
|
||||
import re
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
url = "https://sn-nas.snarfnet.net/"
|
||||
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36"})
|
||||
resp = urllib.request.urlopen(req, context=ctx)
|
||||
print("Status:", resp.status)
|
||||
html = resp.read().decode('utf-8', errors='replace')
|
||||
print("HTML length:", len(html))
|
||||
|
||||
# Find script tags and link tags
|
||||
tags = re.findall(r'<(?:script|link)[^>]+(?:src|href)="([^"]+)"', html)
|
||||
print(f"Found {len(tags)} resources in HTML:")
|
||||
for t in tags[:15]:
|
||||
print(" ", t)
|
||||
|
||||
Reference in New Issue
Block a user