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: initial commit for the show_url feature, both console and format outputs using `-v` flag

kaifcodeccf25a86b5a2c
diff --git a/user_scanner/__main__.py b/user_scanner/__main__.py
index 6b346db..d9073d1 100644
--- a/user_scanner/__main__.py
+++ b/user_scanner/__main__.py
@@ -267,7 +267,7 @@ def main():
fn = run_email_module_batch if is_email else run_user_module
if modules:
for module in modules:
- results.extend(fn(module, target))
+ results.extend(fn(module, target, show_url=args.verbose))
else:
print(
R +
@@ -279,7 +279,7 @@ def main():
cat_path = load_categories(is_email).get(args.category)
fn = run_email_category_batch if is_email else run_user_category
if cat_path:
- results.extend(fn(cat_path, target))
+ results.extend(fn(cat_path, target, show_url=args.verbose))
else:
print(
R +
@@ -288,7 +288,7 @@ def main():
)
else:
fn = run_email_full_batch if is_email else run_user_full
- results.extend(fn(target))
+ results.extend(fn(target, show_url=args.verbose))
if args.output:
content = formatter.into_csv(
diff --git a/user_scanner/core/email_orchestrator.py b/user_scanner/core/email_orchestrator.py
index 4728f37..a7c1010 100644
--- a/user_scanner/core/email_orchestrator.py
+++ b/user_scanner/core/email_orchestrator.py
@@ -12,7 +12,7 @@ from user_scanner.core.result import Result
MAX_CONCURRENT_REQUESTS = 15
-async def _async_worker(module: ModuleType, email: str, sem: asyncio.Semaphore) -> Result:
+async def _async_worker(module: ModuleType, email: str, sem: asyncio.Semaphore, show_url: bool = False) -> Result:
async with sem:
module_name = module.__name__.split(".")[-1]
func_name = f"validate_{module_name}"
@@ -27,7 +27,7 @@ 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()
+ Result.error(f"Function {func_name} not found").update(**params).show(show_url=show_url)
)
func = getattr(module, func_name)
@@ -38,33 +38,33 @@ async def _async_worker(module: ModuleType, email: str, sem: asyncio.Semaphore)
except Exception as e:
result = Result.error(e)
- return result.update(**params).show()
+ return result.update(**params).show(show_url=show_url)
-async def _run_batch(modules: List[ModuleType], email: str) -> List[Result]:
+async def _run_batch(modules: List[ModuleType], email: str, show_url: bool = False) -> List[Result]:
sem = asyncio.Semaphore(MAX_CONCURRENT_REQUESTS)
tasks = []
for module in modules:
- tasks.append(_async_worker(module, email, sem))
+ tasks.append(_async_worker(module, email, sem, show_url=show_url))
if not tasks:
return []
return list(await asyncio.gather(*tasks))
-def run_email_module_batch(module: ModuleType, email: str) -> List[Result]:
- return asyncio.run(_run_batch([module], email))
+def run_email_module_batch(module: ModuleType, email: str, show_url: bool = False) -> List[Result]:
+ return asyncio.run(_run_batch([module], email, show_url=show_url))
-def run_email_category_batch(category_path: Path, email: str) -> List[Result]:
+def run_email_category_batch(category_path: Path, email: str, show_url: 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))
+ return asyncio.run(_run_batch(modules, email, show_url=show_url))
-def run_email_full_batch(email: str) -> List[Result]:
+def run_email_full_batch(email: str, show_url: bool = False) -> List[Result]:
categories = load_categories(is_email=True)
all_results = []
@@ -72,7 +72,7 @@ def run_email_full_batch(email: str) -> List[Result]:
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))
+ cat_results = asyncio.run(_run_batch(modules, email, show_url=show_url))
all_results.extend(cat_results)
return all_results
diff --git a/user_scanner/core/formatter.py b/user_scanner/core/formatter.py
index 1018861..3c52f56 100644
--- a/user_scanner/core/formatter.py
+++ b/user_scanner/core/formatter.py
@@ -2,7 +2,8 @@ from user_scanner.core.result import Result
from typing import List
INDENT = " "
-CSV_HEADER = "username,category,site_name,status,reason"
+CSV_HEADER = "username,category,site_name,status,url,reason"
+
def indentate(msg: str, indent: int):
diff --git a/user_scanner/core/orchestrator.py b/user_scanner/core/orchestrator.py
index 1711713..2ffd2b9 100644
--- a/user_scanner/core/orchestrator.py
+++ b/user_scanner/core/orchestrator.py
@@ -29,19 +29,19 @@ def _worker_single(module: ModuleType, username: str) -> Result:
return Result.error(e, site_name=site_name, username=username)
-def run_user_module(module: ModuleType, username: str) -> List[Result]:
+def run_user_module(module: ModuleType, username: str, show_url: bool = False) -> List[Result]:
result = _worker_single(module, username)
category = find_category(module)
if category:
result.update(category=category)
- print(result.get_console_output())
+ print(result.get_console_output(show_url=show_url))
return [result]
-def run_user_category(category_path: Path, username: str) -> List[Result]:
+def run_user_category(category_path: Path, username: str, show_url: bool = False) -> List[Result]:
category_name = category_path.stem.capitalize()
print(f"\n{Fore.MAGENTA}== {category_name} SITES =={Style.RESET_ALL}")
@@ -53,17 +53,17 @@ def run_user_category(category_path: Path, username: str) -> List[Result]:
for result in exec_map:
result.update(category=category_name)
results.append(result)
- result.show()
+ result.show(show_url=show_url)
return results
-def run_user_full(username: str) -> List[Result]:
+def run_user_full(username: str, show_url: bool = False) -> List[Result]:
results = []
categories = list(load_categories().values())
for category_path in categories:
- temp = run_user_category(category_path, username)
+ temp = run_user_category(category_path, username, show_url=show_url)
results.extend(temp)
return results
@@ -79,6 +79,8 @@ def make_request(url: str, **kwargs) -> httpx.Response:
'Accept-Language': "en-US,en;q=0.9",
'sec-fetch-dest': "document",
}
+ if kwargs["show_url"]:
+ kwargs.pop("show_url", None)
if "timeout" not in kwargs:
kwargs["timeout"] = 5.0
@@ -99,12 +101,16 @@ def generic_validate(url: str, func: Callable[[httpx.Response], Result], **kwarg
"""
A generic validate function that makes a request and executes the provided function on the response.
"""
+ # Look for 'show_url' in kwargs, if not found, use the request 'url'
+ display_url = kwargs.get("show_url", None)
+
try:
response = make_request(url, **kwargs)
result = func(response)
- return result
+ # Update the result with the chosen display url
+ return result.update(url=display_url)
except Exception as e:
- return Result.error(e, url=url)
+ return Result.error(e, url=display_url)
def status_validate(url: str, available: int | List[int], taken: int | List[int], **kwargs) -> Result:
@@ -129,4 +135,5 @@ def status_validate(url: str, available: int | List[int], taken: int | List[int]
return Result.taken()
return Result.error(f"[{status}] Status didn't match. Report this on Github.")
+ # We pass all kwargs (including show_url if it exists) to generic_validate
return generic_validate(url, inner, **kwargs)
diff --git a/user_scanner/core/result.py b/user_scanner/core/result.py
index 14bcb42..952f4bb 100644
--- a/user_scanner/core/result.py
+++ b/user_scanner/core/result.py
@@ -1,25 +1,29 @@
from enum import Enum
-
from colorama import Fore, Style
+# Added {url} to the debug message
DEBUG_MSG = """Result {{
status: {status},
reason: "{reason}",
username: "{username}",
site_name: "{site_name}",
category: "{category}",
+ url: "{url}",
is_email: "{is_email}"
}}"""
+# Added "url": "{url}" to the JSON template
JSON_TEMPLATE = """{{
\t"username": "{username}",
\t"category": "{category}",
\t"site_name": "{site_name}",
\t"status": "{status}",
+\t"url": "{url}",
\t"reason": "{reason}"
}}"""
-CSV_TEMPLATE = "{username},{category},{site_name},{status},{reason}"
+# Added {url} to the CSV template
+CSV_TEMPLATE = "{username},{category},{site_name},{status},{url},{reason}"
def humanize_exception(e: Exception) -> str:
@@ -54,11 +58,13 @@ class Result:
self.username = None
self.site_name = None
self.category = None
+ self.url = "" # Initialized url field
self.is_email = False
self.update(**kwargs)
def update(self, **kwargs):
- for field in ("username", "site_name", "category", "is_email"):
+ # Added "url" to the list of fields allowed for dynamic updates
+ for field in ("username", "site_name", "category", "is_email", "url"):
if field in kwargs and kwargs[field] is not None:
setattr(self, field, kwargs[field])
return self
@@ -104,6 +110,7 @@ class Result:
"username": self.username,
"site_name": self.site_name,
"category": self.category,
+ "url": self.url, # Added url to dictionary output
"is_email": self.is_email,
}
@@ -147,20 +154,24 @@ class Result:
else:
return "[βœ”]" if self == Status.AVAILABLE else "[✘]"
- def get_console_output(self) -> str:
+ def get_console_output(self, show_url=False) -> str:
site_name = self.site_name
status_text = self.status.to_label(self.is_email)
username = ""
if self.username:
username = f"({self.username})"
+
+ # Added logic to include URL in console output if show_url is True
+ url_display = f" [{self.url}]" if show_url and self.url else ""
color = self.get_output_color()
icon = self.get_output_icon()
reason = f" ({self.get_reason()})" if self.has_reason() else ""
- return f" {color}{icon} {site_name} {username}: {status_text}{reason}{Style.RESET_ALL}"
+ return f" {color}{icon} {site_name}{url_display} {username}: {status_text}{reason}{Style.RESET_ALL}"
- def show(self):
+ def show(self, show_url=False):
"""Prints the console output and returns itself for chaining"""
- print(self.get_console_output())
+ # Updated show() to accept and pass the show_url flag
+ print(self.get_console_output(show_url=show_url))
return self