🕵️♂️ (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
Removed manual tests from modules
Vamato50d73f0c21db
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex be6c67e..eff6f14 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -7,7 +7,6 @@ This project separates two kinds of checks:- Username availability checks (under `user_scanner/user_scan/*`) — synchronous validators that the main username scanner uses.- Email OSINT checks (under `user_scanner/email_scan/`) — asynchronous, multi-step flows that probe signup pages or email-focused APIs. Put email-focused modules in `user_scanner/email_scan/` (subfolders like `social/`, `dev/`, `community`, `creator` etc. are fine — follow the existing tree).----## Module naming for both `email_scan` and `user_scan` modules@@ -17,10 +16,10 @@ This project separates two kinds of checks:----## Email-scan (email_scan) — guide for contributorsMinimal best-practices checklist for email modules+- [ ] Put file in `user_scanner/email_scan/<category>/service.py`.- [ ] Export `async def validate_<service>(email: str) -> Result`.- [ ] Use `httpx.AsyncClient` for requests, with sensible timeouts and follow_redirects when needed.@@ -37,13 +36,13 @@ from user_scanner.core.result import Resultasync def _check(email: str) -> Result:"""Internal helper that performs the multi-step signup probe.-- This function demonstrates how to handle CSRF tokens, custom error++ This function demonstrates how to handle CSRF tokens, custom errormessages (like IP bans), and passing the target URL back to Results."""# The display URL used for output and error reportingshow_url = "https://mastodon.social"-+signup_url = f"{show_url}/auth/sign_up"post_url = f"{show_url}/auth"@@ -87,17 +86,17 @@ async def _check(email: str) -> Result:# 3. Analyze the response to determine account statusif "has already been taken" in res_text:return Result.taken(url=show_url)-+elif "registration attempt has been blocked" in res_text:return Result.error("Your IP has been flagged by Mastodon", url=show_url)-+elif res_status == 429:return Result.error("Rate limited; try using the '-d' flag", url=show_url)-+elif res_status in [200, 302]:# If no 'taken' message is found and status is OK/Redirect, it's availablereturn Result.available(url=show_url)-+else:return Result.error("Unexpected response body", url=show_url)@@ -109,8 +108,8 @@ async def _check(email: str) -> Result:async def validate_mastodon(email: str) -> Result:"""Public validator used by the email mode.-- All email modules must export a 'validate_<name>' function that++ All email modules must export a 'validate_<name>' function thatreturns a Result object."""return await _check(email)@@ -118,12 +117,10 @@ async def validate_mastodon(email: str) -> Result:```----## Username availability check guide:-### Validator function (user_scan/)Each module must expose exactly one validator function named:@@ -134,6 +131,7 @@ def validate_<sitename>(user: str) -> Result:```Rules:+- Single parameter: the username (str).- Return a Result object (use Result.available(), Result.taken(), or Result.error(msg)).- Keep the function synchronous unless you are implementing an optional async variant; prefer sync for consistency.@@ -146,6 +144,7 @@ Rules:To keep validators DRY, the repository provides helper functions in `core/orchestrator.py`. Use these where appropriate.1. generic_validate+- Purpose: Run a request for a given URL and let a small callback (processor) inspect the httpx.Response and return a Result.- Typical signature (example — consult the actual orchestrator implementation for exact parameter names):- `generic_validate(url: str, processor: Callable[[httpx.Response], Result], headers: Optional[dict] = None, show_url=None, timeout: float = 5.0, follow_redirects: bool = False) -> Result`@@ -155,6 +154,7 @@ To keep validators DRY, the repository provides helper functions in `core/orches- Use case: Sites that return 200 for both found and not-found states and require checking the HTML body for a unique "not found" string (or other content inspection).### Example `github.py` module:+- This example shows how to use `generic_validate()` and how to return Result values with optional error messages.```python@@ -166,7 +166,7 @@ def validate_github(user: str) -> Result:Use this when the site requires complex logic or response body parsing."""url = f"https://github.com/signup_check/username?value={user}"-+# Define show_url for clean output displayshow_url = "https://github.com"@@ -185,7 +185,7 @@ def validate_github(user: str) -> Result:def process(response):"""Internal processing function.- Note: You don't need to pass 'url' here;+ Note: You don't need to pass 'url' here;generic_validate will attach it automatically from the kwargs."""if response.status_code == 200:@@ -199,25 +199,13 @@ def validate_github(user: str) -> Result:return Result.error(f"GitHub returned unexpected status: {response.status_code}")- # Pass show_url into generic_validate so the Orchestrator+ # Pass show_url into generic_validate so the Orchestrator# can attach it to the final Result object.return generic_validate(url, process, headers=headers, show_url=show_url)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_github(user)-- if result.is_available():- print("Available!")- elif result.is_taken():- print(f"Unavailable! Site: {result.url}")- else:- print(f"Error: {result.get_reason()}")-```2. status_validate+- Purpose: Simple helper for sites where availability can be determined purely from HTTP status codes (e.g., 404 = available, 200 = taken).- Typical signature (example):- `status_validate(url: str, available_status: int, taken_status: int, show_url=None, headers: Optional[dict] = None, timeout: float = 5.0, follow_redirects: bool = False) -> Result`@@ -263,7 +251,6 @@ Note: The exact parameter names and behavior of the orchestrator functions are d----## Return values and error handling- Always return a Result object:diff --git a/user_scanner/user_scan/adult/admireme_vip.py b/user_scanner/user_scan/adult/admireme_vip.pyindex add1768..a78f665 100644--- a/user_scanner/user_scan/adult/admireme_vip.py+++ b/user_scanner/user_scan/adult/admireme_vip.py@@ -1,13 +1,14 @@-from user_scanner.core.orchestrator import generic_validate, Resultfrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, generic_validate+def validate_admireme_vip(user):url = f"https://admireme.vip/{user}/"show_url = "https://admireme.vip"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",+ "User-Agent": get_random_user_agent(),+ "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",}def process(response):@@ -20,15 +21,3 @@ def validate_admireme_vip(user):return Result.error(f"Unexpected status: {response.status_code}")return generic_validate(url, process, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_admireme_vip(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")diff --git a/user_scanner/user_scan/adult/adultforum.py b/user_scanner/user_scan/adult/adultforum.pyindex 30c7048..f50c6f8 100644--- a/user_scanner/user_scan/adult/adultforum.py+++ b/user_scanner/user_scan/adult/adultforum.py@@ -1,34 +1,26 @@-from user_scanner.core.orchestrator import generic_validate, Resultfrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, generic_validate+def validate_adultforum(user):url = f"https://adultforum.gr/{user}-glamour-escorts/"show_url = "https://adultforum.gr"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",+ "User-Agent": get_random_user_agent(),+ "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",}def process(response):if "Glamour Escorts " in response.text:return Result.taken()- if response.status_code == 404 or "Page not found - Adult Forum Gr" in response.text:+ if (+ response.status_code == 404+ or "Page not found - Adult Forum Gr" in response.text+ ):return Result.available()return Result.error(f"Unexpected status: {response.status_code}")return generic_validate(url, process, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_adultforum(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")diff --git a/user_scanner/user_scan/adult/adultism.py b/user_scanner/user_scan/adult/adultism.pyindex ea8690b..84faa70 100644--- a/user_scanner/user_scan/adult/adultism.py+++ b/user_scanner/user_scan/adult/adultism.py@@ -1,19 +1,8 @@from user_scanner.core.orchestrator import status_validate+def validate_adultism(user):url = f"https://www.adultism.com/profile/{user}"show_url = "https://www.adultism.com"return status_validate(url, 404, 200, show_url=show_url)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_adultism(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")diff --git a/user_scanner/user_scan/community/archwiki.py b/user_scanner/user_scan/community/archwiki.pyindex 9feec9e..7487e88 100644--- a/user_scanner/user_scan/community/archwiki.py+++ b/user_scanner/user_scan/community/archwiki.py@@ -1,4 +1,4 @@-from user_scanner.core.orchestrator import generic_validate, Result+from user_scanner.core.orchestrator import Result, generic_validatedef validate_archwiki(user):@@ -6,22 +6,10 @@ def validate_archwiki(user):show_url = "https://wiki.archlinux.org"def process(response):- if "\"userid\":" in response.text:+ if '"userid":' in response.text:return Result.taken()- if "\"missing\":true" in response.text:+ if '"missing":true' in response.text:return Result.available()return Result.error(f"Unexpected status: {response.status_code}")return generic_validate(url, process, show_url=show_url)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_archwiki(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")diff --git a/user_scanner/user_scan/community/coderlegion.py b/user_scanner/user_scan/community/coderlegion.pyindex 7249319..94484eb 100644--- a/user_scanner/user_scan/community/coderlegion.py+++ b/user_scanner/user_scan/community/coderlegion.py@@ -6,15 +6,3 @@ def validate_coderlegion(user):show_url = "https://coderlegion.com"return status_validate(url, 404, 200, show_url=show_url, timeout=15.0)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_coderlegion(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/community/hackernews.py b/user_scanner/user_scan/community/hackernews.pyindex 19e1618..b472716 100644--- a/user_scanner/user_scan/community/hackernews.py+++ b/user_scanner/user_scan/community/hackernews.py@@ -1,12 +1,13 @@import re-from user_scanner.core.orchestrator import generic_validate, Result++from user_scanner.core.orchestrator import Result, generic_validatedef validate_hackernews(user: str) -> Result:if not (2 <= len(user) <= 15):return Result.error("Length must be 2-15 characters")- if not re.match(r'^[a-zA-Z0-9_-]+$', user):+ if not re.match(r"^[a-zA-Z0-9_-]+$", user):return Result.error("Only use letters, numbers, underscores, and hyphens")url = f"https://news.ycombinator.com/user?id={user}"@@ -19,16 +20,6 @@ def validate_hackernews(user: str) -> Result:return Result.taken()return Result.error("Unexpected response structure")- return generic_validate(url, process, show_url=show_url, timeout=3.0, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_hackernews(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of file+ return generic_validate(+ url, process, show_url=show_url, timeout=3.0, follow_redirects=True+ )diff --git a/user_scanner/user_scan/community/lemmy.py b/user_scanner/user_scan/community/lemmy.pyindex b0e8809..c5767f1 100644--- a/user_scanner/user_scan/community/lemmy.py+++ b/user_scanner/user_scan/community/lemmy.py@@ -1,4 +1,5 @@import re+from user_scanner.core.orchestrator import status_validatefrom user_scanner.core.result import Result@@ -10,22 +11,10 @@ def validate_lemmy(user: str) -> Result:if not (3 <= len(user) <= 20):return Result.error("Length must be 3-20 characters")- if not re.match(r'^[a-zA-Z0-9_]+$', user):+ if not re.match(r"^[a-zA-Z0-9_]+$", user):return Result.error("Only letters, numbers, and underscores allowed")url = f"https://lemmy.world/api/v3/user?username={user}"show_url = "https://lemmy.world"return status_validate(url, [400, 404], 200, show_url=show_url, timeout=5.0)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_lemmy(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of filediff --git a/user_scanner/user_scan/community/stackoverflow.py b/user_scanner/user_scan/community/stackoverflow.pyindex be6d355..46bbfce 100644--- a/user_scanner/user_scan/community/stackoverflow.py+++ b/user_scanner/user_scan/community/stackoverflow.py@@ -1,6 +1,7 @@from user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result+def validate_stackoverflow(user: str) -> Result:url = f"https://stackoverflow.com/users/filter?search={user}"show_url = "https://stackoverflow.com"@@ -12,7 +13,7 @@ def validate_stackoverflow(user: str) -> Result:if "No users matched your search." in text:return Result.available()- pattern = f'>{user}<'+ pattern = f">{user}<"if pattern in text:return Result.taken()@@ -21,16 +22,3 @@ def validate_stackoverflow(user: str) -> Result:return Result.error("Unexpected status code from Stack Overflow")return generic_validate(url, process, show_url=show_url)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_stackoverflow(user)-- if result == Result.available():- print("Available!")- elif result == Result.taken():- print("Unavailable!")- else:- msg = result.get_reason()- print("Error occurred!" + msg)\ No newline at end of filediff --git a/user_scanner/user_scan/creator/ameblo.py b/user_scanner/user_scan/creator/ameblo.pyindex febecc2..a2a6159 100644--- a/user_scanner/user_scan/creator/ameblo.py+++ b/user_scanner/user_scan/creator/ameblo.py@@ -1,20 +1,8 @@from user_scanner.core.orchestrator import status_validate+def validate_ameblo(user):url = f"https://ameblo.jp/{user}"show_url = "https://ameblo.jp"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_ameblo(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")-diff --git a/user_scanner/user_scan/creator/devto.py b/user_scanner/user_scan/creator/devto.pyindex 1933063..9a9f477 100644--- a/user_scanner/user_scan/creator/devto.py+++ b/user_scanner/user_scan/creator/devto.py@@ -6,15 +6,3 @@ def validate_devto(user):show_url = "https://dev.to"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_devto(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/creator/gumroad.py b/user_scanner/user_scan/creator/gumroad.pyindex 66abe3c..81602f8 100644--- a/user_scanner/user_scan/creator/gumroad.py+++ b/user_scanner/user_scan/creator/gumroad.py@@ -1,22 +1,14 @@import re-from user_scanner.core.orchestrator import status_validate, Result++from user_scanner.core.orchestrator import Result, status_validate+def validate_gumroad(user: str) -> Result:if not re.fullmatch(r"[a-z0-9]{3,20}", user):- return Result.error("Username must be between 3 and 20 lowercase alphanumeric characters")+ return Result.error(+ "Username must be between 3 and 20 lowercase alphanumeric characters"+ )url = f"https://{user}.gumroad.com/"show_url = "https://gumroad.com"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_gumroad(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")diff --git a/user_scanner/user_scan/creator/hashnode.py b/user_scanner/user_scan/creator/hashnode.pyindex cbff809..82fc89c 100644--- a/user_scanner/user_scan/creator/hashnode.py+++ b/user_scanner/user_scan/creator/hashnode.py@@ -1,33 +1,30 @@-from user_scanner.core.result import Result-from user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import generic_validate+from user_scanner.core.result import Resultdef validate_hashnode(user):url = "https://hashnode.com/utility/ajax/check-username"show_url = "https://hashnode.com"- payload = {- "username": user,- "name": "Dummy Dummy"- }+ payload = {"username": user, "name": "Dummy Dummy"}headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "application/json",- 'Content-Type': "application/json",- 'Origin': "https://hashnode.com",- 'Referer': "https://hashnode.com/signup",+ "User-Agent": get_random_user_agent(),+ "Accept": "application/json",+ "Content-Type": "application/json",+ "Origin": "https://hashnode.com",+ "Referer": "https://hashnode.com/signup",}def process(response):if response.status_code == 200:data = response.json()- if 'status' in data:- if data['status'] == 1:+ if "status" in data:+ if data["status"] == 1:return Result.available()- elif data['status'] == 0:+ elif data["status"] == 0:return Result.taken()return Result.error("Status not found")@@ -35,15 +32,12 @@ def validate_hashnode(user):else:return Result.error("Invalid status code")- return generic_validate(url, process, show_url=show_url, method="POST", json=payload, headers=headers, timeout=3.0)--if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_hashnode(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of file+ return generic_validate(+ url,+ process,+ show_url=show_url,+ method="POST",+ json=payload,+ headers=headers,+ timeout=3.0,+ )diff --git a/user_scanner/user_scan/creator/itch_io.py b/user_scanner/user_scan/creator/itch_io.pyindex d8bf5eb..f31bf77 100644--- a/user_scanner/user_scan/creator/itch_io.py+++ b/user_scanner/user_scan/creator/itch_io.py@@ -1,31 +1,21 @@import re-from user_scanner.core.orchestrator import status_validate, Result++from user_scanner.core.orchestrator import Result, status_validatedef validate_itch_io(user: str) -> Result:if not (2 <= len(user) <= 25):return Result.error("Length must be 2-25 characters.")- if not re.match(r'^[a-z0-9_-]+$', user):-- if re.search(r'[A-Z]', user):+ if not re.match(r"^[a-z0-9_-]+$", user):+ if re.search(r"[A-Z]", user):return Result.error("Use lowercase letters only.")- return Result.error("Only use lowercase letters, numbers, underscores, and hyphens.")+ return Result.error(+ "Only use lowercase letters, numbers, underscores, and hyphens."+ )url = f"https://itch.io/profile/{user}"show_url = "https://itch.io"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_itch_io(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of filediff --git a/user_scanner/user_scan/creator/kaggle.py b/user_scanner/user_scan/creator/kaggle.pyindex 4fb42c1..56f2f44 100644--- a/user_scanner/user_scan/creator/kaggle.py+++ b/user_scanner/user_scan/creator/kaggle.py@@ -6,15 +6,3 @@ def validate_kaggle(user):show_url = "https://kaggle.com"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_kaggle(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/creator/medium.py b/user_scanner/user_scan/creator/medium.pyindex 109a9d2..eac2ef4 100644--- a/user_scanner/user_scan/creator/medium.py+++ b/user_scanner/user_scan/creator/medium.py@@ -1,6 +1,6 @@+from user_scanner.core.helpers import get_random_user_agentfrom user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result-from user_scanner.core.helpers import get_random_user_agentdef validate_medium(user):@@ -8,19 +8,19 @@ def validate_medium(user):show_url = "https://medium.com"headers = {- 'User-Agent': get_random_user_agent(),- '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': "none",- '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\"",- 'accept-language': "en-US,en;q=0.9",- 'priority': "u=0, i"+ "User-Agent": get_random_user_agent(),+ "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": "none",+ "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"',+ "accept-language": "en-US,en;q=0.9",+ "priority": "u=0, i",}def process(response):@@ -36,15 +36,3 @@ def validate_medium(user):return Result.error()return generic_validate(url, process, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_medium(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of filediff --git a/user_scanner/user_scan/creator/patreon.py b/user_scanner/user_scan/creator/patreon.pyindex 50e4edf..3015bc2 100644--- a/user_scanner/user_scan/creator/patreon.py+++ b/user_scanner/user_scan/creator/patreon.py@@ -5,16 +5,6 @@ def validate_patreon(user):url = f"https://www.patreon.com/{user}"show_url = "https://patreon.com"- return status_validate(url, 404, 200, show_url=show_url, timeout=15.0, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_patreon(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of file+ return status_validate(+ url, 404, 200, show_url=show_url, timeout=15.0, follow_redirects=True+ )diff --git a/user_scanner/user_scan/creator/producthunt.py b/user_scanner/user_scan/creator/producthunt.pyindex 07614e8..9a6660b 100644--- a/user_scanner/user_scan/creator/producthunt.py+++ b/user_scanner/user_scan/creator/producthunt.py@@ -1,6 +1,7 @@import re-from user_scanner.core.orchestrator import status_validate, Result+from user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, status_validatedef validate_producthunt(user: str) -> Result:@@ -8,29 +9,19 @@ def validate_producthunt(user: str) -> Result:return Result.error("Length must be 2-32 characters.")# Rules: Letters, numbers, and underscores only.- if not re.match(r'^[a-zA-Z0-9_]+$', user):+ if not re.match(r"^[a-zA-Z0-9_]+$", user):return Result.error("Only use letters, numbers, and underscores.")url = f"https://www.producthunt.com/@{user}"show_url = "https://producthunt.com"headers = {- 'User-Agent': get_random_user_agent(),- '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': "gzip, deflate, br",- 'Accept-Language': "en-US,en;q=0.9",+ "User-Agent": get_random_user_agent(),+ "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": "gzip, deflate, br",+ "Accept-Language": "en-US,en;q=0.9",}- return status_validate(url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_producthunt(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of file+ return status_validate(+ url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True+ )diff --git a/user_scanner/user_scan/creator/substack.py b/user_scanner/user_scan/creator/substack.pyindex d9717e5..0f15165 100644--- a/user_scanner/user_scan/creator/substack.py+++ b/user_scanner/user_scan/creator/substack.py@@ -1,14 +1,15 @@import re-from user_scanner.core.orchestrator import status_validate, Result+from user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, status_validatedef validate_substack(user: str) -> Result:if not (4 <= len(user) <= 32):return Result.error("Length must be 4-32 characters")- if not re.match(r'^[a-z0-9]+$', user):- if re.search(r'[A-Z]', user):+ if not re.match(r"^[a-z0-9]+$", user):+ if re.search(r"[A-Z]", user):return Result.error("Use lowercase letters only")return Result.error("Usernames can only contain lowercase letters and numbers")@@ -16,23 +17,13 @@ def validate_substack(user: str) -> Result:show_url = "https://substack.com"headers = {- 'User-Agent': get_random_user_agent(),- '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",- 'accept-language': "en-US,en;q=0.9",- 'priority': "u=0, i"+ "User-Agent": get_random_user_agent(),+ "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",+ "accept-language": "en-US,en;q=0.9",+ "priority": "u=0, i",}- return status_validate(url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_substack(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")+ return status_validate(+ url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True+ )diff --git a/user_scanner/user_scan/creator/twitch.py b/user_scanner/user_scan/creator/twitch.pyindex 00498df..59cc463 100644--- a/user_scanner/user_scan/creator/twitch.py+++ b/user_scanner/user_scan/creator/twitch.py@@ -1,8 +1,10 @@import jsonimport re+import httpx-from user_scanner.core.orchestrator import generic_validate, Result+from user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, generic_validatedef validate_twitch(user: str) -> Result:@@ -10,37 +12,36 @@ def validate_twitch(user: str) -> Result:return Result.error("Username must be between 4 and 25 characters long")if not re.match(r"^[a-zA-Z0-9]+$", user):- return Result.error("Username can only contain alphanumeric characters (a-z, 0-9)")+ return Result.error(+ "Username can only contain alphanumeric characters (a-z, 0-9)"+ )url = "https://gql.twitch.tv/gql"show_url = "https://twitch.tv"payload = [- {- "operationName": "ChannelLayout",- "variables": {- "channelLogin": user,- "includeIsDJ": True- },- "extensions": {- "persistedQuery": {- "version": 1,- "sha256Hash": "4c361fa1874dc8f6a49e62b56aa1032eccb31311bdb653918a924f96a8b2d1a6"- }+ {+ "operationName": "ChannelLayout",+ "variables": {"channelLogin": user, "includeIsDJ": True},+ "extensions": {+ "persistedQuery": {+ "version": 1,+ "sha256Hash": "4c361fa1874dc8f6a49e62b56aa1032eccb31311bdb653918a924f96a8b2d1a6",+ }+ },}- }]headers = {- 'User-Agent': get_random_user_agent(),- 'Accept-Encoding': "identity",- 'Content-Type': "application/json",- 'sec-ch-ua-platform': "\"Android\"",- 'accept-language': "en-US",- 'client-id': "kimne78kx3ncx6brgo4mv6wki5h1ko",- 'client-version': "7bb0442d-1175-4ab5-9d32-b1f370536cbf",- 'origin': "https://m.twitch.tv",- 'referer': "https://m.twitch.tv/",+ "User-Agent": get_random_user_agent(),+ "Accept-Encoding": "identity",+ "Content-Type": "application/json",+ "sec-ch-ua-platform": '"Android"',+ "accept-language": "en-US",+ "client-id": "kimne78kx3ncx6brgo4mv6wki5h1ko",+ "client-version": "7bb0442d-1175-4ab5-9d32-b1f370536cbf",+ "origin": "https://m.twitch.tv",+ "referer": "https://m.twitch.tv/",}def process(response: httpx.Response) -> Result:@@ -52,8 +53,8 @@ def validate_twitch(user: str) -> Result:except json.JSONDecodeError as e:return Result.error(f"Failed to decode JSON response: {e}")- user_data = data[0].get('data', {}).get('user', {})- typename = user_data.get('__typename')+ user_data = data[0].get("data", {}).get("user", {})+ typename = user_data.get("__typename")if typename == "User":return Result.taken()@@ -63,21 +64,11 @@ def validate_twitch(user: str) -> Result:return Result.error("Unexpected GraphQL response structure or type.")return generic_validate(- url, process, show_url=show_url, headers=headers,- method='POST',+ url,+ process,+ show_url=show_url,+ headers=headers,+ method="POST",content=json.dumps(payload),- follow_redirects=False+ follow_redirects=False,)---if __name__ == "__main__":- user = input("Twitch Username?: ").strip()- result = validate_twitch(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- reason = result.get_reason()- print(f"Error occurred! Reason: {reason}")diff --git a/user_scanner/user_scan/dev/bitbucket.py b/user_scanner/user_scan/dev/bitbucket.pyindex ca56ee6..4eef5dc 100644--- a/user_scanner/user_scan/dev/bitbucket.py+++ b/user_scanner/user_scan/dev/bitbucket.py@@ -1,34 +1,23 @@import re-from user_scanner.core.orchestrator import status_validate, Result++from user_scanner.core.orchestrator import Result, status_validatedef validate_bitbucket(user: str) -> Result:if not (1 <= len(user) <= 30):return Result.error("Length must be 1-30 characters.")- if not re.match(r'^[a-z0-9][a-z0-9_-]*$', user):-- if re.search(r'[A-Z]', user):+ if not re.match(r"^[a-z0-9][a-z0-9_-]*$", user):+ if re.search(r"[A-Z]", user):return Result.error("Use lowercase letters only.")- return Result.error("Only use lowercase letters, numbers, hyphens, and underscores.")+ return Result.error(+ "Only use lowercase letters, numbers, hyphens, and underscores."+ )url = f"https://bitbucket.org/{user}/"show_url = "https://bitbucket.org"- return status_validate(url, 404, [200, 302], show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_bitbucket(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")---+ return status_validate(+ url, 404, [200, 302], show_url=show_url, follow_redirects=True+ )diff --git a/user_scanner/user_scan/dev/codeberg.py b/user_scanner/user_scan/dev/codeberg.pyindex 71bedf4..3c327e7 100644--- a/user_scanner/user_scan/dev/codeberg.py+++ b/user_scanner/user_scan/dev/codeberg.py@@ -6,15 +6,3 @@ def validate_codeberg(user):show_url = "https://codeberg.org"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_codeberg(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/dev/cratesio.py b/user_scanner/user_scan/dev/cratesio.pyindex 8324261..3daf4d5 100644--- a/user_scanner/user_scan/dev/cratesio.py+++ b/user_scanner/user_scan/dev/cratesio.py@@ -1,5 +1,5 @@-from user_scanner.core.orchestrator import status_validatefrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import status_validatedef validate_cratesio(user):@@ -7,22 +7,10 @@ def validate_cratesio(user):show_url = "https://crates.io"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "application/json",- 'Referer': "https://crates.io/",- 'sec-fetch-mode': "cors",+ "User-Agent": get_random_user_agent(),+ "Accept": "application/json",+ "Referer": "https://crates.io/",+ "sec-fetch-mode": "cors",}return status_validate(url, 404, 200, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_cratesio(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/dev/dockerhub.py b/user_scanner/user_scan/dev/dockerhub.pyindex c43feca..8aa59e7 100644--- a/user_scanner/user_scan/dev/dockerhub.py+++ b/user_scanner/user_scan/dev/dockerhub.py@@ -1,5 +1,5 @@-from user_scanner.core.orchestrator import status_validatefrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import status_validatedef validate_dockerhub(user):@@ -7,20 +7,8 @@ def validate_dockerhub(user):show_url = "https://hub.docker.com"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "application/json",+ "User-Agent": get_random_user_agent(),+ "Accept": "application/json",}return status_validate(url, 404, 200, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_dockerhub(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/dev/github.py b/user_scanner/user_scan/dev/github.pyindex 8a74bd6..467b165 100644--- a/user_scanner/user_scan/dev/github.py+++ b/user_scanner/user_scan/dev/github.py@@ -1,5 +1,5 @@-from user_scanner.core.orchestrator import generic_validate, Resultfrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, generic_validatedef validate_github(user):@@ -7,17 +7,17 @@ def validate_github(user):show_url = "https://github.com"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept-Encoding': "gzip, deflate, br, zstd",- 'sec-ch-ua-platform': "\"Linux\"",- 'sec-ch-ua': "\"Chromium\";v=\"140\", \"Not=A?Brand\";v=\"24\", \"Google Chrome\";v=\"140\"",- 'sec-ch-ua-mobile': "?0",- 'sec-fetch-site': "same-origin",- 'sec-fetch-mode': "cors",- 'sec-fetch-dest': "empty",- 'referer': "https://github.com/signup?source=form-home-signup&user_email=",- 'accept-language': "en-US,en;q=0.9",- 'priority': "u=1, i"+ "User-Agent": get_random_user_agent(),+ "Accept-Encoding": "gzip, deflate, br, zstd",+ "sec-ch-ua-platform": '"Linux"',+ "sec-ch-ua": '"Chromium";v="140", "Not=A?Brand";v="24", "Google Chrome";v="140"',+ "sec-ch-ua-mobile": "?0",+ "sec-fetch-site": "same-origin",+ "sec-fetch-mode": "cors",+ "sec-fetch-dest": "empty",+ "referer": "https://github.com/signup?source=form-home-signup&user_email=",+ "accept-language": "en-US,en;q=0.9",+ "priority": "u=1, i",}GITHUB_INVALID_MSG = (@@ -31,22 +31,12 @@ def validate_github(user):if response.status_code == 422:if GITHUB_INVALID_MSG in response.text:- return Result.error("Cannot start/end with hyphen or use double hyphens, underscores")+ return Result.error(+ "Cannot start/end with hyphen or use double hyphens, underscores"+ )return Result.taken()return Result.error("Unexpected GitHub response report it via issues")return generic_validate(url, process, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_github(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/dev/gitlab.py b/user_scanner/user_scan/dev/gitlab.pyindex 1f6dc05..242be3e 100644--- a/user_scanner/user_scan/dev/gitlab.py+++ b/user_scanner/user_scan/dev/gitlab.py@@ -1,6 +1,6 @@+from user_scanner.core.helpers import get_random_user_agentfrom user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result-from user_scanner.core.helpers import get_random_user_agentdef validate_gitlab(user):@@ -8,35 +8,23 @@ def validate_gitlab(user):show_url = "https://gitlab.com"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "application/json, text/plain, */*",- 'X-Requested-With': "XMLHttpRequest",- 'Referer': "https://gitlab.com/users/sign_up",+ "User-Agent": get_random_user_agent(),+ "Accept": "application/json, text/plain, */*",+ "X-Requested-With": "XMLHttpRequest",+ "Referer": "https://gitlab.com/users/sign_up",}def process(response):if response.status_code == 200:data = response.json()- if 'exists' in data:+ if "exists" in data:# Corrected: Compare against Python boolean True/False# AVAILABLE (return 1) if "exists": true- if data['exists'] is False:+ if data["exists"] is False:return Result.available()# UNAVAILABLE (return 0) if "exists": false- elif data['exists'] is True:+ elif data["exists"] is True:return Result.taken()return Result.error("Invalid status code")return generic_validate(url, process, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_gitlab(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/dev/huggingface.py b/user_scanner/user_scan/dev/huggingface.pyindex dcfbbc1..7e20302 100644--- a/user_scanner/user_scan/dev/huggingface.py+++ b/user_scanner/user_scan/dev/huggingface.py@@ -6,15 +6,3 @@ def validate_huggingface(user):show_url = "https://huggingface.co"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_huggingface(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/dev/launchpad.py b/user_scanner/user_scan/dev/launchpad.pyindex 5df8eb3..1592cf4 100644--- a/user_scanner/user_scan/dev/launchpad.py+++ b/user_scanner/user_scan/dev/launchpad.py@@ -1,5 +1,5 @@-from user_scanner.core.orchestrator import status_validatefrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import status_validatedef validate_launchpad(user):@@ -7,22 +7,12 @@ def validate_launchpad(user):show_url = "https://launchpad.net"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9",- 'Accept-Encoding': "gzip, deflate, br, zstd",- 'Upgrade-Insecure-Requests': "1",+ "User-Agent": get_random_user_agent(),+ "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9",+ "Accept-Encoding": "gzip, deflate, br, zstd",+ "Upgrade-Insecure-Requests": "1",}- return status_validate(url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_launchpad(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of file+ return status_validate(+ url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True+ )diff --git a/user_scanner/user_scan/dev/leetcode.py b/user_scanner/user_scan/dev/leetcode.pyindex 34e9159..95829dd 100644--- a/user_scanner/user_scan/dev/leetcode.py+++ b/user_scanner/user_scan/dev/leetcode.py@@ -1,37 +1,30 @@import re-from user_scanner.core.orchestrator import status_validate, Result+from user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, status_validatedef validate_leetcode(user: str) -> Result:if not (3 <= len(user) <= 30):return Result.error("Length must be between 3 and 30 characters")- if not re.match(r'^[a-zA-Z0-9._-]+$', user):- return Result.error("Can only use letters, numbers, underscores, periods, or hyphens")+ if not re.match(r"^[a-zA-Z0-9._-]+$", user):+ return Result.error(+ "Can only use letters, numbers, underscores, periods, or hyphens"+ )url = f"https://leetcode.com/u/{user}/"show_url = "https://leetcode.com"headers = {- 'User-Agent': get_random_user_agent(),- '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",- 'accept-language': "en-US,en;q=0.9",- 'priority': "u=0, i"+ "User-Agent": get_random_user_agent(),+ "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",+ "accept-language": "en-US,en;q=0.9",+ "priority": "u=0, i",}- return status_validate(url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_leetcode(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of file+ return status_validate(+ url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True+ )diff --git a/user_scanner/user_scan/dev/npmjs.py b/user_scanner/user_scan/dev/npmjs.pyindex 1275e23..e445c27 100644--- a/user_scanner/user_scan/dev/npmjs.py+++ b/user_scanner/user_scan/dev/npmjs.py@@ -1,28 +1,18 @@import re-from user_scanner.core.orchestrator import status_validate, Result++from user_scanner.core.orchestrator import Result, status_validatedef validate_npmjs(user):- if re.match(r'^[^a-zA-Z0-9_-]', user):+ if re.match(r"^[^a-zA-Z0-9_-]", user):return Result.error("Username cannot start with a period")- if re.search(r'[A-Z]', user):+ if re.search(r"[A-Z]", user):return Result.error("Username cannot contain uppercase letters.")url = f"https://www.npmjs.com/~{user}"show_url = "https://npmjs.com"-- return status_validate(url, 404, 200, show_url=show_url, timeout=3.0, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_npmjs(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result}")\ No newline at end of file+ return status_validate(+ url, 404, 200, show_url=show_url, timeout=3.0, follow_redirects=True+ )diff --git a/user_scanner/user_scan/dev/replit.py b/user_scanner/user_scan/dev/replit.pyindex 2bdf069..d5f4aa4 100644--- a/user_scanner/user_scan/dev/replit.py+++ b/user_scanner/user_scan/dev/replit.py@@ -6,15 +6,3 @@ def validate_replit(user):show_url = "https://replit.com"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_replit(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/dev/sourceforge.py b/user_scanner/user_scan/dev/sourceforge.pyindex 1d16635..5e0fc61 100644--- a/user_scanner/user_scan/dev/sourceforge.py+++ b/user_scanner/user_scan/dev/sourceforge.py@@ -1,14 +1,14 @@import re-from user_scanner.core.orchestrator import status_validate, Result++from user_scanner.core.orchestrator import Result, status_validatedef validate_sourceforge(user: str) -> Result:if not (3 <= len(user) <= 30):return Result.error("Length must be 3-30 characters.")- if not re.match(r'^[a-z0-9-]+$', user):-- if re.search(r'[A-Z]', user):+ if not re.match(r"^[a-z0-9-]+$", user):+ if re.search(r"[A-Z]", user):return Result.error("Use lowercase letters only.")return Result.error("Only use lowercase letters, numbers, and dashes.")@@ -17,15 +17,3 @@ def validate_sourceforge(user: str) -> Result:show_url = "https://sourceforge.net"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_sourceforge(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of filediff --git a/user_scanner/user_scan/donation/buymeacoffee.py b/user_scanner/user_scan/donation/buymeacoffee.pyindex 02ade24..bf322ed 100644--- a/user_scanner/user_scan/donation/buymeacoffee.py+++ b/user_scanner/user_scan/donation/buymeacoffee.py@@ -6,15 +6,3 @@ def validate_buymeacoffee(user):show_url = "https://buymeacoffee.com"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_buymeacoffee(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/donation/liberapay.py b/user_scanner/user_scan/donation/liberapay.pyindex 8b0e179..af024e6 100644--- a/user_scanner/user_scan/donation/liberapay.py+++ b/user_scanner/user_scan/donation/liberapay.py@@ -22,16 +22,6 @@ def validate_liberapay(user):"upgrade-insecure-requests": "1",}- return status_validate(url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_liberapay(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of file+ return status_validate(+ url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True+ )diff --git a/user_scanner/user_scan/gaming/apexlegends.py b/user_scanner/user_scan/gaming/apexlegends.pyindex 5ed8ff9..8a22cc9 100644--- a/user_scanner/user_scan/gaming/apexlegends.py+++ b/user_scanner/user_scan/gaming/apexlegends.py@@ -9,19 +9,7 @@ def validate_apexlegends(user):"Accept-Language": "en-US,en;q=0.5","Origin": "https://apex.tracker.gg","Referer": "https://apex.tracker.gg/",- "User-Agent": "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0"+ "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)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_apexlegends(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")diff --git a/user_scanner/user_scan/gaming/battlenet.py b/user_scanner/user_scan/gaming/battlenet.pyindex e2cdd7b..7203d60 100644--- a/user_scanner/user_scan/gaming/battlenet.py+++ b/user_scanner/user_scan/gaming/battlenet.py@@ -1,8 +1,8 @@import re+from user_scanner.core.helpers import get_random_user_agentfrom user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result-from user_scanner.core.helpers import get_random_user_agentdef validate_battlenet(user: str) -> Result:@@ -46,7 +46,9 @@ def validate_battlenet(user: str) -> Result:data = response.json()if isinstance(data, list) and len(data) == 0:- return Result.available("Battle.net allows duplicate usernames and distinguishes accounts with a numeric tag")+ return Result.available(+ "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}")@@ -56,17 +58,10 @@ def validate_battlenet(user: str) -> Result:return Result.error("Failed to parse response")return generic_validate(- url, process, show_url=show_url, headers=headers, timeout=6.0, follow_redirects=True+ url,+ process,+ show_url=show_url,+ headers=headers,+ timeout=6.0,+ follow_redirects=True,)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_battlenet(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")diff --git a/user_scanner/user_scan/gaming/chess_com.py b/user_scanner/user_scan/gaming/chess_com.pyindex 6c29db5..3df5cb5 100644--- a/user_scanner/user_scan/gaming/chess_com.py+++ b/user_scanner/user_scan/gaming/chess_com.py@@ -1,7 +1,8 @@import re++from user_scanner.core.helpers import get_random_user_agentfrom user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result-from user_scanner.core.helpers import get_random_user_agentdef validate_chess_com(user: str) -> Result:@@ -10,8 +11,10 @@ def validate_chess_com(user: str) -> Result:return Result.error("Length must be 3-25 characters")# Only letters, numbers, underscores, and dashes allowed- if not re.match(r'^[a-zA-Z0-9_-]+$', user):- return Result.error("Usernames can only contain letters, numbers, underscores, and hyphens")+ if not re.match(r"^[a-zA-Z0-9_-]+$", user):+ return Result.error(+ "Usernames can only contain letters, numbers, underscores, and hyphens"+ )# Must start and end with an alphanumeric characterif not (user[0].isalnum() and user[-1].isalnum()):@@ -21,33 +24,21 @@ def validate_chess_com(user: str) -> Result:show_url = "https://chess.com"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "application/json, text/plain, */*",- 'Accept-Encoding': "identity",- 'Accept-Language': "en-US,en;q=0.9",+ "User-Agent": get_random_user_agent(),+ "Accept": "application/json, text/plain, */*",+ "Accept-Encoding": "identity",+ "Accept-Language": "en-US,en;q=0.9",}def process(response):if response.status_code == 200:data = response.json()- if data.get('valid') is True:+ if data.get("valid") is True:# 'valid': true means the username is NOT takenreturn Result.available()- elif data.get('valid') is False:+ elif data.get("valid") is False:# 'valid': false means the username IS takenreturn Result.taken()return Result.error("Invalid status code")return generic_validate(url, process, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_chess_com(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")diff --git a/user_scanner/user_scan/gaming/lichess.py b/user_scanner/user_scan/gaming/lichess.pyindex b8d91cd..c182dd9 100644--- a/user_scanner/user_scan/gaming/lichess.py+++ b/user_scanner/user_scan/gaming/lichess.py@@ -1,18 +1,23 @@import re-from user_scanner.core.orchestrator import generic_validate, Result++from user_scanner.core.orchestrator import Result, generic_validatedef validate_lichess(user: str) -> Result:if not (2 <= len(user) <= 20):return Result.error("Length must be 2-20 characters")- if not re.match(r'^[a-zA-Z0-9_-]+$', user):- return Result.error("Usernames can only contain letters, numbers, underscores, and hyphens")+ if not re.match(r"^[a-zA-Z0-9_-]+$", user):+ return Result.error(+ "Usernames can only contain letters, numbers, underscores, and hyphens"+ )- if re.search(r'[_-]{2,}', user):- return Result.error("Username cannot contain consecutive underscores or hyphens")+ if re.search(r"[_-]{2,}", user):+ return Result.error(+ "Username cannot contain consecutive underscores or hyphens"+ )- if not re.match(r'.*[a-zA-Z0-9]$', user):+ if not re.match(r".*[a-zA-Z0-9]$", user):return Result.error("Username must end with a letter or a number")url = f"https://lichess.org/api/player/autocomplete?term={user}&exists=1"@@ -27,15 +32,3 @@ def validate_lichess(user: str) -> Result:return Result.error("Unexpected error, report it via github issues")return generic_validate(url, process, show_url=show_url, timeout=3.0)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_lichess(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of filediff --git a/user_scanner/user_scan/gaming/minecraft.py b/user_scanner/user_scan/gaming/minecraft.pyindex a339a7d..8974d44 100644--- a/user_scanner/user_scan/gaming/minecraft.py+++ b/user_scanner/user_scan/gaming/minecraft.py@@ -6,15 +6,3 @@ def validate_minecraft(user):show_url = "https://mojang.com"return status_validate(url, 404, 200, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_minecraft(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/gaming/monkeytype.py b/user_scanner/user_scan/gaming/monkeytype.pyindex e46ef70..a054234 100644--- a/user_scanner/user_scan/gaming/monkeytype.py+++ b/user_scanner/user_scan/gaming/monkeytype.py@@ -1,7 +1,9 @@-from user_scanner.core.orchestrator import generic_validate-from user_scanner.core.result import Resultfrom urllib.parse import quote+from user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import generic_validate+from user_scanner.core.result import Result+def validate_monkeytype(user: str) -> Result:safe_user = quote(user, safe="")@@ -40,15 +42,3 @@ def validate_monkeytype(user: str) -> Result:return Result.error("Invalid status code")return generic_validate(url, process, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_monkeytype(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/gaming/osu.py b/user_scanner/user_scan/gaming/osu.pyindex c91b6ad..37741ad 100644--- a/user_scanner/user_scan/gaming/osu.py+++ b/user_scanner/user_scan/gaming/osu.py@@ -5,16 +5,6 @@ def validate_osu(user):url = f"https://osu.ppy.sh/users/{user}"show_url = "https://osu.ppy.sh"- return status_validate(url, 404, [200, 302], show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_osu(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")+ return status_validate(+ url, 404, [200, 302], show_url=show_url, follow_redirects=True+ )diff --git a/user_scanner/user_scan/gaming/roblox.py b/user_scanner/user_scan/gaming/roblox.pyindex 5c00af7..c8983ec 100644--- a/user_scanner/user_scan/gaming/roblox.py+++ b/user_scanner/user_scan/gaming/roblox.py@@ -39,16 +39,6 @@ def validate_roblox(user: str) -> Result:# If rate limited, uses a simple status validationurl = f"https://www.roblox.com/user.aspx?username={user}"- return status_validate(url, 404, [200, 302], show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_roblox(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")+ return status_validate(+ 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.pyindex 5ada37f..163844c 100644--- a/user_scanner/user_scan/gaming/steam.py+++ b/user_scanner/user_scan/gaming/steam.py@@ -16,15 +16,3 @@ def validate_steam(user):return Result.error("Invalid status code")return generic_validate(url, process, show_url=show_url)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_steam(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/shopping/vinted.py b/user_scanner/user_scan/shopping/vinted.pyindex 5d7cb23..79b5418 100644--- a/user_scanner/user_scan/shopping/vinted.py+++ b/user_scanner/user_scan/shopping/vinted.py@@ -36,8 +36,3 @@ def validate_vinted(user: str):return Result.taken()return generic_validate(url, process, show_url=show_url)---if __name__ == "__main__":- user = input("Username?: ").strip()- validate_vinted(user).show()\ No newline at end of filediff --git a/user_scanner/user_scan/social/airliners.py b/user_scanner/user_scan/social/airliners.pyindex 2f00b7b..b4ec786 100644--- a/user_scanner/user_scan/social/airliners.py+++ b/user_scanner/user_scan/social/airliners.py@@ -1,20 +1,8 @@from user_scanner.core.orchestrator import status_validate+def validate_airliners(user):url = f"https://www.airliners.net/user/{user}/profile"show_url = "https://www.airliners.net"return status_validate(url, 404, 200, show_url=show_url)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_airliners(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")-diff --git a/user_scanner/user_scan/social/albicla.py b/user_scanner/user_scan/social/albicla.pyindex 9ae4a02..6ca6e1f 100644--- a/user_scanner/user_scan/social/albicla.py+++ b/user_scanner/user_scan/social/albicla.py@@ -1,33 +1,25 @@-from user_scanner.core.orchestrator import generic_validate, Resultfrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, generic_validate+def validate_albicla(user):url = f"https://albicla.com/{user}/post/1"show_url = f"https://albicla.com/{user}"headers = {- 'User-Agent': get_random_user_agent(),+ "User-Agent": get_random_user_agent(),}def process(response):- if response.status_code == 500 or "500 Post tymczasowo niedostępny" in response.text:+ if (+ response.status_code == 500+ or "500 Post tymczasowo niedostępny" in response.text+ ):return Result.taken()-+if "404 Nie znaleziono użytkownika" in response.text:return Result.available()return Result.error(f"Unexpected status: {response.status_code}")return generic_validate(url, process, show_url=show_url, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_albicla(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")diff --git a/user_scanner/user_scan/social/anilist.py b/user_scanner/user_scan/social/anilist.pyindex f257017..8c79435 100644--- a/user_scanner/user_scan/social/anilist.py+++ b/user_scanner/user_scan/social/anilist.py@@ -1,19 +1,16 @@-from user_scanner.core.orchestrator import generic_validate, Result+from user_scanner.core.orchestrator import Result, generic_validatedef validate_anilist(user):url = "https://graphql.anilist.co"show_url = f"https://anilist.co/user/{user}"- headers = {- "accept": "application/json",- "Content-Type": "application/json"- }+ headers = {"accept": "application/json", "Content-Type": "application/json"}- payload = {"query": "query{User(name:\"" + user + "\"){id name}}"}+ payload = {"query": 'query{User(name:"' + user + '"){id name}}'}def process(response):- if response.status_code == 200 and "\"id\":" in response.text:+ if response.status_code == 200 and '"id":' in response.text:return Result.taken()if response.status_code == 404 or "Not Found" in response.text:@@ -21,16 +18,6 @@ def validate_anilist(user):return Result.error(f"Unexpected status: {response.status_code}")- return generic_validate(url, process, show_url=show_url, method="POST", json=payload, headers=headers)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_anilist(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")+ return generic_validate(+ url, process, show_url=show_url, method="POST", json=payload, headers=headers+ )diff --git a/user_scanner/user_scan/social/anonup.py b/user_scanner/user_scan/social/anonup.pyindex 0e75d21..197a6b9 100644--- a/user_scanner/user_scan/social/anonup.py+++ b/user_scanner/user_scan/social/anonup.py@@ -1,19 +1,8 @@from user_scanner.core.orchestrator import status_validate+def validate_anonup(user):url = f"https://anonup.com/@{user}"show_url = "https://anonup.com"return status_validate(url, 302, 200, show_url=show_url)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_anonup(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")diff --git a/user_scanner/user_scan/social/bluesky.py b/user_scanner/user_scan/social/bluesky.pyindex 66ee4af..04c0eb9 100644--- a/user_scanner/user_scan/social/bluesky.py+++ b/user_scanner/user_scan/social/bluesky.py@@ -1,56 +1,54 @@+from user_scanner.core.helpers import get_random_user_agentfrom user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result-from user_scanner.core.helpers import get_random_user_agentdef validate_bluesky(user):- handle = user if user.endswith('.bsky.social') else f"{user}.bsky.social"+ handle = user if user.endswith(".bsky.social") else f"{user}.bsky.social"url = "https://bsky.social/xrpc/com.atproto.temp.checkHandleAvailability"show_url = "https://bsky.social"headers = {- 'User-Agent': get_random_user_agent(),- 'Accept-Encoding': "gzip",- 'atproto-accept-labelers': "did:plc:ar7c4by46qjdydhdevvrndac;redact",- 'sec-ch-ua-platform': "\"Android\"",- 'sec-ch-ua': "\"Google Chrome\";v=\"141\", \"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"141\"",- 'sec-ch-ua-mobile': "?1",- 'origin': "https://bsky.app",- 'sec-fetch-site': "cross-site",- 'sec-fetch-mode': "cors",- 'sec-fetch-dest': "empty",- 'referer': "https://bsky.app/",- 'accept-language': "en-US,en;q=0.9",+ "User-Agent": get_random_user_agent(),+ "Accept-Encoding": "gzip",+ "atproto-accept-labelers": "did:plc:ar7c4by46qjdydhdevvrndac;redact",+ "sec-ch-ua-platform": '"Android"',+ "sec-ch-ua": '"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',+ "sec-ch-ua-mobile": "?1",+ "origin": "https://bsky.app",+ "sec-fetch-site": "cross-site",+ "sec-fetch-mode": "cors",+ "sec-fetch-dest": "empty",+ "referer": "https://bsky.app/",+ "accept-language": "en-US,en;q=0.9",}params = {- 'handle': handle,+ "handle": handle,}def process(response):if response.status_code == 200:data = response.json()- result_type = data.get('result', {}).get('$type')+ result_type = data.get("result", {}).get("$type")- if result_type == "com.atproto.temp.checkHandleAvailability#resultAvailable":+ if (+ result_type+ == "com.atproto.temp.checkHandleAvailability#resultAvailable"+ ):return Result.available()- elif result_type == "com.atproto.temp.checkHandleAvailability#resultUnavailable":+ elif (+ result_type+ == "com.atproto.temp.checkHandleAvailability#resultUnavailable"+ ):return Result.taken()elif response.status_code == 400:- return Result.error("Username can only contain letters, numbers, hyphens (no leading/trailing)")+ return Result.error(+ "Username can only contain letters, numbers, hyphens (no leading/trailing)"+ )return Result.error("Invalid status code!")- return generic_validate(url, process, show_url=show_url, headers=headers, params=params, timeout=15.0)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_bluesky(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of file+ return generic_validate(+ url, process, show_url=show_url, headers=headers, params=params, timeout=15.0+ )diff --git a/user_scanner/user_scan/social/discord.py b/user_scanner/user_scan/social/discord.pyindex 24d7f01..c815f18 100644--- a/user_scanner/user_scan/social/discord.py+++ b/user_scanner/user_scan/social/discord.py@@ -1,5 +1,6 @@-from user_scanner.core.result import Resultfrom user_scanner.core.orchestrator import generic_validate+from user_scanner.core.result import Result+def validate_discord(user):url = "https://discord.com/api/v9/unique-username/username-attempt-unauthed"@@ -11,7 +12,7 @@ def validate_discord(user):"accept-language": "en-GB,en-US;q=0.9,en;q=0.8","content-type": "application/json","origin": "https://discord.com",- "referer": "https://discord.com/register"+ "referer": "https://discord.com/register",}data = {"username": user}@@ -25,16 +26,12 @@ def validate_discord(user):return Result.available()return Result.error("Invalid status code")- return generic_validate(url, process, show_url=show_url, method="POST", json=data, headers=headers, timeout=3.0)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_discord(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of file+ return generic_validate(+ url,+ process,+ show_url=show_url,+ method="POST",+ json=data,+ headers=headers,+ timeout=3.0,+ )diff --git a/user_scanner/user_scan/social/instagram.py b/user_scanner/user_scan/social/instagram.pyindex 856213e..e5dba8e 100644--- a/user_scanner/user_scan/social/instagram.py+++ b/user_scanner/user_scan/social/instagram.py@@ -1,45 +1,34 @@-from user_scanner.core.orchestrator import status_validatefrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import status_validate+def validate_instagram(user):url = "https://www.instagram.com/api/v1/users/web_profile_info/"show_url = "https://instagram.com"- params = {- 'username': user- }+ params = {"username": user}headers = {- 'User-Agent': get_random_user_agent(),- 'Accept-Encoding': "gzip, deflate, br, zstd",- 'sec-ch-ua-full-version-list': "\"Not(A:Brand\";v=\"8.0.0.0\", \"Chromium\";v=\"144.0.7559.132\", \"Google Chrome\";v=\"144.0.7559.132\"",- 'sec-ch-ua-platform': "\"Linux\"",- 'sec-ch-ua': "\"Not(A:Brand\";v=\"8\", \"Chromium\";v=\"144\", \"Google Chrome\";v=\"144\"",- 'sec-ch-ua-model': "\"\"",- 'sec-ch-ua-mobile': "?0",- 'x-ig-app-id': "936619743392459",- 'x-requested-with': "XMLHttpRequest",- 'sec-ch-prefers-color-scheme': "dark",- 'x-ig-www-claim': "0",- 'sec-ch-ua-platform-version': "\"\"",- 'sec-fetch-site': "same-origin",- 'sec-fetch-mode': "cors",- 'sec-fetch-dest': "empty",- 'referer': f"https://www.instagram.com/{user}",- 'accept-language': "en-US,en;q=0.9",- 'priority': "u=1, i"+ "User-Agent": get_random_user_agent(),+ "Accept-Encoding": "gzip, deflate, br, zstd",+ "sec-ch-ua-full-version-list": '"Not(A:Brand";v="8.0.0.0", "Chromium";v="144.0.7559.132", "Google Chrome";v="144.0.7559.132"',+ "sec-ch-ua-platform": '"Linux"',+ "sec-ch-ua": '"Not(A:Brand";v="8", "Chromium";v="144", "Google Chrome";v="144"',+ "sec-ch-ua-model": '""',+ "sec-ch-ua-mobile": "?0",+ "x-ig-app-id": "936619743392459",+ "x-requested-with": "XMLHttpRequest",+ "sec-ch-prefers-color-scheme": "dark",+ "x-ig-www-claim": "0",+ "sec-ch-ua-platform-version": '""',+ "sec-fetch-site": "same-origin",+ "sec-fetch-mode": "cors",+ "sec-fetch-dest": "empty",+ "referer": f"https://www.instagram.com/{user}",+ "accept-language": "en-US,en;q=0.9",+ "priority": "u=1, i",}- return status_validate(url, 404, 200, show_url=show_url, params=params, headers=headers, http2=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_instagram(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! {result.get_reason()}")\ No newline at end of file+ return status_validate(+ url, 404, 200, show_url=show_url, params=params, headers=headers, http2=True+ )diff --git a/user_scanner/user_scan/social/mastodon.py b/user_scanner/user_scan/social/mastodon.pyindex 90d0307..830d9bb 100644--- a/user_scanner/user_scan/social/mastodon.py+++ b/user_scanner/user_scan/social/mastodon.py@@ -1,31 +1,24 @@import re+from user_scanner.core.orchestrator import status_validatefrom user_scanner.core.result import Result+def validate_mastodon(user: str) -> Result:if not (3 <= len(user) <= 30):return Result.error("Length must be 3-30 characters")- if not re.match(r'^[a-zA-Z0-9_-]+$', user):- return Result.error("Usernames can only contain letters, numbers, underscores and hyphens")+ if not re.match(r"^[a-zA-Z0-9_-]+$", user):+ return Result.error(+ "Usernames can only contain letters, numbers, underscores and hyphens"+ )- if not re.match(r'^[a-zA-Z0-9].*[a-zA-Z0-9]$', user):+ if not re.match(r"^[a-zA-Z0-9].*[a-zA-Z0-9]$", user):return Result.error("Username must start and end with a letter or number")url = f"https://mastodon.social/api/v1/accounts/lookup?acct={user}"show_url = "https://mastodon.social"- return status_validate(url, available=404, taken=200, show_url=show_url, follow_redirects=True)----if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_mastodon(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")\ No newline at end of file+ return status_validate(+ url, available=404, taken=200, show_url=show_url, follow_redirects=True+ )diff --git a/user_scanner/user_scan/social/pinterest.py b/user_scanner/user_scan/social/pinterest.pyindex 6f50121..e83652e 100644--- a/user_scanner/user_scan/social/pinterest.py+++ b/user_scanner/user_scan/social/pinterest.py@@ -1,6 +1,7 @@from user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result+def validate_pinterest(user):url = f"https://www.pinterest.com/{user}/"show_url = "https://pinterest.com"@@ -15,15 +16,3 @@ def validate_pinterest(user):return Result.error("Invalid status code")return generic_validate(url, process, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_pinterest(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/social/reddit.py b/user_scanner/user_scan/social/reddit.pyindex f187e58..7c92313 100644--- a/user_scanner/user_scan/social/reddit.py+++ b/user_scanner/user_scan/social/reddit.py@@ -16,15 +16,3 @@ def validate_reddit(user):return Result.error()return generic_validate(url, process, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_reddit(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/social/snapchat.py b/user_scanner/user_scan/social/snapchat.pyindex 43cf4a9..38812b1 100644--- a/user_scanner/user_scan/social/snapchat.py+++ b/user_scanner/user_scan/social/snapchat.py@@ -1,5 +1,5 @@-from user_scanner.core.orchestrator import status_validatefrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import status_validatedef validate_snapchat(user):@@ -7,31 +7,21 @@ def validate_snapchat(user):show_url = "https://snapchat.com"headers = {- 'User-Agent': get_random_user_agent(),- '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': "gzip, deflate, br, zstd",- 'sec-ch-ua': "\"Google Chrome\";v=\"141\", \"Not?A_Brand\";v=\"8\", \"Chromium\";v=\"141\"",- 'sec-ch-ua-mobile': "?1",- 'sec-ch-ua-platform': "\"Android\"",- 'upgrade-insecure-requests': "1",- 'sec-fetch-site': "none",- 'sec-fetch-mode': "navigate",- 'sec-fetch-user': "?1",- 'sec-fetch-dest': "document",- 'accept-language': "en-US,en;q=0.9",- 'priority': "u=0, i"+ "User-Agent": get_random_user_agent(),+ "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": "gzip, deflate, br, zstd",+ "sec-ch-ua": '"Google Chrome";v="141", "Not?A_Brand";v="8", "Chromium";v="141"',+ "sec-ch-ua-mobile": "?1",+ "sec-ch-ua-platform": '"Android"',+ "upgrade-insecure-requests": "1",+ "sec-fetch-site": "none",+ "sec-fetch-mode": "navigate",+ "sec-fetch-user": "?1",+ "sec-fetch-dest": "document",+ "accept-language": "en-US,en;q=0.9",+ "priority": "u=0, i",}- return status_validate(url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_snapchat(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of file+ return status_validate(+ url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True+ )diff --git a/user_scanner/user_scan/social/soundcloud.py b/user_scanner/user_scan/social/soundcloud.pyindex c4e35e0..74e3b15 100644--- a/user_scanner/user_scan/social/soundcloud.py+++ b/user_scanner/user_scan/social/soundcloud.py@@ -16,11 +16,11 @@ def validate_soundcloud(user):if response.status_code == 200:text = response.text- if f'soundcloud://users:{user}' in text:+ if f"soundcloud://users:{user}" in text:return Result.taken()if f'"username":"{user}"' in text:return Result.taken()- if 'soundcloud://users:' in text and '"username":"' in text:+ if "soundcloud://users:" in text and '"username":"' in text:return Result.taken()return Result.error("Unexpected response, report it via GitHub issues")@@ -28,15 +28,3 @@ def validate_soundcloud(user):return Result.error("Unknown Error report it via GitHub issues")return generic_validate(url, process, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_soundcloud(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")diff --git a/user_scanner/user_scan/social/telegram.py b/user_scanner/user_scan/social/telegram.pyindex e95257a..798b53c 100644--- a/user_scanner/user_scan/social/telegram.py+++ b/user_scanner/user_scan/social/telegram.py@@ -1,4 +1,5 @@import re+from user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result@@ -16,15 +17,3 @@ def validate_telegram(user: str) -> Result:return Result.error()return generic_validate(url, process, show_url=show_url, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_telegram(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of filediff --git a/user_scanner/user_scan/social/threads.py b/user_scanner/user_scan/social/threads.pyindex c8f0965..cded1c3 100644--- a/user_scanner/user_scan/social/threads.py+++ b/user_scanner/user_scan/social/threads.py@@ -1,30 +1,21 @@-from user_scanner.core.orchestrator import status_validatefrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import status_validate+def validate_threads(user):url = f"https://www.threads.net/api/v1/users/web_profile_info/?username={user}"show_url = "https://threads.net"headers = {- 'User-Agent': get_random_user_agent(),- 'X-IG-App-ID': "936619743392459",- 'Accept': "application/json, text/javascript, */*; q=0.01",- 'Accept-Encoding': "gzip, deflate, br",- 'Accept-Language': "en-US,en;q=0.9",- 'X-Requested-With': "XMLHttpRequest",- 'Referer': f"https://www.threads.net/@{user}",+ "User-Agent": get_random_user_agent(),+ "X-IG-App-ID": "936619743392459",+ "Accept": "application/json, text/javascript, */*; q=0.01",+ "Accept-Encoding": "gzip, deflate, br",+ "Accept-Language": "en-US,en;q=0.9",+ "X-Requested-With": "XMLHttpRequest",+ "Referer": f"https://www.threads.net/@{user}",}- return status_validate(url, 404, 200, show_url=show_url, headers=headers, http2=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_threads(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")+ return status_validate(+ url, 404, 200, show_url=show_url, headers=headers, http2=True+ )diff --git a/user_scanner/user_scan/social/tiktok.py b/user_scanner/user_scan/social/tiktok.pyindex 4fd0176..2c0f1d4 100644--- a/user_scanner/user_scan/social/tiktok.py+++ b/user_scanner/user_scan/social/tiktok.py@@ -1,7 +1,8 @@import re++from user_scanner.core.helpers import get_random_user_agentfrom user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.result import Result-from user_scanner.core.helpers import get_random_user_agentdef validate_tiktok(user: str) -> Result:@@ -11,19 +12,21 @@ def validate_tiktok(user: str) -> Result:if user.isdigit():return Result.error("Usernames cannot contain numbers only")- if not re.match(r'^[a-zA-Z0-9_.]+$', user):- return Result.error("Usernames can only contain letters, numbers, underscores and periods")+ if not re.match(r"^[a-zA-Z0-9_.]+$", user):+ return Result.error(+ "Usernames can only contain letters, numbers, underscores and periods"+ )if user.startswith(".") or user.endswith("."):return Result.error("Username cannot start nor end with a period")headers = {- 'User-Agent': get_random_user_agent(),- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",- 'Accept-Encoding': "identity",- 'Accept-Language': "en-US,en;q=0.9",- 'sec-fetch-dest': "document",- 'Connection': "keep-alive"+ "User-Agent": get_random_user_agent(),+ "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",+ "Accept-Encoding": "identity",+ "Accept-Language": "en-US,en;q=0.9",+ "sec-fetch-dest": "document",+ "Connection": "keep-alive",}url = f"https://www.tiktok.com/@{user}"@@ -31,22 +34,12 @@ def validate_tiktok(user: str) -> Result:def process(response) -> Result:if response.status_code == 200:- if "statuscode\":10221" in response.text.lower():+ if 'statuscode":10221' in response.text.lower():return Result.available()else:return Result.taken()return Result.error("Unable to load tiktok")- return generic_validate(url, process, show_url=show_url, headers=headers, timeout=4.0)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_tiktok(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print(f"Error occurred! Reason: {result.get_reason()}")+ return generic_validate(+ url, process, show_url=show_url, headers=headers, timeout=4.0+ )diff --git a/user_scanner/user_scan/social/x.py b/user_scanner/user_scan/social/x.pyindex 03236a0..4bce170 100644--- a/user_scanner/user_scan/social/x.py+++ b/user_scanner/user_scan/social/x.py@@ -1,16 +1,13 @@-from user_scanner.core.result import Result-from user_scanner.core.orchestrator import generic_validatefrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import generic_validate+from user_scanner.core.result import Result+def validate_x(user):url = "https://api.twitter.com/i/users/username_available.json"show_url = "https://x.com"- params = {- "username": user,- "full_name": "John Doe",- "email": "[email protected]"- }+ params = {"username": user, "full_name": "John Doe", "email": "[email protected]"}headers = {"Authority": "api.twitter.com",@@ -25,24 +22,18 @@ def validate_x(user):elif status == 200:data = response.json()- if data.get('valid') is True:+ if data.get("valid") is True:return Result.available()- elif data.get('reason') == 'taken':+ elif data.get("reason") == "taken":return Result.taken()- elif (data.get('reason') == "improper_format" or data.get('reason') == "invalid_username"):+ elif (+ data.get("reason") == "improper_format"+ or data.get("reason") == "invalid_username"+ ):return Result.error(f"X says: {data.get('desc')}")return Result.error()- return generic_validate(url, process, show_url=show_url, params=params, headers=headers)--if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_x(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- print("Error occurred!")\ No newline at end of file+ return generic_validate(+ url, process, show_url=show_url, params=params, headers=headers+ )diff --git a/user_scanner/user_scan/social/youtube.py b/user_scanner/user_scan/social/youtube.pyindex 007d80b..35dbdc6 100644--- a/user_scanner/user_scan/social/youtube.py+++ b/user_scanner/user_scan/social/youtube.py@@ -1,51 +1,39 @@-from user_scanner.core.orchestrator import status_validate, Resultfrom user_scanner.core.helpers import get_random_user_agent+from user_scanner.core.orchestrator import Result, status_validatedef validate_youtube(user) -> Result:url = f"https://m.youtube.com/@{user}"show_url = "https://m.youtube.com"headers = {- 'User-Agent': get_random_user_agent(),- '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-dpr': "2.75",- 'sec-ch-viewport-width': "980",- 'sec-ch-ua': "\"Google Chrome\";v=\"143\", \"Chromium\";v=\"143\", \"Not A(Brand\";v=\"24\"",- 'sec-ch-ua-mobile': "?1",- 'sec-ch-ua-full-version': "\"143.0.7499.52\"",- 'sec-ch-ua-arch': "\"\"",- 'sec-ch-ua-platform': "\"Android\"",- 'sec-ch-ua-platform-version': "\"15.0.0\"",- 'sec-ch-ua-model': "\"I2404\"",- 'sec-ch-ua-bitness': "\"\"",- 'sec-ch-ua-wow64': "?0",- 'sec-ch-ua-full-version-list': "\"Google Chrome\";v=\"143.0.7499.52\", \"Chromium\";v=\"143.0.7499.52\", \"Not A(Brand\";v=\"24.0.0.0\"",- 'sec-ch-ua-form-factors': "\"Mobile\"",- 'upgrade-insecure-requests': "1",- 'x-browser-channel': "stable",- 'x-browser-year': "2025",- 'x-browser-copyright': "Copyright 2025 Google LLC. All Rights reserved.",- 'sec-fetch-site': "none",- 'sec-fetch-mode': "navigate",- 'sec-fetch-user': "?1",- 'sec-fetch-dest': "document",- 'accept-language': "en-US,en;q=0.9",- 'priority': "u=0, i"+ "User-Agent": get_random_user_agent(),+ "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-dpr": "2.75",+ "sec-ch-viewport-width": "980",+ "sec-ch-ua": '"Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"',+ "sec-ch-ua-mobile": "?1",+ "sec-ch-ua-full-version": '"143.0.7499.52"',+ "sec-ch-ua-arch": '""',+ "sec-ch-ua-platform": '"Android"',+ "sec-ch-ua-platform-version": '"15.0.0"',+ "sec-ch-ua-model": '"I2404"',+ "sec-ch-ua-bitness": '""',+ "sec-ch-ua-wow64": "?0",+ "sec-ch-ua-full-version-list": '"Google Chrome";v="143.0.7499.52", "Chromium";v="143.0.7499.52", "Not A(Brand";v="24.0.0.0"',+ "sec-ch-ua-form-factors": '"Mobile"',+ "upgrade-insecure-requests": "1",+ "x-browser-channel": "stable",+ "x-browser-year": "2025",+ "x-browser-copyright": "Copyright 2025 Google LLC. All Rights reserved.",+ "sec-fetch-site": "none",+ "sec-fetch-mode": "navigate",+ "sec-fetch-user": "?1",+ "sec-fetch-dest": "document",+ "accept-language": "en-US,en;q=0.9",+ "priority": "u=0, i",}-- return status_validate(url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True)---if __name__ == "__main__":- user = input("Username?: ").strip()- result = validate_youtube(user)-- if result == 1:- print("Available!")- elif result == 0:- print("Unavailable!")- else:- reason = result.get_reason()- print(f"Error occurred! Reason: {reason}")+ return status_validate(+ url, 404, 200, show_url=show_url, headers=headers, follow_redirects=True+ )