🕵️♂️ (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
feat: add Payhip email and username modules (#637)
Kristo Isberge1ec541ddc09
diff --git a/user_scanner/core/helpers.py b/user_scanner/core/helpers.pyindex 2dc5268..13084c4 100644--- a/user_scanner/core/helpers.py+++ b/user_scanner/core/helpers.py@@ -56,6 +56,7 @@ LOUD_MODULES: Dict[str, List[str]] = {"cambly","superlive","medium",+ "payhip",],}@@ -356,4 +357,3 @@ def save_config_value(key: str, value: Any, path: str | Path | None = None):content[key] = valuecp.parent.mkdir(parents=True, exist_ok=True)cp.write_text(json.dumps(content, indent=2))-diff --git a/user_scanner/email_scan/creator/payhip.py b/user_scanner/email_scan/creator/payhip.pynew file mode 100644index 0000000..230c391--- /dev/null+++ b/user_scanner/email_scan/creator/payhip.py@@ -0,0 +1,39 @@+import httpx++from user_scanner.core.result import Result+++async def validate_payhip(email: str) -> Result:+ url = "https://payhip.com/auth/forgot_password_buyer_ajax"+ show_url = "https://payhip.com"++ try:+ async with httpx.AsyncClient(timeout=15.0) as client:+ response = await client.post(+ url,+ data={"login": email},+ headers={+ "origin": show_url,+ "referer": f"{show_url}/auth/forgot_password",+ "x-requested-with": "XMLHttpRequest",+ },+ )++ if response.status_code != 200:+ return Result.error(f"HTTP {response.status_code}", url=show_url)++ try:+ data = response.json()+ except ValueError:+ return Result.error("Unexpected non-JSON response", url=show_url)++ if data.get("success") is True:+ return Result.taken(url=show_url)+ if (+ data.get("success") is False+ and data.get("error_message_public") == "Login or email doesn't exist"+ ):+ return Result.available(url=show_url)+ return Result.error("Unexpected password-reset response", url=show_url)+ except Exception as exc:+ return Result.error(exc, url=show_url)diff --git a/user_scanner/user_scan/creator/payhip.py b/user_scanner/user_scan/creator/payhip.pynew file mode 100644index 0000000..fa8f95c--- /dev/null+++ b/user_scanner/user_scan/creator/payhip.py@@ -0,0 +1,90 @@+import html+import json+import re+from urllib.parse import quote++from user_scanner.core.orchestrator import generic_validate+from user_scanner.core.result import Result++NOT_FOUND = "The page you requested was not found."+PAYHIP_DATA = re.compile(r"window\.payhipShop\s*=\s*(\{.*\});")+++def validate_payhip(user: str) -> Result:+ url = f"https://payhip.com/{quote(user, safe='')}"++ def process(response) -> Result:+ if (+ response.status_code == 404+ and "<title>404 Page Not Found</title>" in response.text+ and NOT_FOUND in response.text+ ):+ return Result.available()+ if response.status_code != 200:+ return Result.error(f"Unexpected Payhip response: {response.status_code}")++ match = PAYHIP_DATA.search(response.text)+ if not match:+ return Result.error("Payhip profile data was missing")+ try:+ data = json.loads(match.group(1))+ except json.JSONDecodeError:+ return Result.error("Invalid Payhip profile data")++ profile = data.get("user")+ if (+ not isinstance(profile, dict)+ or str(profile.get("username", "")).casefold() != user.casefold()+ ):+ return Result.error("Payhip profile did not match the requested username")++ raw_bio = profile.get("bio")+ bio = raw_bio if isinstance(raw_bio, str) else ""+ bio_links = list(+ dict.fromkeys(map(html.unescape, re.findall(r'href="([^"]+)"', bio)))+ ) or None+ social = profile.get("socialMedia")+ social_links = (+ {+ key.removesuffix("Url").lower(): value+ for key, value in social.items()+ if key.endswith("Url") and isinstance(value, str)+ }+ if isinstance(social, dict)+ else {}+ )+ not_required = profile.get("buyerAccountRequirementStatusIsNotRequired")+ optional = profile.get("buyerAccountRequirementStatusIsOptional")+ if not_required is True:+ buyer_account_policy = "not_required"+ elif optional is True:+ buyer_account_policy = "optional"+ elif not_required is False and optional is False:+ buyer_account_policy = "required"+ else:+ buyer_account_policy = None++ logo = (profile.get("resizedLogo") or {}).get("original") or {}+ return Result.taken(+ extra={+ "uid": profile.get("userIdEncrypted"),+ "name": profile.get("shopName"),+ "bio": " ".join(html.unescape(re.sub(r"<[^>]+>", " ", bio)).split()),+ "bio_links": bio_links,+ "currency": profile.get("currency"),+ "website": profile.get("websiteUrl"),+ "store_language": profile.get("shopLanguage"),+ "custom_domain_name": profile.get("customDomainName"),+ "paypal_enabled": profile.get("hasConnectedPaymentProviderPayPal"),+ "stripe_enabled": profile.get("hasConnectedPaymentProviderStripe"),+ "custom_domain_enabled": profile.get("customDomainEnabled"),+ "reviews_enabled": profile.get("customerReviewsEnabled"),+ "shipping_enabled": profile.get("shippingv2Enabled"),+ "buyer_account_policy": buyer_account_policy,+ "multiple_products": profile.get("hasMoreThanOneProduct"),+ **social_links,+ },+ media={"avatar": logo.get("src")},+ )++ return generic_validate(url, process, show_url=url, follow_redirects=True)