subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if password: cmd += [f"--password={password}"] cmd += [path, tmp_path] result = subprocess.run(cmd, capture_output=True, text=True, timeout=30) if result.returncode == 0: reader = PdfReader(tmp_path) print(f"[open_pdf_smart] Decrypted with qpdf subprocess -> temp file '{tmp_path}'")- Confidence
- 86% confidence
- Finding
- result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
