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.

Merge branch 'main' into test/pattern-improvements

Kaiff73069c5519b
diff --cc tests/test_helpers.py
index a974969,d034b8a..623abb3
--- a/tests/test_helpers.py
+++ b/tests/test_helpers.py
@@@ -1,16 -1,47 +1,19 @@@
import sys
+ import threading
+ from types import SimpleNamespace
+ from unittest.mock import MagicMock, patch
+
import pytest
- from user_scanner.core import helpers
+
from user_scanner.__main__ import main
+ from user_scanner.core import helpers
from user_scanner.core.result import Result
- from types import SimpleNamespace
- from unittest.mock import MagicMock, patch
- import threading
-def test_generate_permutations():
- perms = helpers.generate_permutations("user", "ab", limit=None)
- assert "user" in perms
- # All permutations must be valid
- assert all(
- p == "user" or (p.startswith("user") and len(p) > len("user")) for p in perms
- )
-
- assert len(perms) > 1
-
-
-def test_generate_permutations_email():
- perms = helpers.generate_permutations(
- "[email protected]", "abc", limit=None, is_email=True
- )
- assert "[email protected]" in perms
- assert all(
- or (
- p.startswith("john")
- and len(p) > len("[email protected]")
- and p.endswith("@email.com")
- )
- for p in perms
- )
- assert len(perms) > 1
-
-
def test_get_site_name():
- def module(name:str) -> SimpleNamespace:
- return SimpleNamespace(**{"__name__":name})
+ def module(name: str) -> SimpleNamespace:
+ return SimpleNamespace(**{"__name__": name})
+
assert helpers.get_site_name(module("X")) == "X (Twitter)"
assert helpers.get_site_name(module("x")) == "X (Twitter)"
assert helpers.get_site_name(module("user_scanner.github")) == "Github"
diff --cc user_scanner/__main__.py
index 5c315a6,59c5294..35e2b75
--- a/user_scanner/__main__.py
+++ b/user_scanner/__main__.py
@@@ -3,38 -3,38 +3,41 @@@ import jso
import re
import sys
import time
+
from colorama import Fore, Style
+from itertools import islice
+ from dataclasses import replace
from user_scanner.cli.banner import print_banner
- from user_scanner.core.version import load_local_version
from user_scanner.core import formatter
- from user_scanner.utils.updater_logic import check_for_updates
- from user_scanner.utils.update import update_self
-
+ from user_scanner.core.email_orchestrator import (
+ run_email_category_batch,
+ run_email_full_batch,
+ run_email_module_batch,
+ )
from user_scanner.core.helpers import (
- load_categories,
- load_modules,
+ ScanConfig,
find_module,
+ generate_permutations,
+ get_proxy_count,
get_site_name,
+ is_loud,
+ load_categories,
+ load_modules,
set_proxy_manager,
- get_proxy_count
)
-
from user_scanner.core.orchestrator import (
- run_user_full,
run_user_category,
- run_user_module
- )
-
- from user_scanner.core.email_orchestrator import (
- run_email_full_batch,
- run_email_category_batch,
- run_email_module_batch
+ 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
+from user_scanner.core.patterns import expand_patterns_random, count_patterns
+
# Color configs
R = Fore.RED
G = Fore.GREEN
@@@ -67,23 -67,44 +70,40 @@@ def main()
parser.add_argument("-m", "--module", help="Scan a single specific module")
- parser.add_argument("-lu", "--list-user", action="store_true",
- help="List all available modules for username scanning")
-
- parser.add_argument("-le", "--list-email", action="store_true",
- help="List all available modules for email scanning")
+ parser.add_argument(
+ "-lu",
+ "--list-user",
+ action="store_true",
+ help="List all available modules for username scanning",
+ )
- parser.add_argument("-v", "--verbose", action="store_true",
- help="Enable verbose output to show urls of the websites")
+ parser.add_argument(
+ "-le",
+ "--list-email",
+ action="store_true",
+ help="List all available modules for email scanning",
+ )
- parser.add_argument("-s", "--stop", type=int,
- default=MAX_PERMUTATIONS_LIMIT, help="Limit permutations")
+ parser.add_argument(
+ "-v",
+ "--verbose",
+ action="store_true",
+ help="Enable verbose output to show urls of the websites",
+ )
- parser.add_argument("-d", "--delay", type=float,
- default=0, help="Delay between requests")
- parser.add_argument(
- "-p", "--permute", type=str, help="Generate permutations using a pattern"
- )
-
+ parser.add_argument(
+ "-s",
+ "--stop",
+ type=int,
+ default=MAX_PERMUTATIONS_LIMIT,
+ help="Limit permutations",
+ )
parser.add_argument(
- "-f", "--format", choices=["csv", "json"], help="Output format")
+ "-d", "--delay", type=float, default=0, help="Delay between requests"
+ )
+
+ parser.add_argument("-f", "--format", choices=["csv", "json"], help="Output format")
parser.add_argument("-o", "--output", type=str, help="Output file path")
@@@ -193,13 -230,14 +229,14 @@@
print(f"{Y}[!] Skipping invalid email format: {email}{X}")
if not valid_emails:
- print(
- f"{R}[✘] Error: No valid emails found in {args.email_file}{X}")
+ print(f"{R}[✘] Error: No valid emails found in {args.email_file}{X}")
sys.exit(1)
- print(f"{C}[+] Loaded {len(valid_emails)} {'email' if len(valid_emails) == 1 else 'emails'} from {args.email_file}{X}")
+ print(
+ f"{C}[+] Loaded {len(valid_emails)} {'email' if len(valid_emails) == 1 else 'emails'} from {args.email_file}{X}"
+ )
is_email = True
- targets = valid_emails
+ targets_found = valid_emails
except FileNotFoundError:
print(f"{R}[✘] Error: File not found: {args.email_file}{X}")
sys.exit(1)
@@@ -209,17 -247,22 +246,22 @@@
# Handle bulk username file
elif args.username_file:
try:
- with open(args.username_file, 'r', encoding='utf-8') as f:
- usernames = [line.strip() for line in f if line.strip()
- and not line.startswith('#')]
+ with open(args.username_file, "r", encoding="utf-8") as f:
+ usernames = [
+ line.strip()
+ for line in f
+ if line.strip() and not line.startswith("#")
+ ]
if not usernames:
print(
- f"{R}[✘] Error: No valid usernames found in {args.username_file}{X}")
+ f"{R}[✘] Error: No valid usernames found in {args.username_file}{X}"
+ )
sys.exit(1)
print(
- f"{C}[+] Loaded {len(usernames)} {'username' if len(usernames) == 1 else 'usernames'} from {args.username_file}{X}")
+ f"{C}[+] Loaded {len(usernames)} {'username' if len(usernames) == 1 else 'usernames'} from {args.username_file}{X}"
+ )
is_email = False
- targets = usernames
+ targets_found = usernames
except FileNotFoundError:
print(f"{R}[✘] Error: File not found: {args.username_file}{X}")
sys.exit(1)
diff --cc user_scanner/core/helpers.py
index 9f65620,badbedf..8415a66
--- a/user_scanner/core/helpers.py
+++ b/user_scanner/core/helpers.py
@@@ -1,12 -1,36 +1,39 @@@
import importlib
import importlib.util
+from types import ModuleType
+from pathlib import Path
+from typing import Dict, List, Optional
+ import inspect
import random
import threading
- import httpx
from concurrent.futures import ThreadPoolExecutor, as_completed
+ from dataclasses import dataclass
+ from itertools import permutations
+ from pathlib import Path
+ from types import ModuleType
+ from typing import Any, Callable, Dict, List, Optional
+
+ import httpx
+
+ LOUD_MODULES: Dict[str, List[str]] = {
+ "user": [],
+ "email": [
+ "leetcode",
+ "instagram",
+ "netflix",
+ "sexvid",
+ "made_porn",
+ "flirtbate",
+ "polarsteps",
+ "babestation",
+ ],
+ }
+
+ @dataclass(frozen=True)
+ class ScanConfig:
+ allow_loud: bool = False
+ only_found: bool = False
+ verbose: bool = False
def get_site_name(module) -> str: