Thank you for contributing to phonsint! This repository is designed to make adding new phone OSINT modules fast, modular, and consistent.
Modules are organized by category under phonsint/modules/<category>/<platform>.py:
auth/: Identity providers and single sign-on systems (Microsoft, Google, Apple ID).social/: Social media platforms (Facebook, Instagram, X/Twitter, Snapchat).shopping/: E-commerce platforms (Amazon, eBay, Flipkart).messaging/: Instant messaging apps (WhatsApp, Telegram, Signal, Viber).
- File Name:
- Must be lowercase alphanumeric, matching the platform name (e.g.,
microsoft.py,facebook.py).
- Must be lowercase alphanumeric, matching the platform name (e.g.,
- Validator Function:
- Exactly one exported validator function per module:
async def validate_<platform>(info: PhoneInfo) -> Result: ...
infois aPhoneInfoobject providing:info.e164: Standardized E.164 string (e.g.+14155552671).info.national_number: Raw digits without country code.info.country_code: Country calling code integer (e.g.1,44).info.region_code: ISO 2-letter country code (e.g.US,GB).
- Exactly one exported validator function per module:
- Return Values:
- Always return a
Resultinstance:Result.taken(url=..., extra={...}, media={...})Result.available(url=...)Result.error("Description of error", url=...)
- Images (avatars, profile photos) MUST go into
media={"avatar": "https://..."}. - Attributes (display name, masked email, carrier, status) go into
extra={"name": "...", "masked_email": "..."}.
- Always return a
- Never Use
raise:- All network anomalies, unexpected HTTP status codes, or parsing errors must return
Result.error(...)so the scanner can gracefully continue to other modules.
- All network anomalies, unexpected HTTP status codes, or parsing errors must return
- No False Positives:
- Never infer account availability from a bare HTTP 200 or bare
else. Verify explicit positive and negative markers.
- Never infer account availability from a bare HTTP 200 or bare
- Silent Operation Guarantee:
- Probes must NEVER trigger an SMS verification code, call, or email alert to the target phone number.
- If a module relies on a step that could trigger an alert, it must be added to
LOUD_MODULESinphonsint/core/helpers.py.
# phonsint/modules/auth/example.py
from phonsint.core.impersonate import impersonate_request_async
from phonsint.core.parser import PhoneInfo
from phonsint.core.result import Result
CHECK_URL = "https://api.example.com/check-phone"
SHOW_URL = "https://example.com"
async def validate_example(info: PhoneInfo) -> Result:
try:
response = await impersonate_request_async(
CHECK_URL,
method="POST",
json={"phone": info.e164},
headers={"Accept": "application/json"},
)
if response.status_code == 200:
data = response.json()
# Explicit negative match
if data.get("exists") is False:
return Result.available(url=SHOW_URL)
# Explicit positive match
if data.get("exists") is True:
extra = {}
if name := data.get("name"):
extra["name"] = name
return Result.taken(extra=extra, url=SHOW_URL)
return Result.error(f"Unexpected status code: {response.status_code}", url=SHOW_URL)
except Exception as exc:
return Result.error(str(exc), url=SHOW_URL)Run tests with pytest:
pytest tests/Verify your module live with a known registered number and an unallocated/nonexistent number:
python3 -m phonsint -p +14155552671 -m example -v --all