subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def cmd(cmd: str, cwd=None, shell=True): print(f"\n>>> {cmd}") result = subprocess.run(cmd, cwd=cwd, shell=shell, capture_output=False) return result.returncode == 0- Confidence
- 98% confidence
- Finding
- result = subprocess.run(cmd, cwd=cwd, shell=shell, capture_output=False)
