def check_url_safety(url): payload = "client": "clientId": "whitespider", "clientVersion": "1.0", "threatInfo": "threatTypes": ["MALWARE", "SOCIAL_ENGINEERING", "UNWANTED_SOFTWARE", "POTENTIALLY_HARMFUL_APPLICATION"], "platformTypes": ["ANY_PLATFORM"], "threatEntryTypes": ["URL"], "threatEntries": ["url": url] resp = requests.post(f"SAFE_BROWSING_API?key=API_KEY", json=payload) data = resp.json() return bool(data.get("matches")) # True if a threat was found
SAFE_BROWSING_API = "https://safebrowsing.googleapis.com/v4/threatMatches:find" API_KEY = "YOUR_GOOGLE_API_KEY" https://unblocker.whitespider.gq/
# Pseudo‑code for the safety‑check middleware (Python/Flask example) from flask import request, jsonify import requests |
Add a Smart Safe‑Browse toggle to the Unblocker interface that automatically checks every requested destination against a curated database of known malicious, phishing, or adult‑content sites. When the toggle is on, users get real‑time safety warnings, optional content filtering, and one‑click “Proceed at your own risk” options. This keeps the core purpose of the service—helping users get past benign network restrictions—while giving an extra layer of protection against potentially harmful destinations. • Options: “Go Back”, “Proceed Anyway”, or “Open
from flask import request, jsonify import requests
| Component | What It Does | Benefits | |-----------|--------------|----------| | | Queries a reputable threat‑intelligence service (e.g., Google Safe Browsing, VirusTotal, or a community‑maintained blocklist) for the entered URL. | Instantly flags risky sites before they’re loaded. | | Dynamic Warning Overlay | If a URL is flagged, a non‑intrusive modal appears: • Brief description of the risk (malware, phishing, adult content, etc.). • Options: “Go Back”, “Proceed Anyway”, or “Open in Safe‑Mode”. | Gives users an informed choice without breaking the flow. | | Safe‑Mode Proxy | When the user selects “Open in Safe‑Mode”, the request is routed through a sandboxed environment that strips out JavaScript, blocks third‑party trackers, and forces HTTPS. | Allows users to view the page in a read‑only, low‑risk format. | | User Preference Memory | Stores the user’s choice for each domain (e.g., “Always allow this site”) in a secure, encrypted cookie (or local storage) with a clear expiration window. | Reduces friction for trusted sites while keeping the safety net active. | | Toggle Switch | A persistent switch in the UI labelled “Smart Safe‑Browse (ON/OFF)”. When OFF, the service behaves exactly as before; when ON, the safety layer is active. | Gives power users the freedom to disable the feature when they need it. | | Analytics Dashboard (Admin‑only) | Shows aggregate statistics: number of blocked/flagged URLs, most common threat types, and false‑positive reports. | Helps maintain the blocklist quality and informs future improvements. | | Accessibility & Localization | All warning messages and controls are ARIA‑compliant and available in multiple languages. | Ensures the safety feature is usable by a global audience. |