59 lines
2.1 KiB
Python
59 lines
2.1 KiB
Python
import urllib.request, json, sys, io, time
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8")
|
|
|
|
# Purge gfil-intel.xyz zone
|
|
CF_TOKEN = "cfut_xRDcVVOTE9hLWxe8fFUG1Xgv7aQVtV0ytWFYZKimffcc10e3"
|
|
ZONE_ID = "a107f45f3d82e7209447cec396504d0b"
|
|
|
|
headers = {
|
|
"Authorization": "Bearer " + CF_TOKEN,
|
|
"Content-Type": "application/json"
|
|
}
|
|
|
|
purge_data = json.dumps({"files": ["https://gfil-intel.xyz/robots.txt"]}).encode("utf-8")
|
|
req = urllib.request.Request(
|
|
f"https://api.cloudflare.com/client/v4/zones/{ZONE_ID}/purge_cache",
|
|
data=purge_data,
|
|
headers=headers,
|
|
method="POST"
|
|
)
|
|
r = urllib.request.urlopen(req, timeout=15)
|
|
result = json.loads(r.read().decode())
|
|
print("gfil-intel.xyz purge:", result.get("success", False))
|
|
|
|
# Also purge blog.quant-view.xyz
|
|
ZONE_ID_BLOG = "3712ed1fcbd198c3ec6bd9758563a8d5"
|
|
purge_data2 = json.dumps({"files": ["https://blog.quant-view.xyz/robots.txt"]}).encode("utf-8")
|
|
req2 = urllib.request.Request(
|
|
f"https://api.cloudflare.com/client/v4/zones/{ZONE_ID_BLOG}/purge_cache",
|
|
data=purge_data2,
|
|
headers=headers,
|
|
method="POST"
|
|
)
|
|
r2 = urllib.request.urlopen(req2, timeout=15)
|
|
result2 = json.loads(r2.read().decode())
|
|
print("blog.quant-view.xyz purge:", result2.get("success", False))
|
|
|
|
# Wait
|
|
print("\nWaiting 5 seconds...")
|
|
time.sleep(5)
|
|
|
|
# Verify all 3 domains
|
|
print("\n=== VERIFICATION ===")
|
|
for domain in ["gfil-lab.com", "gfil-intel.xyz", "blog.quant-view.xyz"]:
|
|
try:
|
|
req = urllib.request.Request("https://" + domain + "/robots.txt",
|
|
headers={"User-Agent": "Mozilla/5.0", "Cache-Control": "no-cache", "Pragma": "no-cache"})
|
|
r = urllib.request.urlopen(req, timeout=10)
|
|
content = r.read().decode()
|
|
checks = {
|
|
"GPTBot": "GPTBot" in content,
|
|
"ClaudeBot": "ClaudeBot" in content,
|
|
"PerplexityBot": "PerplexityBot" in content,
|
|
"SizeOK": len(content) > 100
|
|
}
|
|
status = "PASS" if all(checks.values()) else "FAIL"
|
|
print(f" [{status}] {domain}: {len(content)} chars | {checks}")
|
|
except Exception as e:
|
|
print(f" [FAIL] {domain}: {e}")
|