subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run_cmd(cmd, cwd=None): """执行 shell 命令""" result = subprocess.run( cmd, shell=True, capture_output=True, text=True, cwd=cwd ) if result.returncode != 0:- Confidence
- 98% confidence
- Finding
- result = subprocess.run( cmd, shell=True, capture_output=True, text=True, cwd=cwd )
