Closed mogigoma closed 7 years ago
Interesting. Seems doable. You mention liquid templates is there any others that would be required?
Liquid just happens to be what I'm familiar with, but anything that supports loops, conditionals, and indexing through multiple layers will work. For my purposes I need a per-plugin object that contains all hosts and results, but I suspect others would find a per-host object useful as well. If it helps, an example of a real-world output file (that I currently write per hand) is:
\begin{finding}{plugin_name_here}
\findingsection{Description}
\par plugin_description_here
\findingsection{Solution}
\par plugin_solution_here
\findingsection{Affected Hosts}
\begin{itemize}
\item ip_1
\item ...
\item ip_N
\end{itemize}
\end{finding}
Ok. I will see what I can do after work.
Personally, I don't require this anymore. We've developed our own custom parsing and templating system in the meantime.
I have a reporting system that requires one file per Nessus plugin to be created in a directory, and for the contents of the files to be defined by a user-specified template. For example, I would like to be able to pass into Risu two flags
-d <dirname>
and-t <filename>
, with<dirname>
being a directory that may or may not exist, and<filename>
being a text file written in a template language such as Liquid.Ideally, the template language would have access to a data structure containing the aggregated results of all runs of the plugin over all hosts so that it would be possible in the template to write pseudocode such as:
With the value of
FILENAME
being used to create<dirname>/<FILENAME>
, though the exact syntax of that specifier is not important, I just stole it from Org-mode.