OpenVAS 產生 PDF 報告的時間似乎是被寫死的
GVM 22.4 路徑如下
sudo -i
cd /var/lib/gvm/gvmd/report_formats/eef7a139-d464-4702-bdce-9a3ea59e88e5/c402cc3e-b531-11e1-9163-406186ea4fc5
ls
generate latex.xsl report_format.xml
查看報告格式說明
cat report_format.xml
<!-- Copyright (C) 2020-2022 Greenbone Networks GmbH -->
<report_format id="c402cc3e-b531-11e1-9163-406186ea4fc5">
<name>PDF</name>
<summary>Portable Document Format report. Version 20220831.</summary>
<description>Scan results in Portable Document Format (PDF). Version 20220831.</description>
<extension>pdf</extension>
<content_type>application/pdf</content_type>
<file name="generate"/>
<file name="latex.xsl"/>
<file name="report_format.xml"/>
</report_format>
修改 LaTeX 樣式表
nano latex.xsl
需要自行調整 "format-date" 的範本
<xsl:template match="scan_start" name="format-date">
<xsl:param name="date" select="."/>
<xsl:if test="string-length ($date)">
<xsl:value-of select="concat (date:day-abbreviation ($date), ' ', date:month-abbreviation ($date), ' ', date:day-in-month ($date), ' ', format-number(date:hour-in-day($date), '00'), ':', format-number(date:minute-in-hour($date), '00'), ':', format-number(date:second-in-minute($date), '00'), ' ', date:year($date), ' ', gvm:timezone-abbrev ())"/>
</xsl:if>
</xsl:template>
<xsl:template match="scan_end">
<xsl:param name="date" select="."/>
<xsl:if test="string-length ($date)">
<xsl:value-of select="concat (date:day-abbreviation ($date), ' ', date:month-abbreviation ($date), ' ', date:day-in-month ($date), ' ', format-number(date:hour-in-day($date), '00'), ':', format-number(date:minute-in-hour($date), '00'), ':', format-number(date:second-in-minute($date), '00'), ' ', date:year($date), ' ', gvm:timezone-abbrev ())"/>
</xsl:if>
</xsl:template>
修改前記得先備份,希望有幫助到你。