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: implement rich dynamic progress bar for terminal scanning

Kaifd34f61b62074
diff --git a/pyproject.toml b/pyproject.toml
index a11fdfb..8cac7bf 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -16,7 +16,8 @@ dependencies = [
"httpx[http2]>=0.27,<0.29",
"socksio>=1.0,<2",
"colorama>=0.4,<1",
- "curl_cffi>=0.7,<1"
+ "curl_cffi>=0.7,<1",
+ "rich>=13.0.0"
]
requires-python = ">=3.10"
diff --git a/user_scanner/core/email_orchestrator.py b/user_scanner/core/email_orchestrator.py
index 4750eb8..ae26ad5 100644
--- a/user_scanner/core/email_orchestrator.py
+++ b/user_scanner/core/email_orchestrator.py
@@ -18,6 +18,7 @@ from user_scanner.core.helpers import (
get_global_timeout,
)
from user_scanner.core.result import Result, Status
+from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, MofNCompleteColumn
# Monkey-patch httpx clients to automatically use proxies for email scans
_original_async_client_init = httpx.AsyncClient.__init__
@@ -128,7 +129,25 @@ async def _run_batch(
if not tasks:
return []
- return list(await asyncio.gather(*tasks))
+
+ results = []
+
+ with Progress(
+ SpinnerColumn(),
+ TextColumn("[progress.description]{task.description}"),
+ BarColumn(),
+ MofNCompleteColumn(),
+ TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
+ transient=True,
+ ) as progress:
+ task_id = progress.add_task(f"[cyan]Scanning {email}...", total=len(tasks))
+
+ for coro in asyncio.as_completed(tasks):
+ result = await coro
+ results.append(result)
+ progress.advance(task_id)
+
+ return results
async def _run_email_module_batch_async(
@@ -171,20 +190,51 @@ async def _run_email_full_batch_async(email: str, configs: ScanConfig) -> List[R
all_results = []
printed_cats = set()
+ # 1. Pre-spawn all tasks for all categories (global concurrency)
+ category_tasks = []
+ total_tasks = 0
for cat_name, cat_path in categories.items():
+ display_name = cat_name.capitalize()
modules = load_modules(cat_path)
-
- if configs.show_all:
- print(f"\n{Fore.MAGENTA}== {cat_name.upper()} SITES =={Style.RESET_ALL}")
- printed_cats.add(cat_name)
-
- cat_results = await _run_batch(
- modules,
- email,
- configs,
- printed_cats=printed_cats,
- )
- all_results.extend(cat_results)
+
+ sem = asyncio.Semaphore(MAX_CONCURRENT_REQUESTS)
+ tasks = []
+ for module in modules:
+ tasks.append(
+ _async_worker(
+ module,
+ email,
+ sem,
+ configs,
+ printed_cats=printed_cats,
+ )
+ )
+ category_tasks.append((display_name, tasks))
+ total_tasks += len(tasks)
+
+ # 2. Await tasks category by category to stream grouped output
+ with Progress(
+ SpinnerColumn(),
+ TextColumn("[progress.description]{task.description}"),
+ BarColumn(),
+ MofNCompleteColumn(),
+ TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
+ transient=True,
+ ) as progress:
+ task_id = progress.add_task(f"[cyan]Scanning {email}...", total=total_tasks)
+
+ for display_name, tasks in category_tasks:
+ if not tasks:
+ continue
+
+ if configs.show_all:
+ print(f"\n{Fore.MAGENTA}== {display_name.upper()} SITES =={Style.RESET_ALL}")
+ printed_cats.add(display_name)
+
+ for coro in asyncio.as_completed(tasks):
+ result = await coro
+ all_results.append(result)
+ progress.advance(task_id)
return all_results
diff --git a/user_scanner/core/orchestrator.py b/user_scanner/core/orchestrator.py
index db61edc..381c676 100644
--- a/user_scanner/core/orchestrator.py
+++ b/user_scanner/core/orchestrator.py
@@ -20,7 +20,8 @@ from user_scanner.core.helpers import (
load_modules,
get_global_timeout,
)
-from user_scanner.core.result import Result
+from user_scanner.core.result import Result, Status
+from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, MofNCompleteColumn
MAX_CONCURRENT_REQUESTS = 60
@@ -88,18 +89,30 @@ async def _run_batch(
)
results = []
- for coro in asyncio.as_completed(tasks):
- result = await coro
-
- actual_cat = result.category or "Unknown"
- # Handle specific logic where skipping needs to happen early
- if not configs.show_all and result.is_found():
- 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)
-
- result.show(configs)
- results.append(result)
+
+ with Progress(
+ SpinnerColumn(),
+ TextColumn("[progress.description]{task.description}"),
+ BarColumn(),
+ MofNCompleteColumn(),
+ TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
+ transient=True,
+ ) as progress:
+ task_id = progress.add_task(f"[cyan]Scanning {username}...", total=len(tasks))
+
+ for coro in asyncio.as_completed(tasks):
+ result = await coro
+
+ actual_cat = result.category or "Unknown"
+ # Handle specific logic where skipping needs to happen early
+ if not configs.show_all and result.is_found():
+ 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)
+
+ result.show(configs)
+ results.append(result)
+ progress.advance(task_id)
return results
@@ -140,6 +153,7 @@ async def _run_user_full_async(username: str, configs: ScanConfig) -> List[Resul
# 1. Pre-spawn all tasks for all categories (global concurrency)
category_tasks = []
+ total_tasks = 0
for cat_name, cat_path in categories:
display_name = cat_name.capitalize()
modules = load_modules(cat_path)
@@ -151,26 +165,39 @@ async def _run_user_full_async(username: str, configs: ScanConfig) -> List[Resul
)
)
category_tasks.append((display_name, tasks))
+ total_tasks += len(tasks)
# 2. Await tasks category by category to stream grouped output
- for display_name, tasks in category_tasks:
- if not tasks:
- continue
-
- if configs.show_all:
- print(f"\n{Fore.MAGENTA}== {display_name.upper()} SITES =={Style.RESET_ALL}")
- printed_cats.add(display_name)
-
- for coro in asyncio.as_completed(tasks):
- result = await coro
-
- if not configs.show_all and result.is_found():
- if display_name not in printed_cats:
- print(f"\n{Fore.MAGENTA}== {display_name.upper()} SITES =={Style.RESET_ALL}")
- printed_cats.add(display_name)
-
- result.show(configs)
- all_results.append(result)
+ with Progress(
+ SpinnerColumn(),
+ TextColumn("[progress.description]{task.description}"),
+ BarColumn(),
+ MofNCompleteColumn(),
+ TextColumn("[progress.percentage]{task.percentage:>3.0f}%"),
+ transient=True,
+ ) as progress:
+ task_id = progress.add_task(f"[cyan]Scanning {username}...", total=total_tasks)
+
+ for display_name, tasks in category_tasks:
+ if not tasks:
+ continue
+
+ if configs.show_all:
+ print(f"\n{Fore.MAGENTA}== {display_name.upper()} SITES =={Style.RESET_ALL}")
+ printed_cats.add(display_name)
+
+ for coro in asyncio.as_completed(tasks):
+ result = await coro
+
+ if not configs.show_all and result.is_found():
+ display_name = result.category or "Unknown"
+ if display_name not in printed_cats:
+ print(f"\n{Fore.MAGENTA}== {display_name.upper()} SITES =={Style.RESET_ALL}")
+ printed_cats.add(display_name)
+
+ result.show(configs)
+ all_results.append(result)
+ progress.advance(task_id)
return all_results