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.

feat: Skip loud modules

Vamato9787ee104dae
diff --git a/tests/test_result.py b/tests/test_result.py
index 23c684f..26f9e34 100644
--- a/tests/test_result.py
+++ b/tests/test_result.py
@@ -70,7 +70,7 @@ def test_from_number():
assert Result.from_number(0) == Status.TAKEN
assert Result.from_number(1) == Status.AVAILABLE
assert Result.from_number(2) == Status.ERROR
- for i in [-2, -1, 3, 4, 5, 6, 7, 8, 9, 10]:
+ for i in [-2, -1, 4, 5, 6, 7, 8, 9, 10]:
assert Result.from_number(i) == Status.ERROR
@@ -136,7 +136,7 @@ def test_console_output_and_show_url():
out_visible = res.get_console_output(
ScanConfig(
- show_url=True,
+ verbose=True,
)
)
assert "[https://mysite.com/u]" in out_visible
diff --git a/user_scanner/__main__.py b/user_scanner/__main__.py
index 1ece16d..2f321d1 100644
--- a/user_scanner/__main__.py
+++ b/user_scanner/__main__.py
@@ -19,6 +19,7 @@ from user_scanner.core.helpers import (
generate_permutations,
get_proxy_count,
get_site_name,
+ is_loud,
load_categories,
load_modules,
set_proxy_manager,
@@ -28,6 +29,7 @@ from user_scanner.core.orchestrator import (
run_user_full,
run_user_module,
)
+from user_scanner.core.result import Status
from user_scanner.core.version import load_local_version
from user_scanner.utils.update import update_self
from user_scanner.utils.updater_logic import check_for_updates
@@ -147,22 +149,17 @@ def main():
print(f"user-scanner current version -> {G}{version}{X}")
sys.exit(0)
- if args.list_user:
- categories = load_categories()
+ if args.list_user or args.list_email:
+ categories = load_categories(is_email=args.list_email)
for cat_name, cat_path in categories.items():
modules = load_modules(cat_path)
print(Fore.MAGENTA + f"\n== {cat_name.upper()} SITES =={Style.RESET_ALL}")
for module in modules:
- print(f" - {get_site_name(module)}")
- return
-
- if args.list_email:
- categories = load_categories(is_email=True)
- for cat_name, cat_path in categories.items():
- modules = load_modules(cat_path)
- print(Fore.MAGENTA + f"\n== {cat_name.upper()} SITES =={Style.RESET_ALL}")
- for module in modules:
- print(f" - {get_site_name(module)}")
+ name = get_site_name(module)
+ loud = (
+ f" {R}(loud){X}" if is_loud(name, is_email=args.list_email) else ""
+ )
+ print(f" - {name}{loud}")
return
if not (args.username or args.email or args.username_file or args.email_file):
@@ -292,9 +289,9 @@ def main():
results = []
config = ScanConfig(
- show_url=args.verbose,
- only_found=args.only_found,
allow_loud=args.allow_loud,
+ only_found=args.only_found,
+ verbose=args.verbose,
)
for i, target in enumerate(targets):
@@ -379,15 +376,16 @@ def main():
f.write(content)
print(G + f"\n[+] Results saved to {args.output}" + Style.RESET_ALL)
+
total_found = len([r for r in results if r.is_found()])
+ total_skipped = len([r for r in results if r == Status.SKIPPED])
- if args.only_found:
- if total_found == 0:
- print(f"\n{R}[✘] No results found for the given target(s).{X}")
- else:
- print(f"\n{G}[βœ”] Total hits found:{X} {total_found}")
+ if args.only_found and total_found == 0:
+ print(f"\n{R}[✘] No results found for the given target(s).{X}")
else:
- print(f"\n{C}[i] Scan complete. Total hits:{X} {total_found}")
+ print(f"\n{C}[i] Scan complete.\n Total hits:{X} {total_found}")
+ if total_skipped > 0:
+ print(f" {C}Skipped:{X} {total_skipped}")
if __name__ == "__main__":
diff --git a/user_scanner/core/email_orchestrator.py b/user_scanner/core/email_orchestrator.py
index 838296c..1dd4acc 100644
--- a/user_scanner/core/email_orchestrator.py
+++ b/user_scanner/core/email_orchestrator.py
@@ -8,6 +8,9 @@ from colorama import Fore, Style
from user_scanner.core.helpers import (
ScanConfig,
find_category,
+ get_scan_func,
+ get_site_name,
+ is_loud,
load_categories,
load_modules,
)
@@ -25,25 +28,24 @@ async def _async_worker(
printed_cats: Optional[Set] = None,
) -> Result:
async with sem:
- module_name = module.__name__.split(".")[-1]
- func_name = f"validate_{module_name}"
+ site_name = get_site_name(module)
+ func = get_scan_func(module)
actual_cat = find_category(module) or "Email"
params = {
- "site_name": module_name.capitalize(),
+ "site_name": site_name.capitalize(),
"username": email,
"category": actual_cat,
"is_email": True,
}
- if not hasattr(module, func_name):
- return (
- Result.error(f"Function {func_name} not found")
- .update(**params)
- .show(configs)
- )
+ if not func:
+ return Result.error(
+ f"{site_name} has no validate_ function", **params
+ ).show(configs)
- func = getattr(module, func_name)
+ if not configs.allow_loud and is_loud(site_name, is_email=True):
+ return Result.skipped().update(**params).show(configs)
try:
res = func(email)
diff --git a/user_scanner/core/helpers.py b/user_scanner/core/helpers.py
index 1cdc374..d715b98 100644
--- a/user_scanner/core/helpers.py
+++ b/user_scanner/core/helpers.py
@@ -1,5 +1,6 @@
import importlib
import importlib.util
+import inspect
import random
import threading
from concurrent.futures import ThreadPoolExecutor, as_completed
@@ -7,16 +8,18 @@ from dataclasses import dataclass
from itertools import permutations
from pathlib import Path
from types import ModuleType
-from typing import Dict, List, Optional
+from typing import Any, Callable, Dict, List, Optional
import httpx
+LOUD_JSON: Dict[str, List[str]] = {"user": [], "email": ["leetcode"]}
+
@dataclass(frozen=True)
class ScanConfig:
allow_loud: bool = False
only_found: bool = False
- show_url: bool = False
+ verbose: bool = False
def get_site_name(module) -> str:
@@ -57,6 +60,22 @@ def load_categories(is_email: bool = False) -> Dict[str, Path]:
return categories
+def is_loud(name: str, is_email: bool = False) -> bool:
+ key = "email" if is_email else "user"
+ return name.lower() in LOUD_JSON[key]
+
+
+def get_scan_func(module) -> Optional[Callable[[str], Any]]:
+ for attr_name in dir(module):
+ if not attr_name.startswith("validate_"):
+ continue
+
+ f = getattr(module, attr_name)
+ if inspect.isfunction(f) or inspect.iscoroutinefunction(f):
+ return f
+ return None
+
+
def find_module(name: str, is_email: bool = False) -> List[ModuleType]:
name = name.lower()
diff --git a/user_scanner/core/orchestrator.py b/user_scanner/core/orchestrator.py
index ad6c31c..4b70541 100644
--- a/user_scanner/core/orchestrator.py
+++ b/user_scanner/core/orchestrator.py
@@ -10,44 +10,42 @@ from user_scanner.core.helpers import (
ScanConfig,
find_category,
get_proxy,
+ get_scan_func,
get_site_name,
+ is_loud,
load_categories,
load_modules,
)
from user_scanner.core.result import Result
-def _worker_single(module: ModuleType, username: str) -> Result:
- func = next(
- (
- getattr(module, f)
- for f in dir(module)
- if f.startswith("validate_") and callable(getattr(module, f))
- ),
- None,
- )
-
+def _worker_single(module: ModuleType, username: str, configs: ScanConfig) -> Result:
site_name = get_site_name(module)
+ func = get_scan_func(module)
+
+ params = {
+ "site_name": site_name.capitalize(),
+ "username": username,
+ }
if not func:
- return Result.error(
- f"{site_name} has no validate_ function",
- site_name=site_name,
- username=username,
- )
+ return Result.error(f"{site_name} has no validate_ function", **params)
+
+ if not configs.allow_loud and is_loud(site_name):
+ return Result.skipped().update(**params)
try:
result: Result = func(username)
- result.update(site_name=site_name, username=username)
+ result.update(**params)
return result
except Exception as e:
- return Result.error(e, site_name=site_name, username=username)
+ return Result.error(e, **params)
def run_user_module(
module: ModuleType, username: str, configs: ScanConfig
) -> List[Result]:
- result = _worker_single(module, username)
+ result = _worker_single(module, username, configs)
category = find_category(module)
if category:
@@ -69,7 +67,7 @@ def run_user_category(
with ThreadPoolExecutor(max_workers=20) as executor:
# map returns results as they are finished, allowing for "streaming" output
- exec_map = executor.map(lambda m: _worker_single(m, username), modules)
+ exec_map = executor.map(lambda m: _worker_single(m, username, configs), modules)
for result in exec_map:
result.update(category=category_name)
results.append(result)
@@ -108,7 +106,9 @@ def run_user_full(username: str, configs: ScanConfig) -> List[Result]:
module_to_cat[get_site_name(m)] = display_name
with ThreadPoolExecutor(max_workers=60) as executor:
- exec_map = executor.map(lambda m: _worker_single(m, username), all_modules)
+ exec_map = executor.map(
+ lambda m: _worker_single(m, username, configs), all_modules
+ )
for result in exec_map:
site_name = result.site_name
cat_name = (
diff --git a/user_scanner/core/result.py b/user_scanner/core/result.py
index 34ac87f..66b083c 100644
--- a/user_scanner/core/result.py
+++ b/user_scanner/core/result.py
@@ -42,10 +42,13 @@ class Status(Enum):
TAKEN = 0
AVAILABLE = 1
ERROR = 2
+ SKIPPED = 3
def to_label(self, is_email=False):
if self == Status.ERROR:
return "Error"
+ elif self == Status.SKIPPED:
+ return "Skipped"
if is_email:
return "Registered" if self == Status.TAKEN else "Not Registered"
return "Found" if self == Status.TAKEN else "Not Found"
@@ -84,6 +87,10 @@ class Result:
def error(cls, reason: str | Exception | None = None, **kwargs):
return cls(Status.ERROR, reason, **kwargs)
+ @classmethod
+ def skipped(cls, reason: str | Exception | None = None, **kwargs):
+ return cls(Status.SKIPPED, reason, **kwargs)
+
@classmethod
def from_number(cls, i: int, reason: str | Exception | None = None):
try:
@@ -144,12 +151,16 @@ class Result:
def get_output_color(self) -> str:
if self == Status.ERROR:
return Fore.YELLOW
+ elif self == Status.SKIPPED:
+ return Fore.WHITE
else:
return Fore.GREEN if self == Status.TAKEN else Fore.RED
def get_output_icon(self) -> str:
if self == Status.ERROR:
return "[!]"
+ elif self == Status.SKIPPED:
+ return "[~]"
else:
return "[βœ”]" if self == Status.TAKEN else "[✘]"
@@ -166,7 +177,7 @@ class Result:
## Color the URL in white for better visibility
url_display = (
f" {Fore.WHITE}[{self.url}]{color}"
- if (configs and configs.show_url) and self.url
+ if (configs and configs.verbose) and self.url
else ""
)