execute_security_code
Run custom Python scripts in an isolated sandbox with full access to proxy and browser tools for automating complex security tests like race conditions, blind SQL injection, and exploit chains.
Instructions
Execute a Python script in an isolated sandbox with full access to all other tools via NdpSDK.
REQUIRES: approved=true (human must approve arbitrary code execution).
WHEN TO USE THIS (instead of individual tools):
Race conditions / TOCTOU attacks (need precise timing)
Blind SQL injection (needs hundreds of sequential requests with conditional logic)
Multi-step exploit chains (login → extract token → IDOR scan → report)
Heavy loops (brute force, enumeration)
Complex encoding/decoding chains (double URL encoding, JWT manipulation)
Custom PoC/exploit generation
HOW TO USE NdpSDK:
from nodriver_proxy_mcp.sdk import NdpSDK
import asyncio
async def main():
sdk = NdpSDK() # auto-connects to running proxy and browser sessions
# All 38 other tools are available as async methods:
await sdk.manage_proxy("start")
await sdk.browser_open()
await sdk.browser_go("https://target.com")
flows = await sdk.get_traffic_summary()
result = await sdk.replay_flow(flow_id, replacements=[...])
asyncio.run(main())RESOURCE LIMITS: 256MB memory, 60s CPU time, 32KB output cap. External packages can be auto-installed via the dependencies parameter.
Args: script_content: Python code to execute. Use NdpSDK to access all proxy/browser tools programmatically. dependencies: Pip packages to install before execution (e.g. ["pyjwt", "pycryptodome", "beautifulsoup4"]). timeout: Maximum wall-clock execution time in seconds (default: 300 = 5 minutes). approved: MUST be true. Set this ONLY after the human user has explicitly approved code execution. bypass_proxy: If true, HTTP requests from the script skip the proxy (for raw speed or avoiding interception loops).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeout | No | ||
| approved | No | ||
| bypass_proxy | No | ||
| dependencies | No | ||
| script_content | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |