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.

fix(email_scan): take rappi's loud step from the scan config, not sys.argv (#744)

jk8828f687201a
diff --git a/tests/test_email_orchestrator.py b/tests/test_email_orchestrator.py
index 77c52fe..8408526 100644
--- a/tests/test_email_orchestrator.py
+++ b/tests/test_email_orchestrator.py
@@ -90,3 +90,45 @@ def test_set_concurrency_has_a_maximum():
assert email_orchestrator.MAX_CONCURRENT_REQUESTS == 500
finally:
email_orchestrator.set_concurrency(original)
+
+
+def test_run_email_batch_passes_allow_loud_from_config_not_argv(monkeypatch):
+ import sys
+ import types
+ from user_scanner.core import email_orchestrator
+ from user_scanner.core.helpers import ScanConfig
+ from user_scanner.core.result import Result
+
+ seen = {}
+
+ async def val_async(e, allow_loud=False):
+ seen["async"] = allow_loud
+ return Result.taken(username=e)
+
+ def val_sync(e, allow_loud=False):
+ seen["sync"] = allow_loud
+ return Result.taken(username=e)
+
+ async def val_plain(e):
+ seen["plain"] = True
+ return Result.taken(username=e)
+
+ modules = []
+ for name, func in (("site1", val_async), ("site2", val_sync), ("site3", val_plain)):
+ mod = types.ModuleType(f"cat_a.{name}")
+ mod.__file__ = f"/path/to/email_scan/cat_a/{name}.py"
+ setattr(mod, f"validate_{name}", func)
+ modules.append(mod)
+
+ monkeypatch.setattr(email_orchestrator, "find_category", lambda m: "Cat_a")
+ monkeypatch.setattr(email_orchestrator, "get_site_name", lambda m: m.__name__.split(".")[-1].capitalize())
+
+ # The scan policy decides, whatever the host process was started with
+ monkeypatch.setattr(sys, "argv", ["host"])
+ email_orchestrator.run_email_module_batch(modules, "[email protected]", ScanConfig(allow_loud=True))
+ assert seen == {"async": True, "sync": True, "plain": True}
+
+ seen.clear()
+ monkeypatch.setattr(sys, "argv", ["host", "--allow-loud"])
+ email_orchestrator.run_email_module_batch(modules, "[email protected]", ScanConfig())
+ assert seen == {"async": False, "sync": False, "plain": True}
diff --git a/user_scanner/core/email_orchestrator.py b/user_scanner/core/email_orchestrator.py
index b93f39f..e7041d4 100644
--- a/user_scanner/core/email_orchestrator.py
+++ b/user_scanner/core/email_orchestrator.py
@@ -95,10 +95,14 @@ async def _async_worker(
try:
import inspect
module_timeout = (get_global_timeout() or 15.0) + 10.0
+ # Validators with an optional loud step take the scan policy as an argument
+ kwargs = {}
+ if "allow_loud" in inspect.signature(func).parameters:
+ kwargs["allow_loud"] = configs.allow_loud
if inspect.iscoroutinefunction(func):
- result = await asyncio.wait_for(func(email), timeout=module_timeout)
+ result = await asyncio.wait_for(func(email, **kwargs), timeout=module_timeout)
else:
- result = await asyncio.wait_for(asyncio.to_thread(func, email), timeout=module_timeout)
+ result = await asyncio.wait_for(asyncio.to_thread(func, email, **kwargs), timeout=module_timeout)
except asyncio.TimeoutError:
result = Result.error(f"Module execution timed out after {module_timeout}s")
except Exception as e:
diff --git a/user_scanner/email_scan/shopping/rappi.py b/user_scanner/email_scan/shopping/rappi.py
index f61f172..e18d810 100644
--- a/user_scanner/email_scan/shopping/rappi.py
+++ b/user_scanner/email_scan/shopping/rappi.py
@@ -1,4 +1,3 @@
-import sys
import time
import secrets
import httpx
@@ -15,7 +14,7 @@ def _generate_timestamp() -> str:
return str(int(time.time() * 1000))
-async def _check(email: str) -> Result:
+async def _check(email: str, allow_loud: bool) -> Result:
url_check = "https://services.rappi.com.ar/api/rocket/user/account/check-email"
url_login = "https://services.rappi.com.ar/api/rocket/login/email/application_user"
show_url = "https://www.rappi.com"
@@ -70,14 +69,12 @@ async def _check(email: str) -> Result:
else:
return Result.error(f"Unexpected response status: {response.status_code}, report it via GitHub issues", url=show_url)
- # If registered (exists is True), check if --allow-loud was passed
- allow_loud = "--allow-loud" in sys.argv
-
+ # If registered (exists is True), only go further when the scan allows loud requests
if not allow_loud:
# Return TAKEN silently without hitting the loud login endpoint
return Result.taken(reason="Use flag '--allow-loud' to see the target's masked phone number", url=show_url)
- # If --allow-loud is passed, proceed to Endpoint 2 to extract masked phone info
+ # Loud step allowed: proceed to Endpoint 2 to extract masked phone info
payload_login = {
"email": email,
"scope": "all"
@@ -109,10 +106,10 @@ async def _check(email: str) -> Result:
return Result.error(e, url=show_url)
-async def validate_rappi(email: str) -> Result:
+async def validate_rappi(email: str, allow_loud: bool = False) -> Result:
"""
Rappi email validator.
Silent by default (hits check-email endpoint).
- When --allow-loud is passed, also hits the login endpoint to extract masked phone intelligence.
+ When allow_loud is True (--allow-loud), also hits the login endpoint to extract masked phone intelligence.
"""
- return await _check(email)
+ return await _check(email, allow_loud)