subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
# 使用powershell设置剪贴板 print('设置剪贴板内容...') ps_cmd = f'Get-Content -Path "{tmp_path}" -Encoding UTF8 -Raw | Set-Clipboard' result = subprocess.run(['powershell', '-Command', ps_cmd], capture_output=True, text=True) if result.returncode != 0: print(f'PowerShell错误: {result.stderr}')- Confidence
- 89% confidence
- Finding
- result = subprocess.run(['powershell', '-Command', ps_cmd], capture_output=True, text=True)
