fork download
  1. import requests
  2.  
  3. # 🧱 رابط السيرفر
  4. base_url = "http://content-available-to-author-only.net" # أو http://75.126.100.5 أو أي عنوان ثاني
  5.  
  6. # 🔗 روابط نختبرها
  7. paths = [
  8. "/index.html",
  9. "/status.html",
  10. "/logout?erase-cookie=on",
  11. "/admin.html",
  12. "/config.html",
  13. "/debug.html",
  14. ]
  15.  
  16. # 🎭 هيدر لتقليد متصفح عادي
  17. headers = {
  18. "User-Agent": "Mozilla/5.0 (Windows NT 10.0; TestScript/1.0)",
  19. }
  20.  
  21. def test_paths():
  22. print("🚀 بدء فحص الصفحات...\n")
  23.  
  24. for path in paths:
  25. url = base_url + path
  26. try:
  27. response = requests.get(url, headers=headers, timeout=5, allow_redirects=True)
  28. status = response.status_code
  29. content = response.text.lower()
  30.  
  31. print(f"🔍 فحص: {url}")
  32. print(f"📥 الحالة: {status}")
  33.  
  34. if status == 200:
  35. if "login" in content or "تسجيل الدخول" in content or "index.html" in content:
  36. print("✅ الصفحة تطلب تسجيل دخول (محميّة).")
  37. else:
  38. snippet = content[:200].replace('\n', ' ')
  39. print(f"⚠️ الصفحة مفتوحة بدون تسجيل دخول! مقتطف:\n{snippet}")
  40. elif status in [301, 302]:
  41. location = response.headers.get("Location", "")
  42. print(f"🔁 تم التوجيه إلى: {location} → غالباً محمية.")
  43. else:
  44. print("❌ الصفحة غير متاحة أو تم حظرها.\n")
  45.  
  46. print("-" * 40)
  47.  
  48. except Exception as e:
  49. print(f"🚫 خطأ في الوصول إلى {url}: {e}")
  50. print("-" * 40)
  51.  
  52. if __name__ == "__main__":
  53. test_paths()
Success #stdin #stdout 0.98s 36604KB
stdin
Standard input is empty
stdout
🚀 بدء فحص الصفحات...

🚫 خطأ في الوصول إلى http://content-available-to-author-only.net/index.html: HTTPConnectionPool(host='s.net', port=80): Max retries exceeded with url: /index.html (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x1490000008c0>: Failed to resolve 's.net' ([Errno -3] Temporary failure in name resolution)"))
----------------------------------------
🚫 خطأ في الوصول إلى http://content-available-to-author-only.net/status.html: HTTPConnectionPool(host='s.net', port=80): Max retries exceeded with url: /status.html (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x148fff614c80>: Failed to resolve 's.net' ([Errno -3] Temporary failure in name resolution)"))
----------------------------------------
🚫 خطأ في الوصول إلى http://content-available-to-author-only.net/logout?erase-cookie=on: HTTPConnectionPool(host='s.net', port=80): Max retries exceeded with url: /logout?erase-cookie=on (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x148fff615df0>: Failed to resolve 's.net' ([Errno -3] Temporary failure in name resolution)"))
----------------------------------------
🚫 خطأ في الوصول إلى http://content-available-to-author-only.net/admin.html: HTTPConnectionPool(host='s.net', port=80): Max retries exceeded with url: /admin.html (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x1490000008c0>: Failed to resolve 's.net' ([Errno -3] Temporary failure in name resolution)"))
----------------------------------------
🚫 خطأ في الوصول إلى http://content-available-to-author-only.net/config.html: HTTPConnectionPool(host='s.net', port=80): Max retries exceeded with url: /config.html (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x148fff616450>: Failed to resolve 's.net' ([Errno -3] Temporary failure in name resolution)"))
----------------------------------------
🚫 خطأ في الوصول إلى http://content-available-to-author-only.net/debug.html: HTTPConnectionPool(host='s.net', port=80): Max retries exceeded with url: /debug.html (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x148fff616e10>: Failed to resolve 's.net' ([Errno -3] Temporary failure in name resolution)"))
----------------------------------------