feat: add helper scripts for infrastructure management and troubleshooting
This commit is contained in:
14
scripts/test_auth_login_api.py
Normal file
14
scripts/test_auth_login_api.py
Normal file
@@ -0,0 +1,14 @@
|
||||
import urllib.request
|
||||
import ssl
|
||||
import json
|
||||
|
||||
ctx = ssl.create_default_context()
|
||||
ctx.check_hostname = False
|
||||
ctx.verify_mode = ssl.CERT_NONE
|
||||
|
||||
req = urllib.request.Request("https://semaphore.snarfnet.net/api/auth/login", headers={"User-Agent": "Mozilla/5.0"})
|
||||
resp = urllib.request.urlopen(req, context=ctx)
|
||||
print("Status:", resp.status)
|
||||
data = json.loads(resp.read().decode('utf-8'))
|
||||
print("Data:", json.dumps(data, indent=2))
|
||||
|
||||
Reference in New Issue
Block a user