subprocess module call
Medium
- Category
- Dangerous Code Execution
- Content
if not office_bin: raise PreprocessError("libreoffice/soffice not found. Install: sudo apt-get install libreoffice") with tempfile.TemporaryDirectory(prefix="med-doc-preprocess-") as tmp_dir: proc = subprocess.run( [office_bin, "--headless", "--convert-to", "txt:Text", "--outdir", tmp_dir, str(path)], stdout=subprocess.PIPE, stderr=subprocess.PIPE,- Confidence
- 80% confidence
- Finding
- proc = subprocess.run( [office_bin, "--headless", "--convert-to", "txt:Text", "--outdir", tmp_dir, str(path)], stdout=subprocess.PIPE, stderr=subprocess.PIP
