🕵️♂️ (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
Added the required public validator validate_facebook(user: str) -> Result so the loader/engine can discover the module correctly at user_scanner/user_scan/social/facebook.py:136.
Brumbelowbb171bad74ab
diff --git a/user_scanner/user_scan/social/facebook.py b/user_scanner/user_scan/social/facebook.pynew file mode 100644index 0000000..dc10e9a--- /dev/null+++ b/user_scanner/user_scan/social/facebook.py@@ -0,0 +1,137 @@+import re++import httpx++from user_scanner.core.result import Result+++def _check(user: str) -> Result:+ show_url = f"https://www.facebook.com/{user}"++ if not (1 <= len(user) <= 50):+ return Result.error("Length must be 1-50 characters", url=show_url)++ if not re.match(r"^[a-zA-Z0-9.]+$", user):+ return Result.error("Only letters, numbers and periods allowed", url=show_url)++ if user.isdigit():+ return Result.error("Username cannot be numbers only", url=show_url)++ if user.startswith(".") or user.endswith("."):+ return Result.error(+ "Username cannot start or end with a period", url=show_url+ )++ try:+ with httpx.Client(http2=True, follow_redirects=False, timeout=10.0) as client:+ headers1 = {+ "User-Agent": (+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 "+ "(KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"+ ),+ "Accept": (+ "text/html,application/xhtml+xml,application/xml;q=0.9,"+ "image/avif,image/webp,image/apng,*/*;q=0.8,"+ "application/signed-exchange;v=b3;q=0.7"+ ),+ "Accept-Encoding": "identity",+ "sec-ch-ua": '"Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"',+ }+ client.get("https://m.facebook.com/login/", headers=headers1)++ headers2 = {+ "User-Agent": (+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 "+ "(KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"+ ),+ "Accept": (+ "text/html,application/xhtml+xml,application/xml;q=0.9,"+ "image/avif,image/webp,image/apng,*/*;q=0.8,"+ "application/signed-exchange;v=b3;q=0.7"+ ),+ "Accept-Encoding": "identity",+ "upgrade-insecure-requests": "1",+ "sec-fetch-site": "cross-site",+ "sec-fetch-mode": "navigate",+ "sec-fetch-user": "?1",+ "sec-fetch-dest": "document",+ "sec-ch-ua": '"Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"',+ "sec-ch-ua-mobile": "?0",+ "sec-ch-ua-platform": '"Linux"',+ "referer": "https://www.google.com/",+ "accept-language": "en-US,en;q=0.9",+ "priority": "u=0, i",+ }+ response = client.get(+ "https://www.facebook.com", params={"_rdr": ""}, headers=headers2+ )+ html = response.text++ lsd_match = (+ re.search(r'\["LSD",\[\],\{"token":"([^"]+)"\}', html)+ or re.search(r'name="lsd"\s+value="([^"]+)"', html)+ or re.search(r'"lsd":"([^"]+)"', html)+ )+ jazoest_match = re.search(r"jazoest=(\d+)", html) or re.search(+ r'name="jazoest"\s+value="(\d+)"', html+ )++ lsd = lsd_match.group(1) if lsd_match else None+ jazoest = jazoest_match.group(1) if jazoest_match else None++ if not lsd or not jazoest:+ return Result.error(+ f"Token extraction failed (LSD: {bool(lsd)}, Jazoest: {bool(jazoest)})",+ url=show_url,+ )++ headers3 = {+ "User-Agent": (+ "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 "+ "(KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36"+ ),+ "Accept": (+ "text/html,application/xhtml+xml,application/xml;q=0.9,"+ "image/avif,image/webp,image/apng,*/*;q=0.8,"+ "application/signed-exchange;v=b3;q=0.7"+ ),+ "Accept-Encoding": "identity",+ "sec-fetch-site": "same-origin",+ "sec-fetch-mode": "cors",+ "sec-fetch-dest": "empty",+ "sec-ch-ua": '"Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"',+ "sec-ch-ua-mobile": "?0",+ "sec-ch-ua-platform": '"Linux"',+ "referer": "https://www.facebook.com",+ "x-ig-app-id": "936619743392459",+ "x-requested-with": "XMLHttpRequest",+ "accept-language": "en-US,en;q=0.9",+ }++ params = {+ "username": user,+ "fb_dtsg": lsd,+ "jazoest": jazoest,+ }+ response = client.get(+ "https://www.facebook.com/ajax/username availability/",+ headers=headers3,+ params=params,+ )++ if response.status_code == 200:+ return Result.available(+ f"Username {user} is available", url=show_url+ )++ return Result.error(+ f"Unexpected status code: {response.status_code}", url=show_url+ )+ except httpx.TimeoutException:+ return Result.error("Request timed out", url=show_url)+ except Exception as exc:+ return Result.error(f"Error: {exc}", url=show_url)+++def validate_facebook(user: str) -> Result:+ return _check(user)