0

我刚刚安装了mobSF来制作静态分析报告,但是当我点击 pdf 输出时,出现了这个错误:

{
pdf_error: "Cannot Generate PDF",
err_details: "wkhtmltopdf reported an error: Exit with code 1 due to network error: ProtocolUnknownError "
}

终端中的错误是这样的:

[ERROR] 30/Jul/2020 07:04:16 - Error Generating PDF Report
Traceback (most recent call last):
  File "/Users/arminmo/Desktop/Mobile-Security-Framework-MobSF-master/StaticAnalyzer/views/shared_func.py", line 190, in pdf
    pdf_dat = pdfkit.from_string(html, False, options=options)
  File "/Users/arminmo/Desktop/Mobile-Security-Framework-MobSF-master/venv/lib/python3.7/site-packages/pdfkit/api.py", line 72, in from_string
    return r.to_pdf(output_path)
  File "/Users/arminmo/Desktop/Mobile-Security-Framework-MobSF-master/venv/lib/python3.7/site-packages/pdfkit/pdfkit.py", line 156, in to_pdf
    raise IOError('wkhtmltopdf reported an error:\n' + stderr)
OSError: wkhtmltopdf reported an error:
Exit with code 1 due to network error: ProtocolUnknownError

[ERROR] 30/Jul/2020 07:04:16 - Internal Server Error: /PDF/

我的操作系统是 mac os mojave

你能解释一下如何用 wkhtmltopdf 和 mobsf 解决这个问题吗?

4

1 回答 1

1
  • 按照 wiki 说明下载并安装 wkhtmltopdf
  • 将包含 wkhtmltopdf 二进制文件的文件夹添加到环境变量 PATH。
于 2020-09-24T23:10:25.237 回答