π΅οΈββοΈ (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
refactor: add found counter, set only_found to False for single module checks
kaifcodec10d1ea0c054c
diff --git a/user_scanner/__main__.py b/user_scanner/__main__.pyindex 9c8f907..68211a8 100644--- a/user_scanner/__main__.py+++ b/user_scanner/__main__.py@@ -271,7 +271,7 @@ def main():fn = run_email_module_batch if is_email else run_user_moduleif modules:for module in modules:- results.extend(fn(module, target, show_url=args.verbose, only_found=args.only_found))+ results.extend(fn(module, target, show_url=args.verbose))else:print(R +@@ -328,7 +328,15 @@ 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()])+ 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}")+ else:+ print(f"\n{C}[i] Scan complete. Total hits:{X} {total_found}")if __name__ == "__main__":main()diff --git a/user_scanner/core/email_orchestrator.py b/user_scanner/core/email_orchestrator.pyindex b4f43e9..b1211cd 100644--- a/user_scanner/core/email_orchestrator.py+++ b/user_scanner/core/email_orchestrator.py@@ -6,13 +6,15 @@ from typing import Listfrom colorama import Fore, Stylefrom user_scanner.core.helpers import find_category, load_categories, load_modules-from user_scanner.core.result import Result+from user_scanner.core.result import Result, Status# Concurrency control-MAX_CONCURRENT_REQUESTS = 15+MAX_CONCURRENT_REQUESTS = 25-async def _async_worker(module: ModuleType, email: str, sem: asyncio.Semaphore, show_url: bool = False, only_found: bool = False) -> Result:+async def _async_worker(module: ModuleType, email: str, sem: asyncio.Semaphore,+ show_url: bool = False, only_found: bool = False,+ printed_cats: set = None) -> Result:async with sem:module_name = module.__name__.split(".")[-1]func_name = f"validate_{module_name}"@@ -27,7 +29,9 @@ async def _async_worker(module: ModuleType, email: str, sem: asyncio.Semaphore,if not hasattr(module, func_name):return (- Result.error(f"Function {func_name} not found").update(**params).show(show_url=show_url, only_found=only_found)+ Result.error(f"Function {func_name} not found")+ .update(**params)+ .show(show_url=show_url, only_found=only_found))func = getattr(module, func_name)@@ -38,14 +42,25 @@ async def _async_worker(module: ModuleType, email: str, sem: asyncio.Semaphore,except Exception as e:result = Result.error(e)- return result.update(**params).show(show_url=show_url, only_found=only_found)+ result.update(**params)+ # Logic to print header dynamically for --only-found streaming+ if only_found and result.status == Status.TAKEN:+ if printed_cats is not None and actual_cat not in printed_cats:+ print(+ f"\n{Fore.MAGENTA}== {actual_cat.upper()} SITES =={Style.RESET_ALL}")+ printed_cats.add(actual_cat)-async def _run_batch(modules: List[ModuleType], email: str, show_url: bool = False, only_found: bool = False) -> List[Result]:+ return result.show(show_url=show_url, only_found=only_found)+++async def _run_batch(modules: List[ModuleType], email: str, show_url: bool = False,+ only_found: bool = False, printed_cats: set = None) -> List[Result]:sem = asyncio.Semaphore(MAX_CONCURRENT_REQUESTS)tasks = []for module in modules:- tasks.append(_async_worker(module, email, sem, show_url=show_url, only_found=only_found))+ tasks.append(_async_worker(module, email, sem, show_url=show_url,+ only_found=only_found, printed_cats=printed_cats))if not tasks:return []@@ -58,21 +73,32 @@ def run_email_module_batch(module: ModuleType, email: str, show_url: bool = Falsdef run_email_category_batch(category_path: Path, email: str, show_url: bool = False, only_found: bool = False) -> List[Result]:cat_name = category_path.stem.capitalize()- print(f"\n{Fore.MAGENTA}== {cat_name} SITES =={Style.RESET_ALL}")-modules = load_modules(category_path)- return asyncio.run(_run_batch(modules, email, show_url=show_url, only_found=only_found))+ printed_cats = set()++ if not only_found:+ print(f"\n{Fore.MAGENTA}== {cat_name.upper()} SITES =={Style.RESET_ALL}")+ printed_cats.add(cat_name)++ return asyncio.run(_run_batch(modules, email, show_url=show_url,+ only_found=only_found, printed_cats=printed_cats))def run_email_full_batch(email: str, show_url: bool = False, only_found: bool = False) -> List[Result]:categories = load_categories(is_email=True)all_results = []+ printed_cats = set()for cat_name, cat_path in categories.items():- print(f"\n{Fore.MAGENTA}== {cat_name.upper()} SITES =={Style.RESET_ALL}")-modules = load_modules(cat_path)- cat_results = asyncio.run(_run_batch(modules, email, show_url=show_url, only_found=only_found))++ if not only_found:+ print(+ f"\n{Fore.MAGENTA}== {cat_name.upper()} SITES =={Style.RESET_ALL}")+ printed_cats.add(cat_name)++ cat_results = asyncio.run(_run_batch(modules, email, show_url=show_url,+ only_found=only_found, printed_cats=printed_cats))all_results.extend(cat_results)return all_resultsdiff --git a/user_scanner/core/orchestrator.py b/user_scanner/core/orchestrator.pyindex cfc1f53..59399d5 100644--- a/user_scanner/core/orchestrator.py+++ b/user_scanner/core/orchestrator.py@@ -36,6 +36,7 @@ def run_user_module(module: ModuleType, username: str, show_url: bool = False, oif category:result.update(category=category)+ # Use the result.show logic which handles the only_found filteringresult.show(show_url=show_url, only_found=only_found)return [result]@@ -43,17 +44,28 @@ def run_user_module(module: ModuleType, username: str, show_url: bool = False, odef run_user_category(category_path: Path, username: str, show_url: bool = False, only_found: bool = False) -> List[Result]:category_name = category_path.stem.capitalize()- print(f"\n{Fore.MAGENTA}== {category_name} SITES =={Style.RESET_ALL}")-results = []modules = load_modules(category_path)+ header_printed = Falsewith ThreadPoolExecutor(max_workers=20) as executor:+ # map returns results as they are finished, allowing for "streaming" outputexec_map = executor.map(lambda m: _worker_single(m, username), modules)for result in exec_map:result.update(category=category_name)results.append(result)- result.show(show_url=show_url, only_found=only_found)++ if only_found:+ if result.is_found():+ if not header_printed:+ print(f"\n{Fore.MAGENTA}== {category_name.upper()} SITES =={Style.RESET_ALL}")+ header_printed = True+ result.show(show_url=show_url, only_found=only_found)+ else:+ if not header_printed:+ print(f"\n{Fore.MAGENTA}== {category_name.upper()} SITES =={Style.RESET_ALL}")+ header_printed = True+ result.show(show_url=show_url, only_found=only_found)return results@@ -73,23 +85,31 @@ def run_user_full(username: str, show_url: bool = False, only_found: bool = Falsmodule_to_cat[get_site_name(m)] = display_namewith 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), all_modules)for result in exec_map:site_name = result.site_namecat_name = module_to_cat.get(site_name, "Unknown") if site_name else "Unknown"- if cat_name not in printed_categories:- print(f"\n{Fore.MAGENTA}== {cat_name} SITES =={Style.RESET_ALL}")- printed_categories.add(cat_name)-result.update(category=cat_name)results.append(result)- result.show(show_url=show_url, only_found=only_found)++ if only_found:+ if result.is_found():+ if cat_name not in printed_categories:+ print(f"\n{Fore.MAGENTA}== {cat_name.upper()} SITES =={Style.RESET_ALL}")+ printed_categories.add(cat_name)+ result.show(show_url=show_url, only_found=only_found)+ else:+ if cat_name not in printed_categories:+ print(f"\n{Fore.MAGENTA}== {cat_name.upper()} SITES =={Style.RESET_ALL}")+ printed_categories.add(cat_name)+ result.show(show_url=show_url, only_found=only_found)return results++def make_request(url: str, **kwargs) -> httpx.Response:"""Simple wrapper to **httpx.get** that predefines headers and timeout"""if "headers" not in kwargs:diff --git a/user_scanner/core/result.py b/user_scanner/core/result.pyindex ad5ed63..f8d775b 100644--- a/user_scanner/core/result.py+++ b/user_scanner/core/result.py@@ -166,6 +166,11 @@ class Result:reason = f" ({self.get_reason()})" if self.has_reason() else ""return f" {color}{icon} {site_name}{url_display} {username}: {status_text}{reason}{Style.RESET_ALL}"+ def is_found(self) -> bool:+ """Returns True if the target was found or registered (Status.TAKEN)"""+ return self.status == Status.TAKEN++def show(self, show_url=False, only_found=False):"""Prints the console output and returns itself for chaining.If only_found is True, only results with Status.TAKEN are printed."""