Skip to content

🕵️‍♂️ (2-in-1) Email & Username OSINT suite featuring native MCP support for deep data extraction just from a single Email/Username. Analyzes 2720+ actively maintained scan vectors (210+ email / 2510+ username) for security research, investigations, and digital footprinting.

fix(email_scan): bypass Cloudflare WAF on locanto using impersonate transport (#699)

Kaifb7523f64ed1b
diff --git a/user_scanner/email_scan/dating/locanto.py b/user_scanner/email_scan/dating/locanto.py
index f60c48e..46a41b5 100644
--- a/user_scanner/email_scan/dating/locanto.py
+++ b/user_scanner/email_scan/dating/locanto.py
@@ -1,4 +1,4 @@
-import httpx
+from user_scanner.core.impersonate import impersonate_request_async
from user_scanner.core.result import Result
@@ -13,7 +13,6 @@ async def _check(email: str) -> Result:
}
headers = {
- "User-Agent": "Mozilla/5.0 (Linux; Android 13; Pixel 6 Build/TQ3A.230901.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Safari/537.36 YalwApp/eL.4.2.83",
"Accept": "application/json, text/javascript, */*; q=0.01",
"X-Requested-With": "XMLHttpRequest",
"Origin": "https://www.locanto.org",
@@ -21,31 +20,46 @@ async def _check(email: str) -> Result:
"Accept-Language": "en-US,en;q=0.9",
}
- async with httpx.AsyncClient() as client:
- try:
- response = await client.post(url, data=payload, headers=headers, timeout=6.0)
+ try:
+ response = await impersonate_request_async(
+ url,
+ method="POST",
+ data=payload,
+ headers=headers,
+ impersonate="chrome",
+ )
- if response.status_code == 429:
- return Result.error("Rate limited", url=show_url)
+ if response.status_code == 403:
+ return Result.error("Caught by Cloudflare WAF (403)", url=show_url)
- if response.status_code == 200:
+ if response.status_code == 429:
+ return Result.error("Rate limited", url=show_url)
+
+ if response.status_code == 200:
+ try:
data = response.json()
- if data.get("success") is True:
- return Result.available(url=show_url)
+ except Exception:
+ return Result.error("Invalid JSON response", url=show_url)
+
+ if not isinstance(data, dict):
+ return Result.error("Unexpected response body format", url=show_url)
+
+ if data.get("success") is True:
+ return Result.available(url=show_url)
- text = str(data.get("text", "")).lower()
- if data.get("email_exists") is True or "already exists" in text or "something went wrong" in text:
- return Result.taken(url=show_url)
+ text = str(data.get("text", "")).lower()
+ if data.get("email_exists") is True or "already exists" in text or "something went wrong" in text:
+ return Result.taken(url=show_url)
- return Result.error("Unexpected response body, report it via GitHub issues", url=show_url)
+ return Result.error("Unexpected response body, report it via GitHub issues", url=show_url)
- return Result.error(
- f"Unexpected response status: {response.status_code}, report it via GitHub issues",
- url=show_url,
- )
+ return Result.error(
+ f"Unexpected response status: {response.status_code}, report it via GitHub issues",
+ url=show_url,
+ )
- except Exception as e:
- return Result.error(e, url=show_url)
+ except Exception as e:
+ return Result.error(e, url=show_url)
async def validate_locanto(email: str) -> Result: