User Scanner
User Scanner 源码分析:跟踪目标穿过模块与透视
用无害夹具阅读 Python engine、模块注册、HTTP 适配器、cross-scan、导出器和 MCP。

你将学会
- Explain module, pivot, report, and MCP layers
- Run a bounded scan and interpret uncertainty
- Apply authorization, rate-limit, and data-retention controls
开始前需要
- Basic Git and command-line usage
- Comfort reading a project README
You can explain the project, run its documented first step, and decide what to verify before adopting it.
先看结论
- Mocked fixtures expose dispatch, status, pivot, and export behavior safely.
- Trace fields and failure mapping instead of assuming every module is equivalent.
- Small parser, cycle, redaction, and schema tests are safer first contributions.
Use a harmless fixture
从合成目标和本地 mock 响应开始,追踪 CLI、模块 registry、found/not-found/blocked/timeout 语义、pivot 去重、JSON/CSV/PDF/MCP,并优先提交解析和 schema 回归。
Use README anchors such as `user_scanner.core.engine`, email/username module paths, `--cross-scan`, report flags, and `user-scanner-mcp`, then confirm actual symbols and tests in the checkout.
Trace normalization and dispatch
Follow CLI parsing into target validation, category/module selection, concurrency configuration, HTTP adapter, and module response normalization. Record fields read/written, timeout/retry behavior, and whether a blocked response differs from not found.
Then locate the module registry and verify how a new module declares target type, URL, parser, metadata, and error mapping. Keep module-specific quirks out of the shared result contract.
Trace cross-scan and exports
Instrument one mocked response that exposes a handle or email, then follow classification, depth, verification, de-duplication, queueing, and parent-child evidence. Force a duplicate and a cycle to test termination.
Follow the same observation set into JSON, CSV, PDF, and MCP response schemas. Check that photos, URLs, and personal fields are redacted or retained only under an explicit policy.
Contribution-sized findings
Prefer a deterministic parser fixture, timeout/error regression, pivot-cycle guard, report redaction test, or MCP schema test. Run the project tests and document observed behavior versus README claims; do not publish recipes for unauthorized collection.
如何选择
| 比较维度 | 方案 A | 方案 B |
|---|---|---|
| Best when | You need predictable behavior and easy auditing | You need adaptive optimization and have reliable telemetry |
| Main risk | May leave performance on the table | Can become difficult to explain or debug |
实施步骤
- 1
Pin code and create local mocked target/module fixtures.
- 2
Trace CLI validation, registry, HTTP adapter, parser, and result fields.
- 3
Follow one pivot and duplicate/cycle into report and MCP outputs.
- 4
Add a focused regression and record evidence versus assumptions.
可复制示例
fixture -> CLI/engine -> module registry -> HTTP mock
status/metadata -> pivot queue -> JSON/CSV/PDF/MCP
regression -> redacted evidence常见问题
Can source analysis query all live platforms?
It should not; local fixtures and owned targets provide safer, repeatable evidence.
What is a useful first module contribution?
A parser fixture that distinguishes found, not-found, blocked, timeout, and malformed responses.
资料来源
- User Scanner README (captured 2026-08-31)来源核查 2026-08-31
- User Scanner repository来源核查 2026-08-31