Open
Description
windows报告导出错误
使用Windows运行程序导出报告时会报出错误,FATA an error occurred generating the html report err="remove C:\Users\XXX\AppData\Local\Temp\gowitness3-report-1205572744\report.zip: The process cannot access the file because it is being used by another process."
Windows临时解决方案,在gowitness\cmd\report_generate.go中的187行至199行的代码替换如下
finalZipPath := generateCmdFlags.ReportFile
err = copy.Copy(tempZipPath, finalZipPath)
if err != nil {
return err
}
log.Info("report zip file generated successfully", "path", finalZipPath)
cmd := exec.Command("cmd", "/c", "rmdir", "/s", "/q", generateCmdFlags.TempDir)
err = cmd.Run()
if err != nil {
return err
}
新增第三方包和本地包"github.com/otiai10/copy"和"os/exec",即可。
Metadata
Metadata
Assignees
Labels
No labels