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: nsfw flag

Vamatoa0cb3cebb1c8
diff --git a/docs/FLAGS.md b/docs/FLAGS.md
index 9a237b0..aa31985 100644
--- a/docs/FLAGS.md
+++ b/docs/FLAGS.md
@@ -8,6 +8,7 @@
| `-ef, --email-file FILE` | Scan multiple emails from file (one per line) |
| `--only-found` | Only show sites where the username/email was found |
| `--allow-loud` | Enable scanning sites that may send emails/notifications |
+| `--allow-nsfw`, `--nsfw` | Enable scanning NSFW sites |
| `-c, --category CATEGORY` | Scan all platforms in a specific category |
| `-lu, --list-user` | List all available modules for username scanning |
| `-le, --list-email` | List all available modules for email scanning |
diff --git a/tests/test_engine.py b/tests/test_engine.py
index b9f9f78..3762c5a 100644
--- a/tests/test_engine.py
+++ b/tests/test_engine.py
@@ -155,7 +155,7 @@ async def test_check_category(monkeypatch, patreon_stub, medium_stub):
async_mock = AsyncMock()
async_mock.return_value = Result.taken()
- monkeypatch.setattr(engine, "load_categories", lambda is_email: {
+ monkeypatch.setattr(engine, "load_categories", lambda is_email, nsfw: {
"creator": "/fake/path"
})
monkeypatch.setattr(engine, "load_modules",
@@ -185,7 +185,7 @@ async def test_is_email_passed_correctly(monkeypatch, github_stub):
result = await engine.check_category("dev", "some_email")
assert len(result) == 1
- sync_mock.assert_called_once_with(is_email=True)
+ sync_mock.assert_called_once_with(is_email=True, nsfw=True)
@pytest.mark.anyio
@@ -193,7 +193,7 @@ async def test_case_insensitive_category_match(monkeypatch, github_stub):
async_mock = AsyncMock()
async_mock.return_value = Result.taken()
- monkeypatch.setattr(engine, "load_categories", lambda is_email: {
+ monkeypatch.setattr(engine, "load_categories", lambda is_email, nsfw: {
"dev": "/fake/path"
})
monkeypatch.setattr(engine, "load_modules", lambda x: [github_stub])
@@ -207,7 +207,7 @@ async def test_case_insensitive_category_match(monkeypatch, github_stub):
@pytest.mark.anyio
async def test_empty_category_list(monkeypatch):
- monkeypatch.setattr(engine, "load_categories", lambda is_email: {
+ monkeypatch.setattr(engine, "load_categories", lambda is_email, nsfw: {
"dev": "/fake/path"
})
monkeypatch.setattr(engine, "load_modules", lambda x: [])
@@ -219,7 +219,7 @@ async def test_empty_category_list(monkeypatch):
@pytest.mark.anyio
async def test_category_not_found_email(monkeypatch):
monkeypatch.setattr(engine, "load_categories",
- lambda is_email: {"dev": "/fake/path"})
+ lambda is_email, nsfw: {"dev": "/fake/path"})
with pytest.raises(ValueError) as exc_info:
await engine.check_category("unknown", "some_email")
@@ -229,7 +229,7 @@ async def test_category_not_found_email(monkeypatch):
@pytest.mark.anyio
async def test_category_not_found_username(monkeypatch):
monkeypatch.setattr(engine, "load_categories",
- lambda is_email: {"dev": "/fake/path"})
+ lambda is_email, nsfw: {"dev": "/fake/path"})
with pytest.raises(ValueError) as exc_info:
await engine.check_category("unknown", "some_username", is_email=False)
@@ -241,7 +241,7 @@ async def test_category_not_found_username(monkeypatch):
async def test_check_all(monkeypatch):
async_mock = AsyncMock()
async_mock.return_value = [Result.taken(), Result.available()]
- monkeypatch.setattr(engine, "load_categories", lambda is_email: {
+ monkeypatch.setattr(engine, "load_categories", lambda is_email, nsfw: {
"creator": "/fake/path",
"dev": "/fake/path2"
})
@@ -272,7 +272,7 @@ async def test_check_all_email_passed_correct(monkeypatch):
calls = [call("creator", "some_username", False),
call("dev", "some_username", False)]
- sync_mock.assert_called_once_with(is_email=False)
+ sync_mock.assert_called_once_with(is_email=False, nsfw=True)
async_mock.assert_has_calls(calls, any_order=False)
@@ -281,7 +281,7 @@ async def test_check_all_nested_lis_flatten(monkeypatch):
async_mock = AsyncMock()
async_mock.side_effect = [[Result.taken(), Result.available()],
[Result.taken()]]
- monkeypatch.setattr(engine, "load_categories", lambda is_email: {
+ monkeypatch.setattr(engine, "load_categories", lambda is_email, nsfw: {
"creator": "/fake/path",
"dev": "/fake/path2"
})
@@ -299,7 +299,7 @@ async def test_check_all_category_exception(monkeypatch):
raise ValueError("Failed")
return [Result.taken(), Result.available()]
- monkeypatch.setattr(engine, "load_categories", lambda is_email: {
+ monkeypatch.setattr(engine, "load_categories", lambda is_email, nsfw: {
"creator": "/fake/path",
"dev": "/fake/path2"
})
diff --git a/user_scanner/__main__.py b/user_scanner/__main__.py
index 12e0ae0..9a3196c 100644
--- a/user_scanner/__main__.py
+++ b/user_scanner/__main__.py
@@ -132,6 +132,13 @@ def main():
"(password resets, etc.)",
)
+ parser.add_argument(
+ "--nsfw",
+ "--allow-nsfw",
+ action="store_true",
+ help="Enable scanning NSFW sites",
+ )
+
parser.add_argument("-U", "--update", action="store_true", help="Update the tool")
parser.add_argument("--version", action="store_true", help="Print version")
@@ -149,7 +156,7 @@ def main():
sys.exit(0)
if args.list_user or args.list_email:
- categories = load_categories(is_email=args.list_email)
+ categories = load_categories(args.list_email, args.nsfw)
for cat_name, cat_path in categories.items():
modules = load_modules(cat_path)
print(Fore.MAGENTA + f"\n== {cat_name.upper()} SITES =={Style.RESET_ALL}")
@@ -298,6 +305,7 @@ def main():
config = ScanConfig(
allow_loud=args.allow_loud,
only_found=args.only_found,
+ nsfw=args.nsfw,
verbose=args.verbose,
)
@@ -311,7 +319,7 @@ def main():
print(f"\n{Fore.CYAN} Checking username: {target}{Style.RESET_ALL}")
if args.module:
- modules = find_module(args.module.replace(".", "_"), is_email)
+ modules = find_module(args.module.replace(".", "_"), is_email, args.nsfw)
fn = run_email_module_batch if is_email else run_user_module
if modules:
module_config = replace(config, allow_loud=True)
@@ -325,7 +333,7 @@ def main():
)
elif args.category:
- cat_path = load_categories(is_email).get(args.category)
+ cat_path = load_categories(is_email, args.nsfw).get(args.category)
fn = run_email_category_batch if is_email else run_user_category
if cat_path:
results.extend(
diff --git a/user_scanner/core/email_orchestrator.py b/user_scanner/core/email_orchestrator.py
index 1dd4acc..a4d9506 100644
--- a/user_scanner/core/email_orchestrator.py
+++ b/user_scanner/core/email_orchestrator.py
@@ -118,7 +118,7 @@ def run_email_category_batch(
def run_email_full_batch(email: str, configs: ScanConfig) -> List[Result]:
- categories = load_categories(is_email=True)
+ categories = load_categories(True, configs.nsfw)
all_results = []
printed_cats = set()
diff --git a/user_scanner/core/engine.py b/user_scanner/core/engine.py
index a5e1187..e383a08 100644
--- a/user_scanner/core/engine.py
+++ b/user_scanner/core/engine.py
@@ -40,7 +40,7 @@ async def check(module: ModuleType, target: str) -> Result:
async def check_category(category_name: str, target: str, is_email: bool = True) -> List[Result]:
- categories = load_categories(is_email=is_email)
+ categories = load_categories(is_email=is_email, nsfw=True)
cat_path = next((p for name, p in categories.items()
if name.lower() == category_name.lower()), None)
@@ -54,7 +54,7 @@ async def check_category(category_name: str, target: str, is_email: bool = True)
async def check_all(target: str, is_email: bool = True) -> List[Result]:
- categories = load_categories(is_email=is_email)
+ categories = load_categories(is_email=is_email, nsfw=True)
results = []
all_tasks = [check_category(cat_name, target, is_email)
diff --git a/user_scanner/core/helpers.py b/user_scanner/core/helpers.py
index 110c99e..3f4a5cd 100644
--- a/user_scanner/core/helpers.py
+++ b/user_scanner/core/helpers.py
@@ -30,6 +30,7 @@ LOUD_MODULES: Dict[str, List[str]] = {
@dataclass(frozen=True)
class ScanConfig:
allow_loud: bool = False
+ nsfw: bool = False
only_found: bool = False
verbose: bool = False
@@ -58,7 +59,7 @@ def load_modules(category_path: Path) -> List[ModuleType]:
@functools.lru_cache(maxsize=None)
-def load_categories(is_email: bool = False) -> Dict[str, Path]:
+def load_categories(is_email: bool = False, nsfw: bool = False) -> Dict[str, Path]:
folder_name = "email_scan" if is_email else "user_scan"
root = Path(__file__).resolve().parent.parent / folder_name
categories = {}
@@ -67,8 +68,9 @@ def load_categories(is_email: bool = False) -> Dict[str, Path]:
if (
subfolder.is_dir()
and subfolder.name.lower() not in ["cli", "utils", "core"]
- and "__" not in subfolder.name
- ): # Removes __pycache__
+ and "__" not in subfolder.name # Removes __pycache__
+ and (nsfw or subfolder.name != "adult") # Remove nsfw sites
+ ):
categories[subfolder.name] = subfolder.resolve()
return categories
@@ -90,12 +92,12 @@ def get_scan_func(module) -> Optional[Callable[[str], Any]]:
return None
-def find_module(name: str, is_email: bool = False) -> List[ModuleType]:
+def find_module(name: str, is_email: bool = False, nsfw: bool = False) -> List[ModuleType]:
name = name.lower()
return [
module
- for category_path in load_categories(is_email).values()
+ for category_path in load_categories(is_email, nsfw).values()
for module in load_modules(category_path)
if module.__name__.split(".")[-1].lower() == name
]
@@ -107,7 +109,7 @@ def find_category(module: ModuleType) -> str | None:
return None
category = Path(module_file).parent.name.lower()
- if category in load_categories(False) or category in load_categories(True):
+ if category in load_categories(False, True) or category in load_categories(True, True):
return category.capitalize()
return None
diff --git a/user_scanner/core/orchestrator.py b/user_scanner/core/orchestrator.py
index 55bbe73..6f605c4 100644
--- a/user_scanner/core/orchestrator.py
+++ b/user_scanner/core/orchestrator.py
@@ -95,7 +95,7 @@ def run_user_category(
def run_user_full(username: str, configs: ScanConfig) -> List[Result]:
results = []
all_modules = []
- categories = list(load_categories().items())
+ categories = list(load_categories(nsfw=configs.nsfw).items())
module_to_cat = {}
printed_categories = set()
@@ -105,7 +105,7 @@ def run_user_full(username: str, configs: ScanConfig) -> List[Result]:
for m in modules:
all_modules.append(m)
# Match the worker's capitalization exactly to prevent "Unknown" category bugs
- site_key = get_site_name(m).capitalize()
+ site_key = get_site_name(m).capitalize()
module_to_cat[site_key] = display_name
with ThreadPoolExecutor(max_workers=60) as executor:
@@ -171,7 +171,7 @@ def make_request(url: str, **kwargs) -> httpx.Response:
use_http2 = kwargs.pop("http2", False)
client = get_client(use_http2, proxy_val)
-
+
max_retries = 2
for attempt in range(max_retries + 1):
try: