Traffic
Generated from artex-cc tools --json. Descriptions and parameters come from the tool definitions.
traffic_search
Section titled “traffic_search”Read-only. Registered only when serve runs with --proxy.
Query the target traffic the recording proxy has captured (host is required; accepts a bare host, host:port, or full URL, optionally filtered further by URL substring or body keyword). When a port is specified, only that service’s traffic is returned, avoiding cross-talk between different ports on the same IP. body_contains runs a full-text search over the captured request/response headers and bodies, supporting any substring including Chinese (at least 3 characters). Returns only an ultra-light index (id/method/url/status/resp_len) with no response content; once results are non-empty, use traffic_get to verify the request/response of each one, then hand the IDs that actually support the current vulnerability to bind_finding_traffic. Returns 3 by default, at most 10 per page; use page to paginate when there are more results.
| Parameter | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Target host (required): bare host, host:port, or full URL |
| body_contains | string | no | Full-text body search (min 3 chars; optional) |
| limit | integer | no | Results per page, default 3, max 10 |
| page | integer | no | 0-based page number for pagination |
| query | string | no | URL/metadata substring filter (optional) |
Returns: {count, results: [{id, method, url, status, resp_len}, ...]}.
traffic_get
Section titled “traffic_get”Read-only. Registered only when serve runs with --proxy.
Fetch the raw request/response of one captured traffic record by id (truncated when too large). Use together with traffic_search to avoid re-curling. A WebSocket (status 101) or SSE (text/event-stream) record shows only its handshake here; read its messages with traffic_messages. When proxy rewrite rules changed the exchange, the result starts with a REWRITTEN line naming the rule ids, and shows the request as the client sent it and the response as the target sent it. traffic_search searches only these original values: it never finds a value a rewrite rule wrote.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Exchange id from traffic_search |
Returns: Text with --- REQUEST --- and --- RESPONSE --- sections.
traffic_blob
Section titled “traffic_blob”Read-only. Registered only when serve runs with --proxy.
Read a segment of an oversized request or response body by its blob hash (shown in traffic_get as @blob sha256:<hash>). Returns at most 8 KiB per call; use offset to page through.
| Parameter | Type | Required | Description |
|---|---|---|---|
| hash | string | yes | Sha256 blob hash from traffic_get output |
| limit | integer | no | Bytes to read, max 8192 (default 8192) |
| offset | integer | no | Byte offset to start reading (default 0) |
Returns: {total, offset, length, data}.
traffic_messages
Section titled “traffic_messages”Read-only. Registered only when serve runs with --proxy.
List WebSocket or SSE messages of a captured stream exchange. Use after traffic_get shows status 101 (WebSocket) or text/event-stream (SSE).
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Exchange id |
| direction | string | no | Filter: c2s (client to server), s2c (server to client), or empty for both |
| limit | integer | no | Messages per page, default 50, max 200 |
| offset | integer | no | 0-based offset for pagination |
Returns: {total, messages: [{seq, direction, type, size, payload, event?, blob?, truncated?}, ...]}.
traffic_replay
Section titled “traffic_replay”Registered only when serve runs with --proxy.
Replay a captured HTTP request (optionally with modifications). Fetches the original request from the given exchange id, applies any header or body overrides, sends it through the recording proxy, and returns the new response.
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | yes | Exchange id to replay |
| apply_rules | boolean | no | Apply capture rewrite rules to the replay (default false) |
| modify_body | string | no | Override the request body (optional) |
| modify_headers | object | no | Header overrides: {name: value} to set, {name: “”} to remove |
| modify_method | string | no | Override the HTTP method (optional) |
| modify_url | string | no | Override the request URL (optional) |
Returns: {status, duration_ms, recorded, truncated, raw}.
traffic_hosts
Section titled “traffic_hosts”Read-only. Registered only when serve runs with --proxy.
List all recorded target hosts with their exchange counts, most recent activity first.
No parameters.
Returns: {count, hosts: [...]}.
traffic_har_export
Section titled “traffic_har_export”Read-only. Registered only when serve runs with --proxy.
Export captured traffic as a HAR 1.2 JSON document. Optionally filter by host.
| Parameter | Type | Required | Description |
|---|---|---|---|
| host | string | no | Host substring filter (optional; empty exports all) |
| method | string | no | HTTP method filter (optional) |
| status | string | no | Status code or class filter, e.g. 200 or 4xx (optional) |
Returns: {har, exported, totalMatched, truncated}.
traffic_stats
Section titled “traffic_stats”Read-only. Registered only when serve runs with --proxy.
Aggregate statistics about all captured traffic: total exchanges, unique hosts, status code distribution, method distribution, top 10 hosts, time range, and average response size.
No parameters.
Returns: Aggregate statistics object.
traffic_timeline
Section titled “traffic_timeline”Read-only. Registered only when serve runs with --proxy.
Show traffic activity over time for a host, bucketed by minute, hour (default), or day. Useful for spotting rate limiting, session expiry, and WAF patterns.
| Parameter | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Target host (required) |
| bucket | string | no | Time bucket granularity (default hour). One of minute, hour, day |
Returns: {host, buckets: [...]}.
traffic_patterns
Section titled “traffic_patterns”Read-only. Registered only when serve runs with --proxy.
Identify traffic patterns: most-requested paths (by url_template), hosts with the most HTTP errors (4xx/5xx with status breakdown), and endpoints that appeared recently. Optionally filter by host.
| Parameter | Type | Required | Description |
|---|---|---|---|
| host | string | no | Host substring filter (optional; empty analyzes all traffic) |
Returns: {top_paths: [{path, count}], error_hosts: [{host, total, codes_4xx, codes_5xx, status_samples}], new_endpoints: [{host, path, first_ts, count}]}.
traffic_clear
Section titled “traffic_clear”Registered only when serve runs with --proxy.
Delete all captured traffic for a given host substring. Returns the number of deleted exchanges.
| Parameter | Type | Required | Description |
|---|---|---|---|
| host | string | yes | Host substring to match for deletion |
Returns: {deleted, host}.