subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
def run(cmd, check=True): print(f" > {cmd}") result = subprocess.run(cmd, shell=True, capture_output=True, text=True) if result.stdout: print(result.stdout) if result.returncode != 0 and check:- Confidence
- 91% confidence
- Finding
- result = subprocess.run(cmd, shell=True, capture_output=True, text=True)
