v2: ID verification by state, 15 photos/5 albums, 20 quick replies, logo, mobile polish
This commit is contained in:
75
deploy/godaddy-ns-patch.py
Normal file
75
deploy/godaddy-ns-patch.py
Normal file
@@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python3
|
||||
"""PATCH GoDaddy nameservers with consent payload."""
|
||||
import json
|
||||
import urllib.error
|
||||
import urllib.request
|
||||
from datetime import datetime, timezone
|
||||
|
||||
KEY = "2wYVpc3VT4_Gi9AsNqzJ6BtSfNz6nLDuo"
|
||||
SECRET = "NvC3qexGAU7Rd5QExUTH6z"
|
||||
DOMAIN = "exposedgays.com"
|
||||
CF_NS = ["annabel.ns.cloudflare.com", "mitchell.ns.cloudflare.com"]
|
||||
GD = "https://api.godaddy.com/v1"
|
||||
|
||||
|
||||
def gd(path, method="GET", body=None):
|
||||
req = urllib.request.Request(
|
||||
GD + path,
|
||||
data=json.dumps(body).encode() if body is not None else None,
|
||||
method=method,
|
||||
headers={
|
||||
"Authorization": f"sso-key {KEY}:{SECRET}",
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json",
|
||||
},
|
||||
)
|
||||
try:
|
||||
with urllib.request.urlopen(req, timeout=45) as r:
|
||||
raw = r.read().decode()
|
||||
return r.status, json.loads(raw) if raw else {}
|
||||
except urllib.error.HTTPError as e:
|
||||
raw = e.read().decode()
|
||||
try:
|
||||
return e.code, json.loads(raw)
|
||||
except Exception:
|
||||
return e.code, {"raw": raw[:1000]}
|
||||
|
||||
|
||||
def show(label):
|
||||
code, d = gd(f"/domains/{DOMAIN}")
|
||||
print(f"{label}: HTTP {code} NS={d.get('nameServers') if code == 200 else d}")
|
||||
|
||||
|
||||
show("Before")
|
||||
|
||||
bodies = [
|
||||
{"nameServers": CF_NS},
|
||||
{
|
||||
"nameServers": CF_NS,
|
||||
"consent": {
|
||||
"agreedAt": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.000Z"),
|
||||
"agreedBy": "96.94.95.105",
|
||||
"agreementKeys": ["DNRA"],
|
||||
},
|
||||
},
|
||||
{
|
||||
"nameServers": CF_NS,
|
||||
"locked": False,
|
||||
"consent": {
|
||||
"agreedAt": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S.000Z"),
|
||||
"agreedBy": "0.0.0.0",
|
||||
"agreementKeys": ["DNRA", "DNPA"],
|
||||
},
|
||||
},
|
||||
]
|
||||
|
||||
for i, body in enumerate(bodies, 1):
|
||||
print(f"\n=== PATCH attempt {i} ===")
|
||||
print(json.dumps(body, indent=2))
|
||||
code, res = gd(f"/domains/{DOMAIN}", "PATCH", body)
|
||||
print(f"HTTP {code}: {json.dumps(res, indent=2) if res else '{}'}")
|
||||
|
||||
show("After immediate")
|
||||
import time
|
||||
time.sleep(5)
|
||||
show("After 5s")
|
||||
Reference in New Issue
Block a user