subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def _get_ws_url(self, tab_id: str, host: str = "127.0.0.1", port: int = 9222) -> Optional[str]: """通过 JSON API 获取 Tab 的 WebSocket URL""" try: result = subprocess.run( ['powershell', '-Command', f'(Invoke-RestMethod http://{host}:{port}/json).webSocketDebuggerUrl'], capture_output=True, text=True, timeout=5 )- Confidence
- 87% confidence
- Finding
- result = subprocess.run( ['powershell', '-Command', f'(Invoke-RestMethod http://{host}:{port}/json).webSocketDebuggerUrl'], capture_output=True, text=True,
