Implementation:7onez Cti expert WP Analyze Analyze
| Knowledge Sources | |
|---|---|
| Domains | OSINT, Web_Collection |
| Last Updated | 2026-10-28 14:00 GMT |
Overview
Concrete tool for extracting pivot artifacts from HTML/DOM and coordinating the WebPivot collection pipeline, provided by the cti-expert WebPivot engine.
Description
The analyze function in wp_analyze.py is the orchestration engine of the WebPivot collector. It receives raw HTML (or a file path), a base URL, and HTTP headers, then extracts a comprehensive artifact set: meta tags, trackers (GA4/GTM/UA, Sentry DSNs, etc.), SaaS IDs, crypto addresses, token contracts, emails, script sources, social links, Telegram/WhatsApp contacts, phones, footer text, prose selectors (copy-pasted disclaimers), description text, and ETag headers. It also triggers the asset layer (JS bundles, source maps, well-known files) and merges JS-derived artifacts back into the primary extraction.
The function unwraps Wayback/archive wrappers so the original site is treated as the origin, drops platform-owned boilerplate (e.g. Wix Sentry DSNs), and returns a structured dict that downstream tools (pivot_extract, whois_enrich, ingest_webpivot) consume.
Usage
Import this when you need to:
- Extract DOM artifacts from a fetched HTML page for pivot generation.
- Collect the asset layer (JS bundles, source maps, well-known files) on SPA kits where the shell HTML is empty.
- Merge JS-derived artifacts (trackers, SaaS IDs, crypto, socials) with the primary page extraction.
- Unwrap archived pages so the original site is the origin.
Code Reference
Source Location
- Repository: cti-expert
- File: intel_engine/WebPivot/tools/wp_analyze.py
- Lines: L61-63 (entry), extends through ~L300
Signature
def analyze(source: str, html: str, base_url: str, headers: dict, ua: str,
extra_cookies=None, proxy: str = None, probe_tls: bool = True,
probe_http: bool = True, extra_artifacts: dict = None):
"""Extract pivot artifacts from HTML/DOM. Coordinates wp_extract, wp_pivots,
whois_enrich, wp_recon, wp_assets. Returns a structured dict with meta,
artifacts, pivots, and evidence."""
Import
from wp_analyze import analyze
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| source | str | Yes | Raw HTML or file path |
| html | str | Yes | Page HTML content |
| base_url | str | Yes | Effective URL (unwrapped from Wayback) |
| headers | dict | Yes | HTTP response headers |
| ua | str | Yes | User-Agent string |
| extra_cookies | dict | No | Additional cookies |
| proxy | str | No | Egress proxy |
| probe_tls | bool | No | TLS probe (default True) |
| probe_http | bool | No | HTTP/asset probe (default True) |
| extra_artifacts | dict | No | Pre-collected artifacts to merge |
Outputs
| Name | Type | Description |
|---|---|---|
| result | dict | {meta, artifacts (trackers, saas_ids, crypto, emails, socials, telegram, phones, etc.), pivots, evidence} |
Usage Examples
Basic Page Analysis
from wp_analyze import analyze
result = analyze(
source=html_content,
html=html_content,
base_url="https://example.com",
headers=response.headers,
ua="Mozilla/5.0 ...",
)
print(result["artifacts"]["trackers"]) # GA4/GTM/UA IDs
print(result["pivots"]) # ranked pivot queries
With Proxy and Asset Layer
# Collect through a proxy; enable the JS-bundle asset layer
result = analyze(
source=html,
html=html,
base_url="https://example.com",
headers=headers,
ua=ua,
proxy="socks5://127.0.0.1:9050",
probe_http=True, # enables wp_assets (JS bundles + source maps)
)
# JS-derived trackers merged into result["artifacts"]["trackers"]