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.

Add Proton Mail username availability check under email category

YuF-9468cc0b693a3f9e
diff --git a/user_scanner/user_scan/email/__init__.py b/user_scanner/user_scan/email/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/user_scanner/user_scan/email/protonmail.py b/user_scanner/user_scan/email/protonmail.py
new file mode 100644
index 0000000..96d643a
--- /dev/null
+++ b/user_scanner/user_scan/email/protonmail.py
@@ -0,0 +1,46 @@
+from user_scanner.core.orchestrator import generic_validate
+from user_scanner.core.result import Result
+
+
+def validate_protonmail(user: str) -> Result:
+ """Validate Proton Mail username availability.
+
+ Proton exposes an availability API used by their web account app.
+
+ - Code 12106: username exists (taken)
+ - Code 1000: username does not exist (available)
+
+ Ref: https://github.com/kaifcodec/user-scanner/issues/284
+ """
+
+ # Use the same endpoint described in the issue; keep params explicit.
+ url = (
+ "https://account.proton.me/api/core/v4/users/available"
+ f"?Name={user}%40proton.me&ParseDomain=1"
+ )
+ show_url = "https://account.proton.me"
+
+ headers = {
+ # This header appears required by Proton's API.
+ "x-pm-appversion": "[email protected]",
+ "Accept": "application/json",
+ }
+
+ def process(response):
+ if response.status_code != 200:
+ return Result.error("Unexpected status code from Proton")
+
+ try:
+ data = response.json()
+ except Exception:
+ return Result.error("Invalid JSON response from Proton")
+
+ code = data.get("Code")
+ if code == 12106:
+ return Result.taken()
+ if code == 1000:
+ return Result.available()
+
+ return Result.error(f"Unexpected Proton response code: {code}")
+
+ return generic_validate(url, process, show_url=show_url, headers=headers)