Implementation:7onez Cti expert Whois Enrich Whois Summary
| Knowledge Sources | |
|---|---|
| Domains | OSINT, WHOIS |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
Concrete tool for enriching a domain with current + history WHOIS data via WhoisXML API with keyless RDAP fallback, provided by the cti-expert WebPivot engine.
Description
The whois_summary function in whois_enrich.py fetches the FULL current + history WHOIS concurrently (two independent WhoisXML calls to halve latency). WITHOUT a key it falls back to keyless RDAP (+ port-43) so registration data lands on every domain regardless. With keep_raw (default) the complete unmodified API responses are archived under out['raw'].
A critical feature is the era-split recomputation: the history block is fetched concurrently with current, so its era split runs without the live created date. Once current is known, the era split is recomputed with the correct created date. The function also backfills from CLD WHOIS for .vn (WhoisXML has no coverage there) and from RDAP for obscure TLDs — only fills what WhoisXML left empty, never overwrites.
Usage
Import this when you need to:
- Build the WHOIS registrant spine for a domain (registrar, created, expires, name_servers, registrant email/name/phone).
- Recover WHOIS history with per-era registrant records for the timeline.
- Enrich domains keylessly when no WhoisXML key is available.
- Backfill .vn domains from CLD WHOIS (WhoisXML has no coverage).
Code Reference
Source Location
- Repository: cti-expert
- File: intel_engine/WebPivot/tools/whois_enrich.py
- Lines: L989-1057
Signature
def whois_summary(domain, history_mode="purchase", timeout=40, keep_raw=True):
"""Combined current + history block, ready to attach to a pivot_extract result.
With a key: fetches FULL current + history. Without: keyless RDAP fallback.
With keep_raw: archives complete API responses under out['raw']."""
Import
from whois_enrich import whois_summary
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| domain | str | Yes | Domain to look up |
| history_mode | str | No | "purchase" (full records) or "preview" (no per-era list) |
| timeout | int | No | Per-request timeout (default 40) |
| keep_raw | bool | No | Archive raw API responses (default True) |
Outputs
| Name | Type | Description |
|---|---|---|
| result | dict | {registrar, created, expires, name_servers, registrant_*, source, history: {count, registrant_emails, registrant_names, eras, records, mode}, raw: {current, history}} |
Usage Examples
With WhoisXML Key
from whois_enrich import whois_summary
# Full current + history (spends WhoisXML credits)
result = whois_summary("example.com", history_mode="purchase")
print(result["registrar"])
print(result["history"]["eras"]) # per-era registrant splits
print(result["history"]["records"]) # per-era record list for timeline
Keyless Fallback
# No WHOISXML_API_KEY set — falls back to RDAP + port-43
result = whois_summary("example.com", timeout=30)
print(result["source"]) # "rdap" or "whoisxml+rdap"
# history will be empty (keyless has no history)