extract_from_flow
Extract specific data from network traffic flows using JSONPath, CSS selectors, or regex. Retrieve tokens, IDs, or HTML elements from captured responses for reuse in security testing.
Instructions
Extract specific data from a flow's response body using JSONPath, CSS selector, or regex.
PREREQUISITE: Get flow_id from get_traffic_summary or search_traffic.
Choose exactly ONE extractor per call:
json_path: For JSON API responses. Example: "$.data.users[0].id"
css_selector: For HTML pages. Example: "input[name=csrf]" to find CSRF tokens
regex: For any text. Example: 'token":"([^"]+)' to capture a token value
To save the extracted value for reuse in replay_flow, use extract_session_variable instead.
Args: flow_id: The flow ID to extract from json_path: JSONPath expression (e.g. "$.data.users[0].id", "$.token") css_selector: CSS selector for HTML (e.g. "input[name=csrf]", "a.secret-link") regex: Regex pattern — use capture groups to extract specific parts (e.g. 'token":"([^"]+)')
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| regex | No | ||
| flow_id | Yes | ||
| json_path | No | ||
| css_selector | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |