browser_intercept_response
Intercept and modify incoming browser responses in real-time to test security headers, tamper with API responses, inject payloads, or block requests using URL patterns.
Instructions
Intercept and modify INCOMING browser responses in real-time via Chrome CDP Fetch API.
PREREQUISITE: browser_open must have been called first.
USE CASES:
CSP bypass testing: Replace Content-Security-Policy headers in responses
Response tampering: Modify API responses to test client-side validation
Inject XSS payloads into response bodies
Remove security headers to test fallback behavior
Available actions:
"replace_body": Find and replace text in the response body. Example: browser_intercept_response(url_pattern=".api.", action="replace_body", search_pattern='"admin":false', value='"admin":true')
"block": Block the response entirely.
Args: url_pattern: Regex pattern to match request URLs (e.g. ".api.target.com/me.") action: "replace_body" or "block" search_pattern: Regex to find in the response body (required for replace_body) value: Replacement text (required for replace_body) session_name: Browser session to use (default: "default")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | No | ||
| action | Yes | ||
| url_pattern | Yes | ||
| session_name | No | default | |
| search_pattern | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |