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(coursera.py): add new coursera.py to learning/ category

kaifcodec82c3d87aa2e6
diff --git a/user_scanner/email_scan/learning/coursera.py b/user_scanner/email_scan/learning/coursera.py
new file mode 100644
index 0000000..ba36608
--- /dev/null
+++ b/user_scanner/email_scan/learning/coursera.py
@@ -0,0 +1,49 @@
+import httpx
+import json
+from user_scanner.core.result import Result
+
+
+async def _check(email: str) -> Result:
+ url = "https://www.coursera.org/api/userAccounts.v1"
+
+ params = {
+ 'action': "getLoginMethods",
+ 'email': email
+ }
+
+ headers = {
+ 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Mobile Safari/537.36",
+ 'Accept': "application/json",
+ 'X-Requested-With': "XMLHttpRequest",
+ 'X-Coursera-Application': "front-page",
+ 'Origin': "https://www.coursera.org",
+ 'Referer': "https://www.coursera.org/?authMode=signup"
+ }
+
+ try:
+ async with httpx.AsyncClient(timeout=6.0) as client:
+ response = await client.post(url, params=params, json={}, headers=headers)
+ data = response.json()
+
+ if "loginMethods" not in data:
+ return Result.error("Missing 'loginMethods' in response, report it on github")
+
+ methods = data["loginMethods"]
+
+ if not isinstance(methods, list):
+ return Result.error(f"Unexpected data type for loginMethods: {type(methods)}, report it on github")
+ if len(methods) > 0:
+ return Result.taken()
+ else:
+ return Result.available()
+
+ except httpx.ConnectTimeout:
+ return Result.error("Connection timed out (Coursera)")
+ except httpx.ReadTimeout:
+ return Result.error("Server took too long to respond (Coursera)")
+ except Exception as e:
+ return Result.error(e)
+
+
+async def validate_coursera(email: str) -> Result:
+ return await _check(email)