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.

Donation catefory and DRY principle

Vamatocf38ef264ab9
diff --git a/user_scanner/__main__.py b/user_scanner/__main__.py
index 13ba179..51e70b7 100644
--- a/user_scanner/__main__.py
+++ b/user_scanner/__main__.py
@@ -10,17 +10,19 @@ CATEGORY_MAPPING = {
"social": "social",
"creator": "creator",
"community": "community",
- "gaming": "gaming"
+ "gaming": "gaming",
+ "donation": "donation"
}
def list_modules(category=None):
- from user_scanner import dev, social, creator, community, gaming
+ from user_scanner import dev, social, creator, community, gaming, donation
packages = {
"dev": dev,
"social": social,
"creator": creator,
"community": community,
- "gaming": gaming
+ "gaming": gaming,
+ "donation": donation
}
categories_to_list = [category] if category else packages.keys()
@@ -79,11 +81,11 @@ def main():
print_banner()
- from user_scanner import dev, social, creator, community, gaming
+ from user_scanner import dev, social, creator, community, gaming, donation
if args.module:
# Single module search across all categories
- packages = [dev, social, creator, community, gaming]
+ packages = [dev, social, creator, community, gaming, donation]
found = False
for package in packages:
modules = load_modules(package)
diff --git a/user_scanner/community/coderlegion.py b/user_scanner/community/coderlegion.py
index 8d1fa61..3146a14 100644
--- a/user_scanner/community/coderlegion.py
+++ b/user_scanner/community/coderlegion.py
@@ -1,30 +1,9 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
-def validate_coderlegion(user):
- url = f"https://coderlegion.com/user/{user}"
-
- headers = {
- 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
- '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",
- }
- try:
- response = httpx.get(url, headers=headers, timeout = 15.0)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+def validate_coderlegion(user):
+ url = f"https://coderlegion.com/user/{user}"
+
+ return status_validade(url, 404, 200, timeout = 15.0)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/core/orchestrator.py b/user_scanner/core/orchestrator.py
index 552b3f4..f754224 100644
--- a/user_scanner/core/orchestrator.py
+++ b/user_scanner/core/orchestrator.py
@@ -3,6 +3,9 @@ import pkgutil
from colorama import Fore, Style
import threading
+import httpx
+from httpx import ConnectError, TimeoutException
+
lock = threading.Condition()
#Basically which thread is the one to print
print_queue = 0
@@ -74,18 +77,54 @@ def run_checks_category(package, username, verbose=False):
t.join()
def run_checks(username):
- from user_scanner import dev, social, creator, community, gaming
+ from user_scanner import dev, social, creator, community, gaming, donation
- categories = [
- ("DEV", dev),
- ("SOCIAL", social),
- ("CREATOR", creator),
- ("COMMUNITY", community),
- ("GAMING", gaming)
- ]
+ packages = [dev, social, creator, community, gaming, donation]
print(f"\n{Fore.CYAN} Checking username: {username}{Style.RESET_ALL}\n")
- for _, package in categories:
+ for package in packages:
run_checks_category(package, username)
print()
+
+def make_request(url, **kwargs):
+ if not "headers" in kwargs:
+ kwargs["headers"] = {
+ 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
+ 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
+ 'Accept-Encoding': "gzip, deflate, br",
+ 'Accept-Language': "en-US,en;q=0.9",
+ 'sec-fetch-dest': "document",
+ }
+
+ if not "timeout" in kwargs:
+ kwargs["timeout"] = 5.0
+
+ return httpx.get(url, **kwargs)
+
+def generic_validate(url, func, **kwargs):
+ try:
+ response = make_request(url, **kwargs)
+ return func(response)
+ except (ConnectError, TimeoutException):
+ return 2
+ except Exception:
+ return 2
+
+def status_validade(url, available, taken, **kwargs):
+ def inner(response):
+ contains = lambda a,b: (isinstance(a,list) and b in a) or (a == b)
+
+ status = response.status_code
+ available_value = contains(available, status)
+ taken_value = contains(taken, status)
+
+ if available_value and taken_value:
+ return 2 # Can't be both available and taken
+ elif available_value:
+ return 1
+ elif taken_value:
+ return 0
+ return 2
+
+ return generic_validate(url, inner, **kwargs)
diff --git a/user_scanner/creator/devto.py b/user_scanner/creator/devto.py
index ee51f2b..4ce81fd 100644
--- a/user_scanner/creator/devto.py
+++ b/user_scanner/creator/devto.py
@@ -1,29 +1,9 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_devto(user):
- url = f"https://dev.to/{user}"
+ url = f"https://dev.to/{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
- '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",
- }
-
- try:
- response = httpx.head(url, headers=headers, timeout=3.0, follow_redirects=True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/creator/itch_io.py b/user_scanner/creator/itch_io.py
index 9e824aa..9b169a8 100644
--- a/user_scanner/creator/itch_io.py
+++ b/user_scanner/creator/itch_io.py
@@ -1,5 +1,4 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_itch_io(user):
"""
@@ -9,29 +8,7 @@ def validate_itch_io(user):
url = f"https://{user}.itch.io"
- headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
- 'Accept-Encoding': "gzip, deflate, br",
- 'Accept-Language': "en-US,en;q=0.9",
- 'sec-fetch-dest': "document",
- }
-
- try:
- response = httpx.get(url, headers = headers, timeout = 5, follow_redirects=True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception as e:
- return 2
+ return status_validade(url, 404, 200, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/creator/kaggle.py b/user_scanner/creator/kaggle.py
index 4dd931f..7628f3f 100644
--- a/user_scanner/creator/kaggle.py
+++ b/user_scanner/creator/kaggle.py
@@ -1,29 +1,10 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_kaggle(user):
- url = f"https://www.kaggle.com/{user}"
+ url = f"https://www.kaggle.com/{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
- 'Accept': "text/html",
- }
+ return status_validade(url, 404, 200, follow_redirects=True)
- try:
- response = httpx.get(url, headers=headers, timeout=3.0, follow_redirects=True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/creator/patreon.py b/user_scanner/creator/patreon.py
index ce1dc76..696e072 100644
--- a/user_scanner/creator/patreon.py
+++ b/user_scanner/creator/patreon.py
@@ -1,31 +1,9 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_patreon(user):
url = f"https://www.patreon.com/{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
- '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",
- }
-
- try:
- response = httpx.get(url, headers=headers, timeout = 15.0, follow_redirects=True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, timeout = 15.0, follow_redirects=True)
if __name__ == "__main__":
try:
diff --git a/user_scanner/dev/codeberg.py b/user_scanner/dev/codeberg.py
index 479ebb0..c0e4667 100644
--- a/user_scanner/dev/codeberg.py
+++ b/user_scanner/dev/codeberg.py
@@ -1,29 +1,9 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_codeberg(user):
- url = f"https://codeberg.org/{user}"
+ url = f"https://codeberg.org/{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
- 'Accept': "text/html",
- }
-
- try:
- response = httpx.head(url, headers=headers, timeout=3.0, follow_redirects=True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/dev/cratesio.py b/user_scanner/dev/cratesio.py
index 4f947be..8e4cca5 100644
--- a/user_scanner/dev/cratesio.py
+++ b/user_scanner/dev/cratesio.py
@@ -1,31 +1,16 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_cratesio(user):
- url = f"https://crates.io/api/v1/users/{user}"
+ url = f"https://crates.io/api/v1/users/{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
- 'Accept': "application/json",
- 'Referer': "https://crates.io/",
- 'sec-fetch-mode': "cors",
- }
+ headers = {
+ 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
+ 'Accept': "application/json",
+ 'Referer': "https://crates.io/",
+ 'sec-fetch-mode': "cors",
+ }
- try:
- response = httpx.head(url, headers=headers, timeout=5.0)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, headers = headers)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/dev/dockerhub.py b/user_scanner/dev/dockerhub.py
index 675e3d5..5dffedb 100644
--- a/user_scanner/dev/dockerhub.py
+++ b/user_scanner/dev/dockerhub.py
@@ -1,32 +1,14 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_dockerhub(user):
- url = f"https://hub.docker.com/v2/users/{user}/"
+ url = f"https://hub.docker.com/v2/users/{user}/"
- headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
- 'Accept': "application/json",
- }
+ headers = {
+ 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
+ 'Accept': "application/json",
+ }
- try:
- response = httpx.get(url, headers=headers, timeout=3.0)
- status = response.status_code
-
- # UNAVAILABLE (return 0) if the user API endpoint returns 200 OK
- if status == 200:
- return 0
- # AVAILABLE (return 1) if the user API endpoint returns 404 Not Found
- elif status == 404:
- return 1
- # Other status codes are errors
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, headers = headers)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/dev/github.py b/user_scanner/dev/github.py
index 998b0cc..30c7636 100644
--- a/user_scanner/dev/github.py
+++ b/user_scanner/dev/github.py
@@ -1,38 +1,23 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_github(user):
- url = f"https://github.com/signup_check/username?value={user}"
+ url = f"https://github.com/signup_check/username?value={user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
- '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"
-}
+ headers = {
+ 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
+ '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"
+ }
- try:
- response = httpx.get(url, headers=headers, timeout = 3.0)
- status = response.status_code
-
- if status == 200:
- return 1
- elif status == 422:
- return 0
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 200, 422, headers = headers)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/dev/gitlab.py b/user_scanner/dev/gitlab.py
index 528cf0e..614989e 100644
--- a/user_scanner/dev/gitlab.py
+++ b/user_scanner/dev/gitlab.py
@@ -1,23 +1,18 @@
-import httpx
-import json
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import generic_validate
def validate_gitlab(user):
url = f"https://gitlab.com/users/{user}/exists"
headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
- 'Accept': "application/json, text/plain, */*",
- 'X-Requested-With': "XMLHttpRequest",
- 'Referer': "https://gitlab.com/users/sign_up",
+ 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
+ 'Accept': "application/json, text/plain, */*",
+ 'X-Requested-With': "XMLHttpRequest",
+ 'Referer': "https://gitlab.com/users/sign_up",
}
- try:
- response = httpx.get(url, headers=headers, timeout=3.0)
-
+ def process(response):
if response.status_code == 200:
data = response.json()
-
if 'exists' in data:
# Corrected: Compare against Python boolean True/False
# AVAILABLE (return 1) if "exists": true
@@ -26,18 +21,9 @@ def validate_gitlab(user):
# UNAVAILABLE (return 0) if "exists": false
elif data['exists'] is True:
return 0
-
- return 2
-
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except json.JSONDecodeError:
- return 2
- except Exception:
return 2
+
+ return generic_validate(url, process, headers = headers)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/dev/launchpad.py b/user_scanner/dev/launchpad.py
index 5933d7b..c6c0106 100644
--- a/user_scanner/dev/launchpad.py
+++ b/user_scanner/dev/launchpad.py
@@ -1,31 +1,16 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_launchpad(user):
- url = f"https://launchpad.net/~{user}"
+ url = f"https://launchpad.net/~{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9",
- 'Accept-Encoding': "gzip, deflate, br, zstd",
- 'Upgrade-Insecure-Requests': "1",
- }
+ headers = {
+ 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
+ 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9",
+ 'Accept-Encoding': "gzip, deflate, br, zstd",
+ 'Upgrade-Insecure-Requests': "1",
+ }
- try:
- response = httpx.head(url, headers=headers, timeout=5.0, follow_redirects=True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, headers = headers, follow_redirects=True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/dev/replit.py b/user_scanner/dev/replit.py
index 8c56c92..6280433 100644
--- a/user_scanner/dev/replit.py
+++ b/user_scanner/dev/replit.py
@@ -1,29 +1,9 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_replit(user):
- url = f"https://replit.com/@{user}"
+ url = f"https://replit.com/@{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
- 'Accept': "text/html",
- }
-
- try:
- response = httpx.head(url, headers=headers, timeout=3.0, follow_redirects=True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/donation/__init__.py b/user_scanner/donation/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/user_scanner/donation/buymeacoffee.py b/user_scanner/donation/buymeacoffee.py
new file mode 100644
index 0000000..cce488b
--- /dev/null
+++ b/user_scanner/donation/buymeacoffee.py
@@ -0,0 +1,21 @@
+import httpx
+from httpx import ConnectError, TimeoutException
+
+from ..core.orchestrator import status_validade
+
+def validate_buymeacoffee(user):
+ url = f"https://buymeacoffee.com/{user}"
+
+ return status_validade(url, 404, 200, 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!")
diff --git a/user_scanner/gaming/chess_com.py b/user_scanner/gaming/chess_com.py
index f3af250..7140121 100644
--- a/user_scanner/gaming/chess_com.py
+++ b/user_scanner/gaming/chess_com.py
@@ -1,6 +1,4 @@
-import httpx
-from httpx import ConnectError, TimeoutException
-import json
+from ..core.orchestrator import generic_validate
def validate_chess_com(user):
url = f"https://www.chess.com/callback/user/valid?username={user}"
@@ -12,11 +10,8 @@ def validate_chess_com(user):
'Accept-Language': "en-US,en;q=0.9",
}
- try:
- response = httpx.get(url, headers=headers, timeout = 3.0)
- status = response.status_code
-
- if status == 200:
+ 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
@@ -24,18 +19,10 @@ def validate_chess_com(user):
elif data.get('valid') is False:
# 'valid': false means the username IS taken
return 0
- else:
- return 2
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except json.JSONDecodeError:
- return 2
- except Exception:
return 2
+ return generic_validate(url, process, headers = headers)
+
if __name__ == "__main__":
try:
import httpx
diff --git a/user_scanner/gaming/monkeytype.py b/user_scanner/gaming/monkeytype.py
index 6ce3da4..6e3c35f 100644
--- a/user_scanner/gaming/monkeytype.py
+++ b/user_scanner/gaming/monkeytype.py
@@ -1,6 +1,4 @@
-import httpx
-from httpx import ConnectError, TimeoutException
-import json
+from ..core.orchestrator import generic_validate
def validate_monkeytype(user: str) -> int:
@@ -17,11 +15,8 @@ def validate_monkeytype(user: str) -> int:
"Accept-Language": "en-US,en;q=0.9",
}
- try:
- response = httpx.get(url, headers=headers, timeout=3.0)
- status = response.status_code
-
- if status == 200:
+ def process(response):
+ if response.status_code == 200:
data = response.json()
# Expected shape:
# { "message": "string", "data": { "available": true/false } }
@@ -32,18 +27,10 @@ def validate_monkeytype(user: str) -> int:
return 1
elif available is False:
return 0
- else:
- return 2
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except json.JSONDecodeError:
- return 2
- except Exception:
return 2
+
+ return generic_validate(url, process, headers = headers)
if __name__ == "__main__":
try:
diff --git a/user_scanner/gaming/osu.py b/user_scanner/gaming/osu.py
index 79b848c..0455d6e 100644
--- a/user_scanner/gaming/osu.py
+++ b/user_scanner/gaming/osu.py
@@ -1,5 +1,4 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_osu(user):
"""
@@ -9,28 +8,7 @@ def validate_osu(user):
url = f"https://osu.ppy.sh/users/{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
- 'Accept-Encoding': "gzip, deflate, br",
- 'Accept-Language': "en-US,en;q=0.9",
- 'sec-fetch-dest': "document",
- }
-
- try:
- response = httpx.get(url, headers = headers, timeout = 5.0, follow_redirects = True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, [200, 302], follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/gaming/roblox.py b/user_scanner/gaming/roblox.py
index 8c0e190..9530d81 100644
--- a/user_scanner/gaming/roblox.py
+++ b/user_scanner/gaming/roblox.py
@@ -1,5 +1,4 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import generic_validate
def validate_roblox(user):
"""
@@ -9,17 +8,7 @@ def validate_roblox(user):
url = f"https://users.roblox.com/v1/users/search?keyword={user}&limit=10" # official api
- headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
- 'Accept-Encoding': "gzip, deflate, br",
- 'Accept-Language': "en-US,en;q=0.9",
- 'sec-fetch-dest': "document",
- }
-
- try:
- response = httpx.get(url, headers = headers, timeout = 5.5, follow_redirects = True)
- status = response.status_code
+ def process(response):
search_results = response.json() # api response
if "errors" in search_results: # this usually triggers when timeout or ratelimit
@@ -31,10 +20,7 @@ def validate_roblox(user):
return 0
return 1
- except (ConnectError, TimeoutException):
- return 2
- except Exception as e:
- return 2
+ return generic_validate(url, process, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/gaming/steam.py b/user_scanner/gaming/steam.py
index b29b0aa..36bbeb8 100644
--- a/user_scanner/gaming/steam.py
+++ b/user_scanner/gaming/steam.py
@@ -1,5 +1,4 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import generic_validate
def validate_steam(user):
"""
@@ -9,31 +8,16 @@ def validate_steam(user):
url = f"https://steamcommunity.com/id/{user}/"
- headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
- 'Accept-Encoding': "gzip, deflate, br",
- 'Accept-Language': "en-US,en;q=0.9",
- 'sec-fetch-dest': "document",
- }
-
- try:
- response = httpx.get(url, headers = headers, timeout = 5)
-
+ def process(response):
if response.status_code == 200:
-
if response.text.find("Error</title>") != -1:
return 1
else:
return 0
-
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception as e:
return 2
+ return generic_validate(url, process)
+
if __name__ == "__main__":
user = input ("Username?: ").strip()
result = validate_steam(user)
diff --git a/user_scanner/social/bluesky.py b/user_scanner/social/bluesky.py
index 6f8ddf9..8b02245 100644
--- a/user_scanner/social/bluesky.py
+++ b/user_scanner/social/bluesky.py
@@ -1,7 +1,5 @@
-import httpx
-from httpx import ConnectError, TimeoutException
import re
-import json
+from ..core.orchestrator import generic_validate
def validate_bluesky(user):
handle = user if user.endswith('.bsky.social') else f"{user}.bsky.social"
@@ -28,12 +26,9 @@ def validate_bluesky(user):
if not re.fullmatch(r"^[a-zA-Z0-9\.-]{1,64}$", user):
return 2
-
- try:
- response = httpx.get(url, headers=headers, params=params, timeout = 15.0)
- status = response.status_code
-
- if status == 200:
+
+ def process(response):
+ if response.status_code == 200:
data = response.json()
result_type = data.get('result', {}).get('$type')
@@ -41,18 +36,10 @@ def validate_bluesky(user):
return 1
elif result_type == "com.atproto.temp.checkHandleAvailability#resultUnavailable":
return 0
- else:
- return 2
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except json.JSONDecodeError:
- return 2
- except Exception:
return 2
+ return generic_validate(url, process, headers = headers, params = params, timeout = 15.0)
+
if __name__ == "__main__":
try:
import httpx
diff --git a/user_scanner/social/instagram.py b/user_scanner/social/instagram.py
index a22db85..608ff85 100644
--- a/user_scanner/social/instagram.py
+++ b/user_scanner/social/instagram.py
@@ -1,34 +1,19 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_instagram(user):
- url = f"https://www.instagram.com/api/v1/users/web_profile_info/?username={user}"
+ url = f"https://www.instagram.com/api/v1/users/web_profile_info/?username={user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
- '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.instagram.com/{user}/",
- }
+ headers = {
+ 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
+ '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.instagram.com/{user}/",
+ }
- try:
- response = httpx.get(url, headers=headers, timeout = 3.0)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, headers = headers)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/social/mastodon.py b/user_scanner/social/mastodon.py
index 2e766ad..951db95 100644
--- a/user_scanner/social/mastodon.py
+++ b/user_scanner/social/mastodon.py
@@ -1,31 +1,9 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_mastodon(user):
url = f"https://mastodon.social/@{user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
- '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",
- }
-
- try:
- response = httpx.get(url, headers=headers, timeout = 3.0, follow_redirects=True)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, follow_redirects = True)
if __name__ == "__main__":
try:
diff --git a/user_scanner/social/pinterest.py b/user_scanner/social/pinterest.py
index ba97f8e..25a2920 100644
--- a/user_scanner/social/pinterest.py
+++ b/user_scanner/social/pinterest.py
@@ -1,34 +1,18 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import generic_validate
def validate_pinterest(user):
url = f"https://www.pinterest.com/{user}/"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
- 'Accept-Encoding': "gzip",
- 'Accept-Language': "en-US,en;q=0.9",
- 'sec-fetch-dest': "document",
- }
-
- NOT_FOUND_STRING = "User not found."
-
- try:
- response = httpx.get(url, headers=headers, follow_redirects=True, timeout = 3.0)
-
+ def process(response):
if response.status_code == 200:
- if NOT_FOUND_STRING in response.text:
+ if "User not found." in response.text:
return 1
else:
return 0
else:
return 2
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return generic_validate(url, process, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/social/reddit.py b/user_scanner/social/reddit.py
index 83bb763..bc6a703 100644
--- a/user_scanner/social/reddit.py
+++ b/user_scanner/social/reddit.py
@@ -1,34 +1,18 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import generic_validate
def validate_reddit(user):
url = f"https://www.reddit.com/user/{user}/"
- headers = {
- 'User-Agent': "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
- 'Accept': "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
- 'Accept-Encoding': "gzip, deflate, br",
- 'Accept-Language': "en-US,en;q=0.9",
- 'sec-fetch-dest': "document",
- }
-
- NOT_FOUND_STRING = "Sorry, nobody on Reddit goes by that name."
-
- try:
- response = httpx.get(url, headers=headers, follow_redirects=True, timeout = 3.0)
-
+ def process(response):
if response.status_code == 200:
- if NOT_FOUND_STRING in response.text:
+ if "Sorry, nobody on Reddit goes by that name." in response.text:
return 1
else:
return 0
else:
return 2
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return generic_validate(url, process, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/social/snapchat.py b/user_scanner/social/snapchat.py
index b67a99a..3e3e137 100644
--- a/user_scanner/social/snapchat.py
+++ b/user_scanner/social/snapchat.py
@@ -1,10 +1,9 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_snapchat(user):
- url = f"https://www.snapchat.com/@{user}"
+ url = f"https://www.snapchat.com/@{user}"
- headers = {
+ headers = {
'User-Agent': "Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36",
'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",
@@ -18,23 +17,9 @@ def validate_snapchat(user):
'sec-fetch-dest': "document",
'accept-language': "en-US,en;q=0.9",
'priority': "u=0, i"
- }
+ }
- try:
- response = httpx.get(url, headers=headers, follow_redirects=True, timeout = 3.0)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ return status_validade(url, 404, 200, headers = headers, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/social/telegram.py b/user_scanner/social/telegram.py
index 05432bd..54f3fd4 100644
--- a/user_scanner/social/telegram.py
+++ b/user_scanner/social/telegram.py
@@ -1,5 +1,5 @@
-import httpx
import re
+from ..core.orchestrator import generic_validate
def validate_telegram(user: str) -> int:
"""
@@ -7,20 +7,13 @@ def validate_telegram(user: str) -> int:
Returns: 1 -> available, 0 -> taken, 2 -> error
"""
url = f"https://t.me/{user}"
- headers = {
- "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36"
- }
- try:
- r = httpx.get(url, headers=headers, follow_redirects=True, timeout=3.0)
+ def process(r):
if r.status_code == 200:
return 0 if re.search(r'<div[^>]*class="tgme_page_extra"[^>]*>', r.text) else 1
return 2
- except (httpx.ConnectError, httpx.TimeoutException):
- return 2
- except Exception:
- return 2
-
+
+ return generic_validate(url, process, follow_redirects = True)
if __name__ == "__main__":
user = input ("Username?: ").strip()
diff --git a/user_scanner/social/threads.py b/user_scanner/social/threads.py
index b52eea0..68a0fe6 100644
--- a/user_scanner/social/threads.py
+++ b/user_scanner/social/threads.py
@@ -1,34 +1,19 @@
-import httpx
-from httpx import ConnectError, TimeoutException
+from ..core.orchestrator import status_validade
def validate_instagram(user):
- url = f"https://www.threads.com/api/v1/users/web_profile_info/?username={user}"
+ url = f"https://www.threads.com/api/v1/users/web_profile_info/?username={user}"
- headers = {
- 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
- '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.instagram.com/{user}/",
- }
-
- try:
- response = httpx.get(url, headers=headers, timeout = 3.0)
- status = response.status_code
-
- if status == 200:
- return 0
- elif status == 404:
- return 1
- else:
- return 2
-
- except (ConnectError, TimeoutException):
- return 2
- except Exception:
- return 2
+ headers = {
+ 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36",
+ '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.instagram.com/{user}/",
+ }
+
+ return status_validade(url, 404, 200, headers = headers)
if __name__ == "__main__":
user = input ("Username?: ").strip()