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.

refactor: add extra data extraction logic for 8 gaming sites

Kaif7051130e25df
diff --git a/user_scanner/user_scan/gaming/apexlegends.py b/user_scanner/user_scan/gaming/apexlegends.py
index 0f2b60c..8527824 100644
--- a/user_scanner/user_scan/gaming/apexlegends.py
+++ b/user_scanner/user_scan/gaming/apexlegends.py
@@ -1,5 +1,4 @@
-from user_scanner.core.orchestrator import status_validate
-
+from user_scanner.core.orchestrator import generic_validate, Result
def validate_apexlegends(user):
url = f"https://api.tracker.gg/api/v2/apex/standard/profile/origin/{user}"
@@ -12,4 +11,42 @@ def validate_apexlegends(user):
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0",
}
- return status_validate(url, 404, 200, show_url=show_url, headers=headers)
+ def process(response):
+ if response.status_code == 200:
+ try:
+ payload = response.json()
+ data = payload.get("data", {})
+ extra = {}
+
+ p_info = data.get("platformInfo", {})
+ if handle := p_info.get("platformUserHandle"): extra["username"] = handle
+ if avatar := p_info.get("avatarUrl"): extra["avatar"] = avatar
+
+ u_info = data.get("userInfo", {})
+ if country := u_info.get("countryCode"): extra["country"] = country
+ if u_info.get("isPremium"): extra["premium"] = "Yes"
+ if u_info.get("isInfluencer"): extra["influencer"] = "Yes"
+
+ meta = data.get("metadata", {})
+ if legend := meta.get("activeLegendName"): extra["active_legend"] = legend
+
+ segments = data.get("segments", [])
+ if segments:
+ stats = segments[0].get("stats", {})
+ if lvl := stats.get("level"): extra["level"] = str(lvl.get("displayValue"))
+ if kills := stats.get("kills"): extra["kills"] = str(kills.get("displayValue"))
+
+ return Result.taken(extra=extra)
+ except Exception:
+ pass
+ return Result.taken()
+
+ if response.status_code == 404:
+ return Result.available()
+
+ if response.status_code in [403, 429]:
+ return Result.error("Request blocked by anti-bot protection.")
+
+ return Result.error(f"Unexpected status code: {response.status_code}")
+
+ return generic_validate(url, process, headers=headers, show_url=show_url)
diff --git a/user_scanner/user_scan/gaming/battlenet.py b/user_scanner/user_scan/gaming/battlenet.py
index d05ed13..f3a0550 100644
--- a/user_scanner/user_scan/gaming/battlenet.py
+++ b/user_scanner/user_scan/gaming/battlenet.py
@@ -24,10 +24,10 @@ def validate_battlenet(user: str) -> Result:
username = user.split("#")[0]
if not (3 <= len(username) <= 12):
- return Result.error("Length must be 3-12 characters")
+ return Result.available("Username must be between 3 and 12 characters")
if not re.match(r"^[a-zA-Z][a-zA-Z0-9]*$", username):
- return Result.error("Must start with letter, only letters and numbers allowed")
+ return Result.available("Username must start with a letter and contain only letters and numbers")
url = f"https://overwatch.blizzard.com/en-us/search/account-by-name/{username}"
show_url = f"https://overwatch.blizzard.com/en-us/search/account-by-name/{username}/"
@@ -50,8 +50,18 @@ def validate_battlenet(user: str) -> Result:
"Battle.net allows duplicate usernames and distinguishes accounts with a numeric tag"
)
elif isinstance(data, list) and len(data) > 0:
- end = "es" if len(data) > 1 else ""
- return Result.taken(f"{len(data)} match{end}")
+ extra = {}
+ match_list = []
+ for item in data[:5]:
+ name = item.get("name")
+ is_public = "Public" if item.get("isPublic") else "Private"
+ title = item.get("title", {})
+ title_en = title.get("en_US") if isinstance(title, dict) else ""
+ title_str = f" ({title_en})" if title_en else ""
+ match_list.append(f"{name}{title_str} [{is_public}]")
+ if match_list:
+ extra["matches"] = ", ".join(match_list)
+ return Result.taken(extra=extra)
else:
return Result.error("Unexpected response format")
except Exception:
diff --git a/user_scanner/user_scan/gaming/chess_com.py b/user_scanner/user_scan/gaming/chess_com.py
index dd8780b..e048830 100644
--- a/user_scanner/user_scan/gaming/chess_com.py
+++ b/user_scanner/user_scan/gaming/chess_com.py
@@ -6,39 +6,46 @@ from user_scanner.core.result import Result
def validate_chess_com(user: str) -> Result:
- # Length must be between 3 and 25 characters
if not (3 <= len(user) <= 25):
- return Result.error("Length must be 3-25 characters")
+ return Result.available("Username must be between 3 and 25 characters")
- # Only letters, numbers, underscores, and dashes allowed
if not re.match(r"^[a-zA-Z0-9_-]+$", user):
- return Result.error(
+ return Result.available(
"Usernames can only contain letters, numbers, underscores, and hyphens"
)
- # Must start and end with an alphanumeric character
if not (user[0].isalnum() and user[-1].isalnum()):
- return Result.error("Username must start and end with a letter or number")
+ return Result.available("Username must start and end with a letter or number")
- url = f"https://www.chess.com/callback/user/valid?username={user}"
+ url = f"https://api.chess.com/pub/player/{user}"
show_url = f"https://www.chess.com/member/{user}"
headers = {
"User-Agent": get_random_user_agent(),
- "Accept": "application/json, text/plain, */*",
- "Accept-Encoding": "identity",
- "Accept-Language": "en-US,en;q=0.9",
+ "Accept": "application/json",
}
def process(response):
if response.status_code == 200:
- data = response.json()
- if data.get("valid") is True:
- # 'valid': true means the username is NOT taken
- return Result.available()
- elif data.get("valid") is False:
- # 'valid': false means the username IS taken
- return Result.taken()
- return Result.error("Invalid status code")
+ try:
+ data = response.json()
+ extra = {}
+ if name := data.get("name"): extra["name"] = name
+ if username := data.get("username"): extra["username"] = username
+ if title := data.get("title"): extra["title"] = title
+ if status := data.get("status"): extra["status"] = status
+ if league := data.get("league"): extra["league"] = league
+ if location := data.get("location"): extra["location"] = location
+ if followers := data.get("followers"): extra["followers"] = str(followers)
+ if avatar := data.get("avatar"): extra["avatar"] = avatar
+ if twitch := data.get("twitch_url"): extra["links"] = twitch
+ return Result.taken(extra=extra)
+ except Exception:
+ pass
+ return Result.taken()
+ elif response.status_code == 404:
+ return Result.available()
+
+ return Result.error(f"Unexpected status code: {response.status_code}")
return generic_validate(url, process, show_url=show_url, headers=headers)
diff --git a/user_scanner/user_scan/gaming/lichess.py b/user_scanner/user_scan/gaming/lichess.py
index 724b07e..7756c1f 100644
--- a/user_scanner/user_scan/gaming/lichess.py
+++ b/user_scanner/user_scan/gaming/lichess.py
@@ -1,34 +1,62 @@
import re
from user_scanner.core.orchestrator import Result, generic_validate
+from user_scanner.core.helpers import get_random_user_agent
def validate_lichess(user: str) -> Result:
if not (2 <= len(user) <= 20):
- return Result.error("Length must be 2-20 characters")
+ return Result.available("Username must be between 2 and 20 characters")
if not re.match(r"^[a-zA-Z0-9_-]+$", user):
- return Result.error(
+ return Result.available(
"Usernames can only contain letters, numbers, underscores, and hyphens"
)
if re.search(r"[_-]{2,}", user):
- return Result.error(
+ return Result.available(
"Username cannot contain consecutive underscores or hyphens"
)
if not re.match(r".*[a-zA-Z0-9]$", user):
- return Result.error("Username must end with a letter or a number")
+ return Result.available("Username must end with a letter or a number")
- url = f"https://lichess.org/api/player/autocomplete?term={user}&exists=1"
+ url = f"https://lichess.org/api/user/{user}"
show_url = f"https://lichess.org/@/{user}"
+ headers = {
+ "User-Agent": get_random_user_agent(),
+ "Accept": "application/json",
+ }
+
def process(response):
- res_text = response.text.strip().lower()
- if res_text == "true":
+ if response.status_code == 200:
+ try:
+ data = response.json()
+ extra = {}
+ profile = data.get("profile", {})
+ if real_name := profile.get("realName"): extra["name"] = real_name
+ if bio := profile.get("bio"): extra["bio"] = bio
+
+ links = []
+ if profile_links := profile.get("links"):
+ links.append(profile_links)
+ if streamer_info := data.get("streamer"):
+ if twitch := streamer_info.get("twitch"):
+ if ch := twitch.get("channel"): links.append(ch)
+ if youtube := streamer_info.get("youtube"):
+ if ch := youtube.get("channel"): links.append(ch)
+ if links:
+ extra["links"] = ", ".join(list(dict.fromkeys(links)))
+
+ if data.get("patron"): extra["patron"] = "Yes"
+ if data.get("verified"): extra["verified"] = "Yes"
+ return Result.taken(extra=extra)
+ except Exception:
+ pass
return Result.taken()
- if res_text == "false":
+ elif response.status_code == 404:
return Result.available()
- return Result.error("Unexpected error, report it via github issues")
+ return Result.error(f"Unexpected status code: {response.status_code}")
- return generic_validate(url, process, show_url=show_url, timeout=3.0)
+ return generic_validate(url, process, show_url=show_url, headers=headers)
diff --git a/user_scanner/user_scan/gaming/minecraft.py b/user_scanner/user_scan/gaming/minecraft.py
index 0606473..b1f8ce3 100644
--- a/user_scanner/user_scan/gaming/minecraft.py
+++ b/user_scanner/user_scan/gaming/minecraft.py
@@ -1,8 +1,29 @@
-from user_scanner.core.orchestrator import status_validate
-
+from user_scanner.core.orchestrator import generic_validate, Result
+from user_scanner.core.helpers import get_random_user_agent
def validate_minecraft(user):
url = f"https://api.mojang.com/minecraft/profile/lookup/name/{user}"
show_url = f"https://namemc.com/profile/{user}"
- return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)
+ headers = {
+ "User-Agent": get_random_user_agent(),
+ "Accept": "application/json"
+ }
+
+ def process(response):
+ if response.status_code == 200:
+ try:
+ data = response.json()
+ extra = {}
+ if uuid := data.get("id"): extra["uuid"] = uuid
+ if name := data.get("name"): extra["username"] = name
+ return Result.taken(extra=extra)
+ except Exception:
+ pass
+ return Result.taken()
+ elif response.status_code == 204 or response.status_code == 404:
+ return Result.available()
+
+ return Result.error(f"Unexpected status code: {response.status_code}")
+
+ return generic_validate(url, process, headers=headers, show_url=show_url)
diff --git a/user_scanner/user_scan/gaming/osu.py b/user_scanner/user_scan/gaming/osu.py
index dbf716e..69cf677 100644
--- a/user_scanner/user_scan/gaming/osu.py
+++ b/user_scanner/user_scan/gaming/osu.py
@@ -1,10 +1,36 @@
-from user_scanner.core.orchestrator import status_validate
-
+from user_scanner.core.orchestrator import generic_validate, Result
+from user_scanner.core.helpers import get_random_user_agent
+import re as local_re
def validate_osu(user):
url = f"https://osu.ppy.sh/users/{user}"
show_url = f"https://osu.ppy.sh/users/{user}"
- return status_validate(
- url, 404, [200, 302], show_url=show_url, follow_redirects=True
- )
+ headers = {
+ "User-Agent": get_random_user_agent()
+ }
+
+ def process(response):
+ if response.status_code == 200:
+ extra = {}
+ title_match = local_re.search(r'<meta property="og:title" content="([^"]+)"', response.text)
+ if title_match:
+ title_val = title_match.group(1).replace("· player info", "").strip()
+ extra["player"] = title_val
+
+ avatar_match = local_re.search(r'<meta property="og:image" content="([^"]+)"', response.text)
+ if avatar_match:
+ extra["avatar"] = avatar_match.group(1).strip()
+
+ desc_match = local_re.search(r'<meta property="og:description" content="([^"]+)"', response.text)
+ if desc_match:
+ extra["rank"] = desc_match.group(1).strip()
+
+ return Result.taken(extra=extra)
+
+ if response.status_code == 404:
+ return Result.available()
+
+ return Result.error(f"Unexpected status code: {response.status_code}")
+
+ return generic_validate(url, process, headers=headers, show_url=show_url, follow_redirects=True)
diff --git a/user_scanner/user_scan/gaming/roblox.py b/user_scanner/user_scan/gaming/roblox.py
index f3de968..c1bf73c 100644
--- a/user_scanner/user_scan/gaming/roblox.py
+++ b/user_scanner/user_scan/gaming/roblox.py
@@ -1,51 +1,69 @@
-from user_scanner.core.orchestrator import generic_validate, status_validate
+from user_scanner.core.orchestrator import generic_validate, status_validate, make_request
from user_scanner.core.result import Result
+from user_scanner.core.helpers import get_random_user_agent
def validate_roblox(user: str) -> Result:
- # official api
- url = f"https://users.roblox.com/v1/users/search?keyword={user}&limit=10"
+ url = "https://users.roblox.com/v1/usernames/users"
show_url = "https://roblox.com"
- def process(response):
- search_results = response.json() # api response
+ headers = {
+ "User-Agent": get_random_user_agent(),
+ "Accept": "application/json",
+ "Content-Type": "application/json"
+ }
+ def process(response):
if response.status_code == 429:
return Result.error("Too many requests")
- if response.status_code == 400:
- # Api states there's always an error
- error = search_results["errors"][0]
- if error["code"] == 6:
- return Result.error("Username is too short")
- if error["code"] == 5:
- return Result.error("Username was filtered")
- # Shouldn't be able to reach this
- return Result.error("Invalid username")
-
- # iterates through the entries in the search results
- for entry in search_results["data"]:
- # .lower() so casing from the API doesn't matter
- if entry["name"].lower() == user.lower(): # if a username matches the user
- return Result.taken(
- extra={
+ if response.status_code == 200:
+ try:
+ data = response.json().get("data", [])
+ if data:
+ entry = data[0]
+ uid = entry.get("id")
+ extra = {
"display name": entry.get("displayName"),
- "uid": entry.get("id"),
+ "uid": uid,
"is verified": entry.get("hasVerifiedBadge"),
}
- )
+ if uid:
+ try:
+ detail_url = f"https://users.roblox.com/v1/users/{uid}"
+ detail_response = make_request(detail_url, follow_redirects=True)
+ if detail_response.status_code == 200:
+ details = detail_response.json()
+ if desc := details.get("description"): extra["bio"] = desc
+ if created := details.get("created"): extra["created"] = created
+ if details.get("isBanned"): extra["banned"] = "Yes"
+ except Exception:
+ pass
+ return Result.taken(extra=extra)
+ except Exception:
+ pass
+ return Result.available()
+
+ if response.status_code == 400:
+ return Result.error("Invalid username")
return Result.available()
- # First try: Using roblox's API
- result = generic_validate(url, process, show_url=show_url, follow_redirects=True)
+ result = generic_validate(
+ url,
+ process,
+ method="POST",
+ json={"usernames": [user], "excludeBannedUsers": False},
+ headers=headers,
+ follow_redirects=True
+ )
if result.get_reason() != "Too many requests":
return result
# If rate limited, uses a simple status validation
- url = f"https://www.roblox.com/user.aspx?username={user}"
+ fallback_url = f"https://www.roblox.com/user.aspx?username={user}"
return status_validate(
- url, 404, [200, 302], show_url=show_url, follow_redirects=True
+ fallback_url, 404, [200, 302], show_url=show_url, follow_redirects=True
)
diff --git a/user_scanner/user_scan/gaming/steam.py b/user_scanner/user_scan/gaming/steam.py
index e6ac949..8176560 100644
--- a/user_scanner/user_scan/gaming/steam.py
+++ b/user_scanner/user_scan/gaming/steam.py
@@ -1,6 +1,7 @@
from user_scanner.core.orchestrator import generic_validate
from user_scanner.core.result import Result
-
+import re as local_re
+import html
def validate_steam(user):
url = f"https://steamcommunity.com/id/{user}/"
@@ -11,7 +12,37 @@ def validate_steam(user):
if "Error</title>" in response.text:
return Result.available()
else:
- return Result.taken()
+ extra = {}
+ steamid_match = local_re.search(r'"steamid"\s*:\s*"((?:[^"\\]|\\.)*)"', response.text)
+ if steamid_match: extra["steam_id"] = steamid_match.group(1)
+
+ personaname_match = local_re.search(r'"personaname"\s*:\s*"((?:[^"\\]|\\.)*)"', response.text)
+ if personaname_match:
+ extra["persona_name"] = html.unescape(personaname_match.group(1).replace(r'\/', '/').replace(r'\"', '"'))
+
+ realname_match = local_re.search(r'class="header_real_name[^"]*">\s*<bdi>([^<]+)</bdi>', response.text)
+ if realname_match: extra["real_name"] = html.unescape(realname_match.group(1).strip())
+
+ loc_match = local_re.search(r'class="header_location"[^>]*>\s*(?:<img[^>]*>\s*)?([^<\r\n]+)', response.text)
+ if loc_match: extra["location"] = html.unescape(loc_match.group(1).strip())
+
+ avatar_match = local_re.search(r'class="playerAvatar profile_header_size.*?<picture>.*?<img srcset="([^"]+)"', response.text, local_re.DOTALL)
+ if avatar_match:
+ extra["avatar"] = avatar_match.group(1).strip()
+ else:
+ full_avatar_match = local_re.search(r'https?://avatars\.(?:fastly\.)?steamstatic\.com/[a-f0-9]+_full\.jpg', response.text)
+ if full_avatar_match:
+ extra["avatar"] = full_avatar_match.group(0)
+
+ summary_match = local_re.search(r'"summary"\s*:\s*"((?:[^"\\]|\\.)*)"', response.text)
+ if summary_match:
+ raw_summary = summary_match.group(1).replace(r'\/', '/').replace(r'\n', '\n').replace(r'\r', '\r').replace(r'\"', '"')
+ clean_summary = local_re.sub(r'<[^>]*>', '', raw_summary)
+ clean_summary = html.unescape(clean_summary).strip()
+ if clean_summary:
+ extra["summary"] = clean_summary
+
+ return Result.taken(extra=extra)
return Result.error("Invalid status code")