feat: add automation scripts for NAS fixes, Authentik monitoring, and Technitium DNS management
This commit is contained in:
18
scripts/test_syno_asset.py
Normal file
18
scripts/test_syno_asset.py
Normal file
@@ -0,0 +1,18 @@
|
||||
import urllib.request
|
||||
import ssl
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
url = "https://sn-nas.snarfnet.net/webapi/entry.cgi?api=SYNO.Core.Desktop.UIString&version=1&method=getjs&lang=enu"
|
||||
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
|
||||
try:
|
||||
with urllib.request.urlopen(req, context=ctx, timeout=10) as resp:
|
||||
print("Status:", resp.status)
|
||||
content = resp.read()
|
||||
print("Length:", len(content))
|
||||
print("Preview:", content[:200].decode('utf-8', errors='replace'))
|
||||
except Exception as e:
|
||||
print("Error:", e)
|
||||
|
||||
Reference in New Issue
Block a user