Mailing List Archive

NessusClient/nessus pdf_output.c,1.7,1.8
Update of /usr/local/cvs/NessusClient/nessus
In directory raccoon.nessus.org:/tmp/cvs-serv73846/nessus

Modified Files:
pdf_output.c
Log Message:
Include the parameters used for the plugins in the appendix with the
plugin information in the PDF output.


Index: pdf_output.c
===================================================================
RCS file: /usr/local/cvs/NessusClient/nessus/pdf_output.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- pdf_output.c 4 May 2006 16:06:45 -0000 1.7
+++ pdf_output.c 4 May 2006 17:19:43 -0000 1.8
@@ -825,6 +825,17 @@
}

static void
+print_prefs_row(FILE *file, char *pref, char *text)
+{
+ char *pref_html = convert_cr_to_html(pref);
+ char *text_html = convert_cr_to_html(text);
+ fprintf(file, "\t<tr><td><b>%s</b></th><td>%s</td></tr>\n",
+ pref_html, text_html);
+ efree(&text_html);
+ efree(&pref_html);
+}
+
+static void
print_plugin_information(gpointer key, gpointer value, gpointer userdata)
{
struct context *context = value;
@@ -867,6 +878,29 @@
efree(&description);

fprintf(file, "\n<p>\n");
+
+ if (plugin->plugin_prefs)
+ {
+ struct arglist *prefs = plugin->plugin_prefs;
+
+ fputs("<p></p>\n<h4>Parameters</h4>\n<table>\n", file);
+
+ while (prefs && prefs->next)
+ {
+ if (prefs->type == ARG_ARGLIST)
+ {
+ print_prefs_row(file, prefs->name,
+ (char*)arg_get_value(prefs->value, "value"));
+ }
+ else
+ fprintf(stderr,
+ "print_plugin_information: plugin_prefs is not ARG_ARGLIST\n");
+
+ prefs = prefs->next;
+ }
+
+ fputs("</table>\n<p>", file);
+ }
}

static void

_______________________________________________
Nessus-cvs mailing list
Nessus-cvs@list.nessus.org
http://mail.nessus.org/mailman/listinfo/nessus-cvs