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.

Implement wildcard-based username permutations with limit support

GANESH NIKHIL4474becdb5fa
diff --git a/user_scanner/__main__.py b/user_scanner/__main__.py
index 4e907fd..471d492 100644
--- a/user_scanner/__main__.py
+++ b/user_scanner/__main__.py
@@ -1,6 +1,6 @@
import argparse
import re
-from user_scanner.core.orchestrator import run_checks, load_modules
+from user_scanner.core.orchestrator import run_checks, load_modules , generate_permutations
from colorama import Fore, Style
from .cli import banner
from .cli.banner import print_banner
@@ -14,6 +14,7 @@ CATEGORY_MAPPING = {
"donation": "donation"
}
+MAX_PERMUTATIONS_LIMIT = 100 # To prevent excessive generation
def list_modules(category=None):
from user_scanner import dev, social, creator, community, gaming, donation
@@ -32,7 +33,7 @@ def list_modules(category=None):
package = packages[cat_name]
modules = load_modules(package)
print(Fore.MAGENTA +
- f"\n== {cat_name.upper()} SITES =={Style.RESET_ALL}")
+ f"\n== {cat_name.upper()} SITES =={Style.RESET_ALL}")
for module in modules:
site_name = module.__name__.split(".")[-1]
print(f" - {site_name}")
@@ -59,16 +60,20 @@ def main():
parser.add_argument(
"-v", "--verbose", action="store_true", help="Enable verbose output"
)
+
+ parser.add_argument(
+ "-p", "--permute",type=str,help="Generate username permutations using a string pattern (e.g -p 234)"
+ )
+ parser.add_argument(
+ "-s", "--stop",type=int,default=MAX_PERMUTATIONS_LIMIT,help="Limit the number of username permutations generated"
+ )
+
args = parser.parse_args()
-
- if args.module and "." in args.module:
- args.module = args.module.replace(".", "_")
-
- if args.list:
- list_modules(args.category)
+
+ if not args.username:
+ parser.print_help()
return
-
# Special username checks before run
if (args.module == "x" or args.category == "social"):
if re.search(r"[^a-zA-Z0-9._-]", args.username):
@@ -78,11 +83,23 @@ def main():
if re.search(r"[^a-zA-Z0-9\.-]", args.username):
print(
Fore.RED + f"[!] Username '{args.username}' contains unsupported special characters. Bluesky will throw error. (Supported: only hyphens and digits)" + Style.RESET_ALL + "\n")
- if not args.username:
- parser.print_help()
+ print_banner()
+
+ usernames = [args.username] # Default single username list
+
+ #Added permutation support , generate all possible permutation of given sequence.
+ if args.permute:
+ usernames = generate_permutations(args.username, args.permute , args.stop)
+ print(Fore.CYAN + f"[+] Generated {len(usernames)} username permutations" + Style.RESET_ALL)
+
+
+
+ if args.module and "." in args.module:
+ args.module = args.module.replace(".", "_")
+
+ if args.list:
+ list_modules(args.category)
return
- else:
- print_banner()
from user_scanner import dev, social, creator, community, gaming, donation
@@ -96,7 +113,8 @@ def main():
site_name = module.__name__.split(".")[-1]
if site_name.lower() == args.module.lower():
from user_scanner.core.orchestrator import run_module_single
- run_module_single(module, args.username)
+ for name in usernames: # <-- permutation support here
+ run_module_single(module, name)
found = True
if not found:
print(
@@ -105,10 +123,13 @@ def main():
# Category-wise scan
category_package = eval(CATEGORY_MAPPING[args.category])
from user_scanner.core.orchestrator import run_checks_category
- run_checks_category(category_package, args.username, args.verbose)
+
+ for name in usernames: # <-- permutation support here
+ run_checks_category(category_package, name, args.verbose)
else:
# Full scan
- run_checks(args.username)
+ for name in usernames:
+ run_checks(name)
if __name__ == "__main__":
diff --git a/user_scanner/core/orchestrator.py b/user_scanner/core/orchestrator.py
index a83c252..f0e8cfd 100644
--- a/user_scanner/core/orchestrator.py
+++ b/user_scanner/core/orchestrator.py
@@ -2,7 +2,7 @@ import importlib
import pkgutil
from colorama import Fore, Style
import threading
-
+from itertools import permutations
import httpx
from httpx import ConnectError, TimeoutException
@@ -37,11 +37,11 @@ def worker_single(module, username, i):
try:
result = func(username)
if result == 1:
- output = f" {Fore.GREEN}[βœ”] {site_name}: Available{Style.RESET_ALL}"
+ output = f" {Fore.GREEN}[βœ”] {site_name} ({username}): Available{Style.RESET_ALL}"
elif result == 0:
- output = f" {Fore.RED}[✘] {site_name}: Taken{Style.RESET_ALL}"
+ output = f" {Fore.RED}[✘] {site_name} ({username}): Taken{Style.RESET_ALL}"
else:
- output = f" {Fore.YELLOW}[!] {site_name}: Error{Style.RESET_ALL}"
+ output = f" {Fore.YELLOW}[!] {site_name} ({username}): Error{Style.RESET_ALL}"
except Exception as e:
output = f" {Fore.YELLOW}[!] {site_name}: Exception - {e}{Style.RESET_ALL}"
else:
@@ -132,7 +132,6 @@ def status_validate(url, available, taken, **kwargs):
def inner(response):
# Checks if a number is equal or is contained inside
def contains(a, b): return (isinstance(a, list) and b in a) or (a == b)
-
status = response.status_code
available_value = contains(available, status)
taken_value = contains(taken, status)
@@ -146,3 +145,21 @@ def status_validate(url, available, taken, **kwargs):
return 2
return generic_validate(url, inner, **kwargs)
+
+def generate_permutations(username, pattern, limit=None):
+ """
+ Generate all order-based permutations of characters in `pattern`
+ appended after `username`.
+ """
+ permutations_set = {username}
+
+ chars = list(pattern)
+
+ # generate permutations of length 1 β†’ len(chars)
+ for r in range(1, len(chars) + 1):
+ for combo in permutations(chars, r):
+ permutations_set.add(username + ''.join(combo))
+ if limit and len(permutations_set) >= limit:
+ return list(permutations_set)[:limit]
+
+ return sorted(permutations_set)