update
This commit is contained in:
34
AzA march 2026/hetzner_diag_woo_403_extra.py
Normal file
34
AzA march 2026/hetzner_diag_woo_403_extra.py
Normal file
@@ -0,0 +1,34 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Extra probes: no Woo auth, UA variants — stdout only safe prefixes."""
|
||||
import requests
|
||||
|
||||
BASE = "https://aza-medwork.ch"
|
||||
|
||||
|
||||
def main() -> None:
|
||||
cases = [
|
||||
("wpjson_no_auth_requests_ua", {}),
|
||||
(
|
||||
"wpjson_no_auth_browser_ua",
|
||||
{
|
||||
"headers": {
|
||||
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/120.0.0.0",
|
||||
"Accept": "application/json",
|
||||
}
|
||||
},
|
||||
),
|
||||
]
|
||||
for label, kw in cases:
|
||||
r = requests.get(BASE + "/wp-json", timeout=15, **kw)
|
||||
ct = (r.headers.get("content-type") or "")[:50]
|
||||
pref = (r.text or "")[:80].replace("\n", " ")
|
||||
print(label, "http", r.status_code, "ct", ct)
|
||||
print(label, "body_prefix", pref)
|
||||
|
||||
# HEAD request
|
||||
r = requests.head(BASE + "/wp-json", timeout=15, allow_redirects=True)
|
||||
print("wpjson_head_http", r.status_code)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in New Issue
Block a user