🕵️♂️ (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
Optimize architecture: HTTP connection pooling and LRU caching
shredzwho9a07c51d7226
diff --git a/user_scanner/core/helpers.py b/user_scanner/core/helpers.pyindex 2bc1476..2554eae 100644--- a/user_scanner/core/helpers.py+++ b/user_scanner/core/helpers.py@@ -9,6 +9,7 @@ from itertools import permutationsfrom pathlib import Pathfrom types import ModuleTypefrom typing import Any, Callable, Dict, List, Optional+import functoolsimport httpx@@ -39,6 +40,7 @@ def get_site_name(module) -> str:return name[email protected]_cache(maxsize=None)def load_modules(category_path: Path) -> List[ModuleType]:modules = []for file in category_path.glob("*.py"):@@ -54,6 +56,7 @@ def load_modules(category_path: Path) -> List[ModuleType]:return modules[email protected]_cache(maxsize=None)def load_categories(is_email: bool = False) -> Dict[str, Path]:folder_name = "email_scan" if is_email else "user_scan"root = Path(__file__).resolve().parent.parent / folder_namediff --git a/user_scanner/core/orchestrator.py b/user_scanner/core/orchestrator.pyindex fb4d21b..311f49c 100644--- a/user_scanner/core/orchestrator.py+++ b/user_scanner/core/orchestrator.py@@ -1,7 +1,8 @@from concurrent.futures import ThreadPoolExecutorfrom pathlib import Pathfrom types import ModuleType-from typing import Callable, List+from typing import Callable, List, Dict, Optional+import threadingimport httpxfrom colorama import Fore, Style@@ -133,6 +134,18 @@ def run_user_full(username: str, configs: ScanConfig) -> List[Result]:+_clients: Dict[tuple, httpx.Client] = {}+_clients_lock = threading.Lock()++def get_client(use_http2: bool, proxy_val: Optional[str]) -> httpx.Client:+ key = (use_http2, proxy_val)+ if key not in _clients:+ with _clients_lock:+ if key not in _clients:+ _clients[key] = httpx.Client(http2=use_http2, proxy=proxy_val, verify=False)+ return _clients[key]++def make_request(url: str, **kwargs) -> httpx.Response:"""Simple wrapper to **httpx.get** that predefines headers and timeout"""if "headers" not in kwargs:@@ -157,8 +170,15 @@ def make_request(url: str, **kwargs) -> httpx.Response:method = kwargs.pop("method", "GET")use_http2 = kwargs.pop("http2", False)- with httpx.Client(http2=use_http2, proxy=proxy_val) as client:- return client.request(method.upper(), url, **kwargs)+ client = get_client(use_http2, proxy_val)++ max_retries = 2+ for attempt in range(max_retries + 1):+ try:+ return client.request(method.upper(), url, **kwargs)+ except (httpx.ConnectTimeout, httpx.ReadTimeout) as e:+ if attempt == max_retries:+ raise edef generic_validate(