π΅οΈββοΈ (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.
Python cybersecuritycybersecurity-toolsemail-osintethical-hackingethical-hacking-toolsidentificationinfosecosintosint-emailosint-toolosint-toolsosint-usernamepentestingpythonredteam-toolsredteamingthreat-intelligence
fix: resolve BDSM Singles browser challenge (#520)
Kristo Isberg42a8f06cd69e
diff --git a/user_scanner/user_scan/adult/bdsmsingles.py b/user_scanner/user_scan/adult/bdsmsingles.pyindex c8f88b8..f2fbe71 100644--- a/user_scanner/user_scan/adult/bdsmsingles.py+++ b/user_scanner/user_scan/adult/bdsmsingles.py@@ -1,12 +1,37 @@+import hashlibimport re-from user_scanner.core.orchestrator import generic_validate, Result+from user_scanner.core.orchestrator import Result, generic_validate, make_request-def validate_bdsmsingles(user):++def validate_bdsmsingles(user: str) -> Result:url = f"https://www.bdsmsingles.com/members/{user}/"show_url = urldef process(response):+ if response.status_code == 202:+ challenge = re.search(+ r'prefix="([0-9a-f]+)",win="(\d+)",diff=(\d+)', response.text+ )+ if not challenge or challenge.group(3) != "4":+ return Result.error("Unsupported browser challenge.", url=show_url)++ prefix, window, _ = challenge.groups()+ nonce = next(+ (+ value+ for value in range(1 << 20)+ if hashlib.sha256(f"{prefix}{value}".encode())+ .hexdigest()+ .startswith("0000")+ ),+ None,+ )+ if nonce is None:+ return Result.error("Could not solve browser challenge.", url=show_url)++ response = make_request(url, cookies={"_jscp": f"{window}.{nonce}"})+if response.status_code == 200 and "<title>Profile" in response.text:extra = {}media = {}@@ -18,7 +43,8 @@ def validate_bdsmsingles(user):# Info / Orientationinfo_match = re.search(- r"</h2>\s*<p>\s*(.*?)\s*</p>", response.text, re.DOTALL)+ r"</h2>\s*<p>\s*(.*?)\s*</p>", response.text, re.DOTALL+ )if info_match:# Clean up multiple whitespacescleaned_info = re.sub(r"\s+", " ", info_match.group(1)).strip()@@ -28,7 +54,9 @@ def validate_bdsmsingles(user):# Avatar (if not default nophoto svg)avatar_match = re.search(- r'src="(https://media\.bdsmsingles\.com/images/user_photo/[^"]+)"', response.text)+ r'src="(https://media\.bdsmsingles\.com/images/user_photo/[^"]+)"',+ response.text,+ )if avatar_match and "nophoto" not in avatar_match.group(1):media["image"] = avatar_match.group(1)@@ -36,8 +64,7 @@ def validate_bdsmsingles(user):def extract_table_field(field_name):# Search for field label followed by its value divpattern = rf"{field_name}</div>\s*<div style=\"[^\"]*width:\s*60%;[^\"]*\">\s*(.*?)\s*</div>"- match = re.search(pattern, response.text,- re.DOTALL | re.IGNORECASE)+ match = re.search(pattern, response.text, re.DOTALL | re.IGNORECASE)return match.group(1).strip() if match else Nonefirst_name = extract_table_field("First name")@@ -62,10 +89,11 @@ def validate_bdsmsingles(user):return Result.taken(extra=extra, media=media, url=show_url)- # No confirmed not-found marker exists: /members/ sits behind an active- # JS challenge, and the site name matches its own home page, its login- # redirect and the challenge page alike β keying a miss on any of them- # reports every handle as free.- return Result.error("Unexpected response body, report it via GitHub issues.", url=show_url)+ if response.status_code == 302 and response.headers.get("location") == "/":+ return Result.available(url=show_url)++ return Result.error(+ "Unexpected response body, report it via GitHub issues.", url=show_url+ )return generic_validate(url, process, show_url=show_url)