Mailing List Archive

Minor color patch for html_graph_output.c
Hello all,

I emailed this patch to the list several months ago but it still hasn't
made it into the mainline tree. This patch corrects a color problem with
HTML output and makes the colors for each address match the colors shown
at the top of the report.

--- nessus-core.orig/nessus/html_graph_output.c Wed Dec 26 04:49:53 2001
+++ nessus-core/nessus/html_graph_output.c Thu Feb 21 13:14:31 2002
@@ -1223,7 +1223,7 @@
fprintf(f, "<a href=\"%s/index.html\">%s</a></td>\n", name,
hosts->name);
if(holes)fprintf(f, "<td><FONT COLOR=\"#FF0000\">(<b>found %d
security hole%s)</b></FONT></td>\n",
holes, holes>1?"s":"");
- else if(warnings)fprintf(f, "<td><FONT COLOR=\"#FF0000\">(<b>found
%d security warning%s</b>)</FONT></td>\n",
+ else if(warnings)fprintf(f, "<td><FONT COLOR=\"#660000\">(<b>found
%d security warning%s</b>)</FONT></td>\n",
warnings, warnings>1?"s":"");
else if(notes)fprintf(f, "<td>(<b>found %d security
note%s</b>)</td>\n",
notes, notes>1?"s":"");
Re: Minor color patch for html_graph_output.c [ In reply to ]
FYI, 'color' as is "color" is perfectly legitimate HTML, so you don't
need \"#FF0000\". Instead you can use '#FF0000'.

I would prefer CSS however ;)

David

Mike McHenry wrote:

>Hello all,
>
>I emailed this patch to the list several months ago but it still hasn't
>made it into the mainline tree. This patch corrects a color problem with
>HTML output and makes the colors for each address match the colors shown
>at the top of the report.
>
>--- nessus-core.orig/nessus/html_graph_output.c Wed Dec 26 04:49:53 2001
>+++ nessus-core/nessus/html_graph_output.c Thu Feb 21 13:14:31 2002
>@@ -1223,7 +1223,7 @@
> fprintf(f, "<a href=\"%s/index.html\">%s</a></td>\n", name,
>hosts->name);
> if(holes)fprintf(f, "<td><FONT COLOR=\"#FF0000\">(<b>found %d
>security hole%s)</b></FONT></td>\n",
> holes, holes>1?"s":"");
>- else if(warnings)fprintf(f, "<td><FONT COLOR=\"#FF0000\">(<b>found
>%d security warning%s</b>)</FONT></td>\n",
>+ else if(warnings)fprintf(f, "<td><FONT COLOR=\"#660000\">(<b>found
>%d security warning%s</b>)</FONT></td>\n",
> warnings, warnings>1?"s":"");
> else if(notes)fprintf(f, "<td>(<b>found %d security
>note%s</b>)</td>\n",
> notes, notes>1?"s":"");
>
>

--
I may have the information you need and I may choose only HTML. It's up to
you. Disclaimer: I am not responsible for any email that you send me nor am
I bound to any obligation to deal with any received email in any given
fashion. If you send me spam or a virus, I may in whole or part send you
50,000 return copies of it. I may also publically announce any and all
emails and post them to message boards, news sites, and even parody sites.
I may also mark them up, cut and paste, print, and staple them to telephone
poles for the enjoyment of people without internet access. This is not a
confidential medium and your assumption that your email can or will be
handled confidentially is akin to baring your backside, burying your head in
the ground, and thinking nobody can see you butt nekkid and in plain view
for miles away. Don't be a cluebert, buy one from K-mart today.