subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_command(cmd, shell=True): """运行 shell 命令并返回结果""" try: result = subprocess.run( cmd, shell=shell, capture_output=True,- Confidence
- 95% confidence
- Finding
- result = subprocess.run( cmd, shell=shell, capture_output=True, text=True, timeout=30 )
