
sub long_form {
$logo_checked = ($logo eq "on") ? "checked" : "";
$show_title_checked = ($show_title eq "on") ? "checked" : "";
$show_scan_time_checked = ($show_scan_time eq "on") ? "checked" : "";
$show_report_time_checked = ($show_report_time eq "on") ? "checked" : "";
$pie_hosts_checked = ($pie_hosts eq "on") ? "checked" : "";
$pie_vulns_checked = ($pie_vulns eq "on") ? "checked" : "";
$pie_categories_checked = ($pie_categories eq "on") ? "checked" : "";
$pie_curvulnstatus_checked = ($pie_curvulnstatus eq "on") ? "checked" : "";
$pie_lastvulnstatus_checked = ($pie_lastvulnstatus eq "on") ? "checked" : "";
$bar_hosts_checked = ($bar_hosts eq "on") ? "checked" : "";
$bar_vulns_checked = ($bar_vulns eq "on") ? "checked" : "";
$bar_categories_checked = ($bar_categories eq "on") ? "checked" : "";
$bar_subhosts_checked = ($bar_subhosts eq "on") ? "checked" : "";
$bar_subvulns_checked = ($bar_subvulns eq "on") ? "checked" : "";
$bar_subcategories_checked = ($bar_subcategories eq "on") ? "checked" : "";
$bar_allvulnstatus_checked = ($bar_allvulnstatus eq "on") ? "checked" : "";
$bar_curvulnstatus_checked = ($bar_curvulnstatus eq "on") ? "checked" : "";
$bar_lastvulnstatus_checked = ($bar_lastvulnstatus eq "on") ? "checked" : "";
$bar_vulnstatus_checked = ($bar_vulnstatus eq "on") ? "checked" : "";
$bar_vulnhistory_checked = ($bar_vulnhistory eq "on") ? "checked" : "";
$bar_hosthistory_checked = ($bar_hosthistory eq "on") ? "checked" : "";
$bar_cathistory_checked = ($bar_cathistory eq "on") ? "checked" : "";
$table_hosts_checked = ($table_hosts eq "on") ? "checked" : "";
$table_vulns_checked = ($table_vulns eq "on") ? "checked" : "";
$table_categories_checked = ($table_categories eq "on") ? "checked" : "";
$table_subhosts_checked = ($table_subhosts eq "on") ? "checked" : "";
$table_subvulns_checked = ($table_subvulns eq "on") ? "checked" : "";
$table_subcategories_checked = ($table_subcategories eq "on") ? "checked" : "";
$table_allvulnstatus_checked = ($table_allvulnstatus eq "on") ? "checked" : "";
$table_curvulnstatus_checked = ($table_curvulnstatus eq "on") ? "checked" : "";
$table_lastvulnstatus_checked = ($table_lastvulnstatus eq "on") ? "checked" : "";
$table_vulnstatus_checked = ($table_vulnstatus eq "on") ? "checked" : "";
$table_vulnhistory_checked = ($table_vulnhistory eq "on") ? "checked" : "";
$table_hosthistory_checked = ($table_hosthistory eq "on") ? "checked" : "";
$table_cathistory_checked = ($table_cathistory eq "on") ? "checked" : "";
$blackandwhite_checked = ($blackandwhite eq "on") ? "checked" : "";
$vs_invert_checked = ($vs_invert eq "on") ? "checked" : "";
@history_label_selected = ();
$history_label_selected[$history_label] = "selected";
$bar_values_checked = ($bar_values eq "on") ? "checked" : "";
$vulnstatus_redonly_on_checked = ($vulnstatus_redonly eq "on") ? "checked" : "";
$vulnstatus_redonly_off_checked = ($vulnstatus_redonly eq "off") ? "checked" : "";
$vulnstatus_redonly_reverse_checked = ($vulnstatus_redonly eq "reverse") ? "checked" : "";
$redonly_msg_checked = ($redonly_msg eq "on") ? "checked" : "";
$host_list_checked = ($host_list eq "on") ? "checked" : "";
@host_list_1_selected = ();
$host_list_1_selected[$host_list_1] = "selected";
@host_list_2_selected = ();
$host_list_2_selected[$host_list_2] = "selected";
@host_list_3_selected = ();
$host_list_3_selected[$host_list_3] = "selected";
@host_list_4_selected = ();
$host_list_4_selected[$host_list_4] = "selected";
@host_list_5_selected = ();
$host_list_5_selected[$host_list_5] = "selected";
@host_list_6_selected = ();
$host_list_6_selected[$host_list_6] = "selected";
@host_list_7_selected = ();
$host_list_7_selected[$host_list_7] = "selected";
@host_list_8_selected = ();
$host_list_8_selected[$host_list_8] = "selected";
@host_list_9_selected = ();
$host_list_9_selected[$host_list_9] = "selected";
@host_list_10_selected = ();
$host_list_10_selected[$host_list_10] = "selected";
@host_list_11_selected = ();
$host_list_11_selected[$host_list_11] = "selected";
@host_list_12_selected = ();
$host_list_12_selected[$host_list_12] = "selected";
@host_list_13_selected = ();
$host_list_13_selected[$host_list_13] = "selected";
@host_list_14_selected = ();
$host_list_14_selected[$host_list_14] = "selected";
$vuln_list_checked = ($vuln_list eq "on") ? "checked" : "";
@vuln_list_1_selected = ();
$vuln_list_1_selected[$vuln_list_1] = "selected";
@vuln_list_2_selected = ();
$vuln_list_2_selected[$vuln_list_2] = "selected";
@vuln_list_3_selected = ();
$vuln_list_3_selected[$vuln_list_3] = "selected";
@vuln_list_4_selected = ();
$vuln_list_4_selected[$vuln_list_4] = "selected";
@vuln_list_5_selected = ();
$vuln_list_5_selected[$vuln_list_5] = "selected";
@vuln_list_6_selected = ();
$vuln_list_6_selected[$vuln_list_6] = "selected";
@vuln_list_7_selected = ();
$vuln_list_7_selected[$vuln_list_7] = "selected";
@vuln_list_8_selected = ();
$vuln_list_8_selected[$vuln_list_8] = "selected";
@vuln_list_9_selected = ();
$vuln_list_9_selected[$vuln_list_9] = "selected";
@vuln_list_10_selected = ();
$vuln_list_10_selected[$vuln_list_10] = "selected";
@vuln_list_11_selected = ();
$vuln_list_11_selected[$vuln_list_11] = "selected";
@vuln_list_12_selected = ();
$vuln_list_12_selected[$vuln_list_12] = "selected";
$cross_new_checked = ($cross_new eq "on") ? "checked" : "";
$cross_removed_checked = ($cross_removed eq "on") ? "checked" : "";
$cross_existing_checked = ($cross_existing eq "on") ? "checked" : "";
$cross_reintro_checked = ($cross_reintro eq "on") ? "checked" : "";
$cross_red_checked = ($cross_red eq "on") ? "checked" : "";
$cross_yellow_checked = ($cross_yellow eq "on") ? "checked" : "";
$cross_brown_checked = ($cross_brown eq "on") ? "checked" : "";
$cross_green_checked = ($cross_green eq "on") ? "checked" : "";
$host_detail_status_checked = ($host_detail_status eq "on") ? "checked" : "";
$vuln_detail_status_checked = ($vuln_detail_status eq "on") ? "checked" : "";
$show_nvulns_checked = ($show_nvulns eq "on") ? "checked" : "";
$show_rvulns_checked = ($show_rvulns eq "on") ? "checked" : "";
$show_evulns_checked = ($show_evulns eq "on") ? "checked" : "";
$show_rivulns_checked = ($show_rivulns eq "on") ? "checked" : "";
$show_nhosts_checked = ($show_nhosts eq "on") ? "checked" : "";
$show_rhosts_checked = ($show_rhosts eq "on") ? "checked" : "";
$show_ehosts_checked = ($show_ehosts eq "on") ? "checked" : "";
$show_rihosts_checked = ($show_rihosts eq "on") ? "checked" : "";
$short_severities_on_checked = ($short_severities eq "on") ? "checked" : "";
$short_severities_off_checked = ($short_severities eq "off") ? "checked" : "";
$numeric_severities_checked = ($numeric_severities eq "on") ? "checked" : "";
$merge_cells_checked = ($merge_cells eq "on") ? "checked" : "";
$separate_cves_checked = ($separate_cves eq "on") ? "checked" : "";
$tech_details_on_checked = ($tech_details eq "on") ? "checked" : "";
$tech_details_off_checked = ($tech_details eq "off") ? "checked" : "";
$tech_details_reverse_checked = ($tech_details eq "reverse") ? "checked" : "";
$host_info_always_on_checked = ($host_info_always eq "on") ? "checked" : "";
$host_info_always_off_checked = ($host_info_always eq "off") ? "checked" : "";
$empty_host_details_checked = ($empty_host_details eq "on") ? "checked" : "";
$entire_tutorial_checked = ($entire_tutorial eq "on") ? "checked" : "";
$impact_checked = ($impact eq "on") ? "checked" : "";
$background_checked = ($background eq "on") ? "checked" : "";
$problem_checked = ($problem eq "on") ? "checked" : "";
$resolution_checked = ($resolution eq "on") ? "checked" : "";
$references_checked = ($references eq "on") ? "checked" : "";
$no_vulnerabilities_checked = ($no_vulnerabilities eq "on") ? "checked" : "";
$allreds_checked = ($allreds eq "on") ? "checked" : "";
$allyellows_checked = ($allyellows eq "on") ? "checked" : "";
$allbrowns_checked = ($allbrowns eq "on") ? "checked" : "";
$allgreens_checked = ($allgreens eq "on") ? "checked" : "";
$alltoptens_checked = ($alltoptens eq "on") ? "checked" : "";
$use_exclusions_checked = ($use_exclusions eq "on") ? "checked" : "";
$redhosts_checked = ($redhosts eq "on") ? "checked" : "";
$yellowhosts_checked = ($yellowhosts eq "on") ? "checked" : "";
$brownhosts_checked = ($brownhosts eq "on") ? "checked" : "";
$greenhosts_checked = ($greenhosts eq "on") ? "checked" : "";
$emptyhosts_checked = ($emptyhosts eq "on") ? "checked" : "";
$toptenhosts_checked = ($toptenhosts eq "on") ? "checked" : "";
$combine_categories_checked = ($combine_categories eq "on") ? "checked" : "";
$matchdomain_on_checked = ($matchdomain eq "on") ? "checked" : "";
$matchdomain_reverse_checked = ($matchdomain eq "reverse") ? "checked" : "";
$matchdomain_off_checked = ($matchdomain eq "off") ? "checked" : "";
$matchip_on_checked = ($matchip eq "on") ? "checked" : "";
$matchip_reverse_checked = ($matchip eq "reverse") ? "checked" : "";
$matchip_off_checked = ($matchip eq "off") ? "checked" : "";
$matchos_on_checked = ($matchos eq "on") ? "checked" : "";
$matchos_reverse_checked = ($matchos eq "reverse") ? "checked" : "";
$matchos_off_checked = ($matchos eq "off") ? "checked" : "";
$countall_checked = ($countall eq "on") ? "checked" : "";
@host_sortkey1_selected = ();
$host_sortkey1_selected[$host_sortkey1] = "selected";
@host_sortkey2_selected = ();
$host_sortkey2_selected[$host_sortkey2] = "selected";
@host_sortkey3_selected = ();
$host_sortkey3_selected[$host_sortkey3] = "selected";
@subnet_sortkey1_selected = ();
$subnet_sortkey1_selected[$subnet_sortkey1] = "selected";
@subnet_sortkey2_selected = ();
$subnet_sortkey2_selected[$subnet_sortkey2] = "selected";
@subnet_sortkey3_selected = ();
$subnet_sortkey3_selected[$subnet_sortkey3] = "selected";
$cat_sort_count_on_selected = ($cat_sort_count eq "on") ? "selected" : "";
$cat_sort_count_off_selected = ($cat_sort_count eq "off") ? "selected" : "";
$invert_host_sort_checked = ($invert_host_sort eq "on") ? "checked" : "";
$invert_subnet_sort_checked = ($invert_subnet_sort eq "on") ? "checked" : "";
$show_url_checked = ($show_url eq "on") ? "checked" : "";
$show_all_removed_on_checked = ($show_all_removed eq "on") ? "checked" : "";
$show_all_removed_off_checked = ($show_all_removed eq "off") ? "checked" : "";
$reintro_new_on_checked = ($reintro_new eq "on") ? "checked" : "";
$reintro_new_off_checked = ($reintro_new eq "off") ? "checked" : "";
$reintro_new_reverse_checked = ($reintro_new eq "reverse") ? "checked" : "";
$ignore_missing_on_checked = ($ignore_missing eq "on") ? "checked" : "";
$ignore_missing_off_checked = ($ignore_missing eq "off") ? "checked" : "";
$riskwatch_checked = ($riskwatch eq "on") ? "checked" : "";
@format_checked = ();
$format_checked[$format] = "checked";

print CLIENT <<EOF
<HTML>
<HEAD>
<TITLE>SAINTwriter Configuration</TITLE>
<LINK REV="made" HREF="mailto:saint\@saintcorporation.com">
</HEAD>
<BODY BGCOLOR="white" vlink="#000000" link="#04289D">

<P></P>

<P>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
	<TR>
		<TD COLSPAN="2"><IMG SRC="$HTML_ROOT/images/saintwriter_config_banner.gif" WIDTH="621" HEIGHT="106" ALIGN="BOTTOM" ALT="Configuration Management" BORDER="0"></TD>
	</TR>
	<TR>
	  <TD WIDTH="86" VALIGN="TOP">
	    <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
		<TR>
		    <TD WIDTH="86"><A HREF="http://www.saintcorporation.com"><IMG SRC="$HTML_ROOT/images/home.gif" WIDTH="86" HEIGHT="55" ALIGN="BOTTOM" ALT="SAINT Corporation"
			BORDER="0"></A></TD>
		</TR>
		<TR>
		    <TD WIDTH="86"><A HREF="$HTML_ROOT/saint.html"><IMG SRC="$HTML_ROOT/images/home_button.gif" WIDTH="86" HEIGHT="46"
			ALIGN="BOTTOM" ALT="SAINT Home" BORDER="0" STYLE="Background-Image : none"></A></TD>
		</TR>
		<TR>
		    <TD WIDTH="86"><A HREF="$HTML_SERVER/data/saint_data_form.pl"><IMG SRC="$HTML_ROOT/images/data_mgmt_button.gif" WIDTH="86"
			HEIGHT="46" ALIGN="BOTTOM" ALT="Data Management" BORDER="0"></A></TD>
		</TR>
		<TR>
		    <TD WIDTH="86"><A HREF="$HTML_SERVER/running/saint_run_form.pl"><IMG SRC="$HTML_ROOT/images/target_selection_button.gif"
			WIDTH="86" HEIGHT="46" ALIGN="BOTTOM" ALT="Target Selection" BORDER="0"></A></TD>
		</TR>
		<TR>
		    <TD WIDTH="86"><A HREF="$HTML_SERVER/reporting/analysis.pl"><IMG SRC="$HTML_ROOT/images/data_analysis_button.gif" WIDTH="86"
			HEIGHT="46" ALIGN="BOTTOM" ALT="Data Analysis" BORDER="0"></A></TD>
		</TR>
		<TR>
		    <TD WIDTH="86"><A HREF="$HTML_SERVER/admin/saint_cf_form.pl"><IMG SRC="$HTML_ROOT/images/config_mgmt_button.gif" WIDTH="86"
			HEIGHT="46" ALIGN="BOTTOM" ALT="Configuration Management" BORDER="0"></A></TD>
		</TR>
		<TR>
		    <TD WIDTH="86"><A HREF="$HTML_ROOT/saint_documentation.html"><IMG SRC="$HTML_ROOT/images/documentation_button.gif"
			WIDTH="86" HEIGHT="46" ALIGN="BOTTOM" ALT="SAINT Documentation" BORDER="0"></A></TD>
		</TR>
		<TR>
		    <TD WIDTH="86" HEIGHT="46"><A HREF="$HTML_ROOT/docs/FAQ.html#trouble"><IMG SRC="$HTML_ROOT/images/troubleshooting_button.gif" WIDTH="86"
			HEIGHT="46" ALIGN="BOTTOM" ALT="Troubleshooting" BORDER="0"></A></TD>
		</TR>
		<TR>
		    <TD WIDTH="86" HEIGHT="65"><IMG SRC="$HTML_ROOT/images/bottom_border.gif" WIDTH="86" HEIGHT="75" ALIGN="BOTTOM" ALT="--------" BORDER="0"></TD>
		</TR>
	    </TABLE>
	  </TD>
	  <TD VALIGN="TOP">
		<DL>
			<P>
		</DL>
<FORM METHOD=POST ACTION=saintwriter_action.pl>
<INPUT TYPE=hidden NAME=longform VALUE="on">
<INPUT TYPE=hidden NAME=report VALUE="$report">
<DL>
<DT><A HREF="#header">Header</A>
<DD>Choose what information you want included at the top
of the report.
<DT><A HREF="#charts">Charts</A>
<DD>Choose which charts, graphs, and tables you want included in the
report.
<DT><A HREF="#lists">Lists</A>
<DD>Choose what information you want included in the list section
of the report.
<DT><A HREF="#technical">Technical Details</A>
<DD>Choose what information you want included in the technical details.
<DT><A HREF="#vulnerabilities">Vulnerabilities</A>
<DD>Choose which vulnerabilities you want to appear in the report.
<DT><A HREF="#hosts">Hosts</A>
<DD>Choose which hosts you want to appear in the report, based
upon the IP address, domain name, or type of host.
<DT><FONT COLOR=red>*</FONT><A HREF="#trend">Trend Analysis</A>
<DD>Specify which past data sets to analyze, and choose from
options which affect how the status categories are formed.
<DT><A HREF="#sorting">Sorting</A>
<DD>Choose how you want the information to be sorted.
<DT><A HREF="#format">Format</A>
<DD>Choose an output format for the report.
<DT><A HREF="#advanced">Other Options</A>
<DD>Choose from a variety of other options.
<DT><A HREF="#go">Go!</A>
<DD>Generate the report.</DD>
</DL>
<FONT COLOR=red>*</FONT> indicates options which require SAINTwriter&#153; 2.0 or higher
<HR>
<A NAME="header"><H2>Header</H2></A>
Include the following information at the top of the report:
<DL>
<DT><INPUT TYPE=checkbox NAME="logo" $logo_checked> Logo
<DD>Image URL: <INPUT TYPE=text NAME="logo_path" VALUE="$logo_path" SIZE=40>
<DT><INPUT TYPE=checkbox NAME="show_title" $show_title_checked> Title
<DD>Title: <INPUT TYPE=text NAME="report_title" VALUE="$report_title" SIZE=32>
<DT><INPUT TYPE=checkbox NAME="show_scan_time" $show_scan_time_checked> Time the scan completed
<DT><INPUT TYPE=checkbox NAME="show_report_time" $show_report_time_checked> Time the report was generated
</DL>
<HR>
<A NAME="charts"><H2>Charts</H2></A>
<I>Notes:</I>
<UL>
<LI>The severity level of a <I>host</I> is defined as the maximum
severity level of the vulnerabilities found on that host
<LI>An example of a <i>category</i> would be
"FTP vulnerabilities" or "http cgi access". Each service also
has its own category, such as "offers smtp" or "offers telnet".
<LI>A host may be counted in one or more categories, or none at all.
<LI>Choosing a pie chart will result in a large HTML file.
<LI>Pie charts are only visible in Microsoft Internet Explorer browsers.
<LI>Pie charts and bar graphs are only included in HTML reports.
</UL>
<P>
<DL>
<DT><B>Vulnerabilities:</B> Total vulnerabilities broken down by severity level
<DD>Title:<INPUT SIZE=40 NAME=v_title VALUE="$v_title">
<DD><INPUT TYPE=checkbox NAME=pie_vulns $pie_vulns_checked>Pie Chart
<DD><INPUT TYPE=checkbox NAME=bar_vulns $bar_vulns_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_vulns $table_vulns_checked>Table
<DT><B>Hosts:</B> Host counts broken down by severity level
<DD>Title:<INPUT SIZE=40 NAME=h_title VALUE="$h_title">
<DD><INPUT TYPE=checkbox NAME=pie_hosts $pie_hosts_checked>Pie Chart
<DD><INPUT TYPE=checkbox NAME=bar_hosts $bar_hosts_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_hosts $table_hosts_checked>Table
<DT><B>Categories:</B> The number of hosts in each vulnerability/service category
<DD>Title:<INPUT SIZE=40 NAME=c_title VALUE="$c_title">
<DD><INPUT TYPE=checkbox NAME=pie_categories $pie_categories_checked>Pie Chart
<DD><INPUT TYPE=checkbox NAME=bar_categories $bar_categories_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_categories $table_categories_checked>Table
<DT><B>Vulnerabilities by Subnet:</B> Total vulnerabilities broken down
by severity level and grouped by subnet
<DD>Title:<INPUT SIZE=40 NAME=sv_title VALUE="$sv_title">
<DD><INPUT TYPE=checkbox NAME=bar_subvulns $bar_subvulns_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_subvulns $table_subvulns_checked>Table
<DT><B>Hosts by Subnet:</B> Host counts broken down by severity level and grouped
by subnet
<DD>Title:<INPUT SIZE=40 NAME=sh_title VALUE="$sh_title">
<DD><INPUT TYPE=checkbox NAME=bar_subhosts $bar_subhosts_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_subhosts $table_subhosts_checked>Table
<DT><B>Categories by Subnet:</B> The number of hosts in each vulnerability/service
category, grouped by subnet
<DD>Title:<INPUT SIZE=40 NAME=sc_title VALUE="$sc_title">
<DD><INPUT TYPE=checkbox NAME=bar_subcategories $bar_subcategories_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_subcategories $table_subcategories_checked>Table
<DT><FONT COLOR=red>*</FONT><B>Status of All Vulnerabilities:</B> The number of vulnerabilities in each status category
(Status categories are <I>new, pre-existing, removed,</I> and <I>reintroduced</I>)
<DD>Title:<INPUT SIZE=40 NAME=avs_title VALUE="$avs_title">
<DD><INPUT TYPE=checkbox NAME=bar_allvulnstatus $bar_allvulnstatus_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_allvulnstatus $table_allvulnstatus_checked>Table
<DT><FONT COLOR=red>*</FONT><B>Status of Current Vulnerabilities:</B> The number of current vulnerabilities in each status
category (<I>new, pre-existing,</I> and <I>reintroduced</I>)
<DD>Title:<INPUT SIZE=40 NAME=cvs_title VALUE="$cvs_title">
<DD><INPUT TYPE=checkbox NAME=pie_curvulnstatus $pie_curvulnstatus_checked>Pie Chart
<DD><INPUT TYPE=checkbox NAME=bar_curvulnstatus $bar_curvulnstatus_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_curvulnstatus $table_curvulnstatus_checked>Table
<DT><FONT COLOR=red>*</FONT><B>Status of Old Vulnerabilities:</B> The number of past vulnerabilities in each status
category (<I>removed, remaining,</I> and <I>reintroduced</I>)
<DD>Title:<INPUT SIZE=40 NAME=lvs_title VALUE="$lvs_title">
<DD><INPUT TYPE=checkbox NAME=pie_lastvulnstatus $pie_lastvulnstatus_checked>Pie Chart
<DD><INPUT TYPE=checkbox NAME=bar_lastvulnstatus $bar_lastvulnstatus_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_lastvulnstatus $table_lastvulnstatus_checked>Table
<DT><FONT COLOR=red>*</FONT><B>Status by Severity:</B> Total vulnerabilities broken down by severity level and grouped
by status category
<DD>Title:<INPUT SIZE=40 NAME=vs_title VALUE="$vs_title">
<DD><INPUT TYPE=checkbox NAME=bar_vulnstatus $bar_vulnstatus_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_vulnstatus $table_vulnstatus_checked>Table
<DD>(<INPUT TYPE=checkbox NAME=vs_invert $vs_invert_checked> Invert placement of status and severity)
<DT><FONT COLOR=red>*</FONT><B>Vulnerability History:</B> Total vulnerabilities broken down by severity level and grouped
by date
<DD>Title:<INPUT SIZE=40 NAME=vh_title VALUE="$vh_title">
<DD><INPUT TYPE=checkbox NAME=bar_vulnhistory $bar_vulnhistory_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_vulnhistory $table_vulnhistory_checked>Table
<DT><FONT COLOR=red>*</FONT><B>Host History:</B> Total hosts broken down by severity level and grouped by date
<DD>Title:<INPUT SIZE=40 NAME=hh_title VALUE="$hh_title">
<DD><INPUT TYPE=checkbox NAME=bar_hosthistory $bar_hosthistory_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_hosthistory $table_hosthistory_checked>Table
<DT><FONT COLOR=red>*</FONT><B>Category History:</B> The number of hosts in each vulnerability/service
category, grouped by date
<DD>Title:<INPUT SIZE=40 NAME=ch_title VALUE="$ch_title">
<DD><INPUT TYPE=checkbox NAME=bar_cathistory $bar_cathistory_checked>Bar Graph
<DD><INPUT TYPE=checkbox NAME=table_cathistory $table_cathistory_checked>Table
</DL>
<P>
<INPUT TYPE=checkbox NAME=blackandwhite $blackandwhite_checked>
Black and White output
<P>
<INPUT TYPE=checkbox NAME=bar_values $bar_values_checked>
<FONT COLOR=red>*</FONT> Place values beside bars in bar graphs
<P>
<FONT COLOR=red>*</FONT> Axis labels for history charts:
<SELECT NAME=history_label>
<OPTION VALUE=0 $history_label_selected[0]>Month Date Year</OPTION>
<OPTION VALUE=1 $history_label_selected[1]>Month Date</OPTION>
<OPTION VALUE=2 $history_label_selected[2]>Month Year</OPTION>
<OPTION VALUE=3 $history_label_selected[3]>Ordinal numbers</OPTION>
<OPTION VALUE=4 $history_label_selected[4]>Data set name</OPTION>
</SELECT>
<P>
<DL>
<DT><FONT COLOR=red>*</FONT> When graphing Status of All, Current, and Old
Vulnerabilities, include:
<DD><INPUT TYPE=radio NAME=vulnstatus_redonly VALUE="off" $vulnstatus_redonly_off_checked> Red, yellow, and brown vulnerabilities
<DD><INPUT TYPE=radio NAME=vulnstatus_redonly VALUE="reverse" $vulnstatus_redonly_reverse_checked> Red and yellow vulnerabilities only
<DD><INPUT TYPE=radio NAME=vulnstatus_redonly VALUE="on" $vulnstatus_redonly_on_checked> Red vulnerabilities only
</DL>
<BLOCKQUOTE>
<INPUT TYPE=checkbox NAME=redonly_msg $redonly_msg_checked>
<FONT COLOR=red>*</FONT> Include a message informing the reader of the selection above
</BLOCKQUOTE>
Legend Text and Table Headers for <b>vulnerability</b> charts:
<BLOCKQUOTE>
Critical Problems (red):<INPUT SIZE=40 NAME=redlabel VALUE="$redlabel"><BR>
Areas of Concern (yellow):<INPUT SIZE=40 NAME=yellowlabel VALUE="$yellowlabel"><BR>
Potential Problems (brown):<INPUT SIZE=40 NAME=brownlabel VALUE="$brownlabel"><BR>
Services (green):<INPUT SIZE=40 NAME=greenlabel VALUE="$greenlabel"><BR>
</BLOCKQUOTE>
<P>
Legend Text and Table Headers for <b>host</b> charts:
<BLOCKQUOTE>
Hosts Detected:<INPUT SIZE=40 NAME=alllabel VALUE="$alllabel"><BR>
Critical Problems (red):<INPUT SIZE=40 NAME=redhostlabel VALUE="$redhostlabel"><BR>
Areas of Concern (yellow):<INPUT SIZE=40 NAME=yellowhostlabel VALUE="$yellowhostlabel"><BR>
Potential Problems (brown):<INPUT SIZE=40 NAME=brownhostlabel VALUE="$brownhostlabel"><BR>
Services (green):<INPUT SIZE=40 NAME=greenhostlabel VALUE="$greenhostlabel"><BR>
No Services (black):<INPUT SIZE=40 NAME=blackhostlabel VALUE="$blackhostlabel"><BR>
</BLOCKQUOTE>
<P>
<HR>
<A NAME="lists"><H2>Lists</H2></A>
<DL>
<DT><INPUT TYPE=checkbox NAME=host_list $host_list_checked>
<B>Host List</B>
<DD>Include a list of hosts and associated information.
<DD>Title:<INPUT SIZE=40 NAME=hl_title VALUE="$hl_title">
<DT><INPUT TYPE=checkbox NAME=vuln_list $vuln_list_checked>
<B>Vulnerability List</B>
<DD>Include a list of vulnerabilities and associated information.
<DD>Title:<INPUT SIZE=40 NAME=vl_title VALUE="$vl_title">
</DL>
<P>
<DL>
<DT>Columns to include in host list:
EOF
;
$i=1;
while($i<15) {
    $selected = "host_list_${i}_selected";
    print CLIENT "<DD>";
    print CLIENT "<FONT COLOR=red>*</FONT>" if $i>9;
    print CLIENT <<EOF
Column $i:<SELECT NAME=host_list_$i>
<OPTION VALUE=0>None</OPTION>
<OPTION VALUE=1 ${$selected}[1]>Hostname</OPTION>
<OPTION VALUE=2 ${$selected}[2]>Netbios Name</OPTION>
<OPTION VALUE=3 ${$selected}[3]>IP Address</OPTION>
<OPTION VALUE=4 ${$selected}[4]>Operating System</OPTION>
<OPTION VALUE=5 ${$selected}[5]>Number of reds</OPTION>
<OPTION VALUE=6 ${$selected}[6]>Number of yellows</OPTION>
<OPTION VALUE=7 ${$selected}[7]>Number of browns</OPTION>
<OPTION VALUE=8 ${$selected}[8]>Number of greens</OPTION>
<OPTION VALUE=9 ${$selected}[9]>Number of Top-20s</OPTION>
<OPTION VALUE=15 ${$selected}[15]>Scan time</OPTION>
<OPTION VALUE=16 ${$selected}[16]>* Status</OPTION>
<OPTION VALUE=17 ${$selected}[17]>* Recurrences</OPTION>
<OPTION VALUE=18 ${$selected}[18]>* Current recurrences</OPTION>
<OPTION VALUE=19 ${$selected}[19]>* Status/Severity x-ref (see below)</OPTION>
</SELECT>
EOF
;
    $i=$i+1;
}
print CLIENT "<DT>Columns to include in vulnerability list:\n";
$i=1;
while($i<13) {
    $selected = "vuln_list_${i}_selected";
    print CLIENT "<DD>";
    print CLIENT "<FONT COLOR=red>*</FONT>" if $i>9;
    print CLIENT <<EOF
Column $i:<SELECT NAME=vuln_list_$i>
<OPTION VALUE=0>None</OPTION>
<OPTION VALUE=1 ${$selected}[1]>Hostname</OPTION>
<OPTION VALUE=2 ${$selected}[2]>Netbios Name</OPTION>
<OPTION VALUE=3 ${$selected}[3]>IP Address</OPTION>
<OPTION VALUE=4 ${$selected}[4]>Operating System</OPTION>
<OPTION VALUE=10 ${$selected}[10]>Severity</OPTION>
<OPTION VALUE=11 ${$selected}[11]>Vuln. Description</OPTION>
<OPTION VALUE=12 ${$selected}[12]>Category</OPTION>
<OPTION VALUE=13 ${$selected}[13]>CVE Reference</OPTION>
<OPTION VALUE=14 ${$selected}[14]>SANS Top 20</OPTION>
<OPTION VALUE=16 ${$selected}[16]>* Status</OPTION>
<OPTION VALUE=17 ${$selected}[17]>* Recurrences</OPTION>
<OPTION VALUE=18 ${$selected}[18]>* Current recurrences</OPTION>
</SELECT>
EOF
;
    $i=$i+1;
}
print CLIENT <<EOF
<DT>Hosts to include in host list:
<DD><INPUT TYPE=checkbox NAME=redhosts $redhosts_checked><IMG SRC=\"$HTML_ROOT/dots/reddot.gif\" ALT=\"(RED)\"> hosts with critical vulnerabilities<BR>
<DD><INPUT TYPE=checkbox NAME=yellowhosts $yellowhosts_checked><IMG SRC=\"$HTML_ROOT/dots/yellowdot.gif\" ALT=\"(YELLOW)\"> hosts with areas of concern<BR>
<DD><INPUT TYPE=checkbox NAME=brownhosts $brownhosts_checked><IMG SRC=\"$HTML_ROOT/dots/browndot.gif\" ALT=\"(BROWN)\"> hosts with potential problems<BR>
<DD><INPUT TYPE=checkbox NAME=greenhosts $greenhosts_checked><IMG SRC=\"$HTML_ROOT/dots/greendot.gif\" ALT=\"(GREEN)\"> hosts with services<BR>
<DD><INPUT TYPE=checkbox NAME=emptyhosts $emptyhosts_checked><IMG SRC=\"$HTML_ROOT/dots/blackdot.gif\" ALT=\"(BLACK)\"> hosts with none of the above<BR>
<DD><INPUT TYPE=checkbox NAME=toptenhosts $toptenhosts_checked> hosts with vulnerabilities among SANS Top 20 Internet Security Vulnerabilities<BR>
<DT>Vulnerabilities to include in vulnerability list:
<DD>See <A HREF="#vulnerabilities">vulnerabilities</A> section.
</DL>
<P>
<INPUT TYPE=checkbox NAME=merge_cells $merge_cells_checked>Merge table cells where
possible.
<P>
<INPUT TYPE=checkbox NAME=numeric_severities $numeric_severities_checked>Show severity level as a number
between 0 and 3 instead of a word in the vulnerability list
<P>
<INPUT TYPE=checkbox NAME=separate_cves $separate_cves_checked>Put each CVE on
a separate line.
<P>
<INPUT TYPE=checkbox NAME=no_vulnerabilities $no_vulnerabilities_checked>Include all hosts
in vulnerability list, even if no vulnerabilities are shown
<BLOCKQUOTE>
Message to display if no vulnerabilities are shown:<BR>
<INPUT NAME=no_vulnerabilities_text SIZE=40 VALUE="$no_vulnerabilities_text">
</BLOCKQUOTE>
<FONT COLOR=red>*</FONT><B>Severity/Status cross-reference columns</B>
<BLOCKQUOTE>
Which status categories to cross-reference with severity categories:
<P><INPUT TYPE=checkbox NAME=cross_new $cross_new_checked> New
<BR><INPUT TYPE=checkbox NAME=cross_removed $cross_removed_checked> Removed
<BR><INPUT TYPE=checkbox NAME=cross_existing $cross_existing_checked> Pre-existing
<BR><INPUT TYPE=checkbox NAME=cross_reintroduced $cross_reintroduced_checked> Reintroduced
<P>Which severity categories to cross-reference with status categories:
<P><INPUT TYPE=checkbox NAME=cross_red $cross_red_checked> Red
<BR><INPUT TYPE=checkbox NAME=cross_yellow $cross_yellow_checked> Yellow
<BR><INPUT TYPE=checkbox NAME=cross_brown $cross_brown_checked> Brown
<BR><INPUT TYPE=checkbox NAME=cross_green $cross_green_checked> Green
</BLOCKQUOTE>
<HR>
<A NAME="technical"><H2>Technical Details</H2></A>
<INPUT TYPE=radio NAME="tech_details" VALUE="on" $tech_details_on_checked>
Show technical details under each vulnerability.
<BR><INPUT TYPE=radio NAME="tech_details" VALUE="reverse" $tech_details_reverse_checked>
Show technical details in an appendix. (Will be hyperlinked from the
<A HREF="#lists">Vulnerability List</A> if the <A HREF="#format">format</A> is HTML.)
<BR><INPUT TYPE=radio NAME="tech_details" VALUE="off" $tech_details_off_checked>
Do not show technical details.
<P>
<INPUT TYPE=radio NAME=host_info_always VALUE="on" $host_info_always_on_checked>
Show host information with each vulnerability.
<BR><INPUT TYPE=radio NAME=host_info_always VALUE="off" $host_info_always_off_checked>
Show host information only once per host.
<P>
<INPUT TYPE=checkbox NAME=empty_host_details VALUE="on" $empty_host_details_checked>
Include host information in technical details section even
if no vulnerabilities or services are reported.
<P>
Information to include regarding each vulnerability:
<BLOCKQUOTE>
<DL><DT><INPUT TYPE=checkbox NAME=impact $impact_checked><B>Impact</B>
<DD>The potential damage if the vulnerability were to be
exploited by an attacker.
<DT><INPUT TYPE=checkbox NAME=background $background_checked><B>Background</B>
<DD>Background information about the service or application which contains
the vulnerability.
<DT><INPUT TYPE=checkbox NAME=problem $problem_checked><B>Problem</B>
<DD>Technical details about the vulnerability.
<DT><INPUT TYPE=checkbox NAME=resolution $resolution_checked><B>Resolution</B>
<DD>Instructions for fixing the vulnerability.
<DT><INPUT TYPE=checkbox NAME=references $references_checked><B>References</B>
<DD>Links to advisories, bulletins, and postings containing information
about the vulnerability.
<DT><INPUT TYPE=checkbox NAME=entire_tutorial $entire_tutorial_checked><B>All</B>
<DD>All available information.
</DL>
</BLOCKQUOTE>
<INPUT TYPE=checkbox NAME=host_detail_status $host_detail_status_checked>
<FONT COLOR=red>*</FONT> Include host status information with technical details
<BR><INPUT TYPE=checkbox NAME=vuln_detail_status $vuln_detail_status_checked>
<FONT COLOR=red>*</FONT> Include vulnerability status information with technical details
<HR>
<A NAME="vulnerabilities"><H2>Vulnerabilities</H2></A>
EOF
;
&find_saint_data();
$vuln_green = ();
$vuln_brown = ();
$vuln_yellow = ();
$vuln_red = ();
open (FACTS, "$facts_file");
while (<FACTS>) {
  chop;
  ($a, $b, $c, $d, $e, $f, $g, $h) = split(/\|/);
  if ($d eq "g") {
    $vuln_green{$h} = $h;
  } elsif ($d =~ /^z/) {
    $vuln_brown{$g} = $g;
  } elsif ($d =~ /^y/) {
    $vuln_yellow{$g} = $g;
  } elsif ($d ne "i" && $d ne "x" && $d ne "" && /ANY/) {
    $vuln_red{$g} = $g;
  }
}
close (FACTS);
print CLIENT "<P><DL><DT><INPUT TYPE=checkbox NAME=allreds $allreds_checked><IMG SRC=\"$HTML_ROOT/dots/reddot.gif\" ALT=\"(RED)\"> Show All Critical Vulnerabilities\n";
for (keys %vuln_red) {
  ($var = $_) =~ s/ /_/g;
  $var = "red_" . $var;
  $checked = ($$var eq "on") ? "checked" : "";
  print CLIENT "<DD><INPUT TYPE=checkbox NAME=$var $checked>$_\n";
}
print CLIENT "<P><DT><INPUT TYPE=checkbox NAME=allyellows $allyellows_checked><IMG SRC=\"$HTML_ROOT/dots/yellowdot.gif\" ALT=\"(YELLOW)\"> Show All Areas Of Concern\n";
for (keys %vuln_yellow) {
  ($var = $_) =~ s/ /_/g;
  $var = "yellow_" . $var;
  $checked = ($$var eq "on") ? "checked" : "";
  print CLIENT "<DD><INPUT TYPE=checkbox NAME=$var $checked>$_\n";
}
print CLIENT "<P><DT><INPUT TYPE=checkbox NAME=allbrowns $allbrowns_checked><IMG SRC=\"$HTML_ROOT/dots/browndot.gif\" ALT=\"(BROWN)\"> Show All Potential Problems\n";
for (keys %vuln_brown) {
  ($var = $_) =~ s/ /_/g;
  $var = "brown_" . $var;
  $checked = ($$var eq "on") ? "checked" : "";
  print CLIENT "<DD><INPUT TYPE=checkbox NAME=$var $checked>$_\n";
}
print CLIENT "<P><DT><INPUT TYPE=checkbox NAME=allgreens $allgreens_checked><IMG SRC=\"$HTML_ROOT/dots/greendot.gif\" ALT=\"(GREEN)\"> Show Services\n";
for (keys %vuln_green) {
  ($var = $_) =~ s/ /_/g;
  $var = "green_" . $var;
  $checked = ($$var eq "on") ? "checked" : "";
  print CLIENT "<DD><INPUT TYPE=checkbox NAME=$var $checked>$_\n";
}
print CLIENT <<EOF
<P><DT><FONT COLOR=red>*</FONT> Vulnerability status categories to include
(These selections will not affect totals.)
<DD><INPUT TYPE=checkbox NAME=show_nvulns $show_nvulns_checked> New
<DD><INPUT TYPE=checkbox NAME=show_evulns $show_evulns_checked> Pre-existing
<DD><INPUT TYPE=checkbox NAME=show_rvulns $show_rvulns_checked> Removed
<DD><INPUT TYPE=checkbox NAME=show_rivulns $show_rivulns_checked> Reintroduced
<P><DT><INPUT TYPE=checkbox NAME=alltoptens $alltoptens_checked>Show all vulnerabilities which are among SANS Top 20 Internet Security Vulnerabilities
<P><DT><INPUT TYPE=checkbox NAME=use_exclusions $use_exclusions_checked>Exclude ignored vulnerabilities from report
<DD>Exclusions filename: <INPUT SIZE=40 NAME=exclusions_file VALUE="$Exclusions::savefile">
</DL>
<HR>
<A NAME="hosts"><H2>Hosts</H2></A>
<INPUT TYPE=radio NAME=matchdomain VALUE=on $matchdomain_on_checked>Only show hosts which are in one of the following domains.
<BR><INPUT TYPE=radio NAME=matchdomain VALUE=reverse $matchdomain_reverse_checked>Only show hosts which are <i>not</i> in one of the following domains.
<BR><INPUT TYPE=radio NAME=matchdomain VALUE=off $matchdomain_off_checked>Do not filter by domain name.
<P>Enter list of domains separated by spaces.
<P><INPUT NAME=domains SIZE=40 VALUE="$domains">
<P>
<INPUT TYPE=radio NAME=matchip VALUE=on $matchip_on_checked>Only show hosts which are in the following address range.
<BR><INPUT TYPE=radio NAME=matchip VALUE=reverse $matchip_reverse_checked>Only show hosts which are <i>not</i> in the following address range.
<BR><INPUT TYPE=radio NAME=matchip VALUE=off $matchip_off_checked>Do not filter by IP address.
<P>Enter list of IP addresses and/or IP ranges separated by spaces. For example:
<BR><tt>192.168.1.1-192.168.1.128 192.168.3.7</tt>
<P><INPUT NAME=ipaddresses SIZE=40 VALUE="$ipaddresses">
<P>
<INPUT TYPE=radio NAME=matchos VALUE=on $matchos_on_checked>Only show hosts which are one of the following types.
<BR><INPUT TYPE=radio NAME=matchos VALUE=reverse $matchos_reverse_checked>Only show hosts which are <I>not</I> one of the following types.
<BR><INPUT TYPE=radio NAME=matchos VALUE=off $matchos_off_checked>Do not filter by host type.
<P><I>Note 1:</I> Substrings will be matched. For example, "Windows" will match
"Windows NT" or "Windows 95".
<BR><I>Note 2:</I> Host type information may be unavailable for some hosts,
especially if <i>nmap</i> was not installed when the scan took place.
<P>Enter list of host types separated by spaces. For example:
<BR><tt>Windows Linux Solaris</tt>
<P><INPUT NAME=hosttypes SIZE=40 VALUE="$hosttypes">
<DL>
<DT><FONT COLOR=red>*</FONT> Host status categories to include
(These selections will not affect totals.)
<DD><INPUT TYPE=checkbox NAME=show_nhosts $show_nhosts_checked> New
<DD><INPUT TYPE=checkbox NAME=show_ehosts $show_ehosts_checked> Pre-existing
<DD><INPUT TYPE=checkbox NAME=show_rhosts $show_rhosts_checked> Removed
<DD><INPUT TYPE=checkbox NAME=show_rihosts $show_rihosts_checked> Reintroduced
</DL>
<HR>
<A NAME="trend"><H2>Trend Analysis</H2></A>
<FONT COLOR=red>*</FONT> Choose which data sets to include in trend analysis.
The most recent of the selected scans will be used as the current scan.
If none are selected, the data set specified <A HREF="#advanced">below</A> will
be used instead.
<BLOCKQUOTE>
EOF
;
while(<results/*>) {
    if (-f "$_/facts") {
	s#results/##;
	$var = "dataset_" . $_;
	$checked = ($dataset{$_} eq "on") ? "checked" : "";
	print CLIENT "<INPUT TYPE=checkbox NAME=\"$var\" $checked> $_<BR>\n";
    }
}
print CLIENT <<EOF
</BLOCKQUOTE>
<INPUT TYPE=radio NAME=show_all_removed VALUE="on" $show_all_removed_on_checked>
<FONT COLOR=red>*</FONT> Include all removed hosts and vulnerabilities
<BR><INPUT TYPE=radio NAME=show_all_removed VALUE="off" $show_all_removed_off_checked>
<FONT COLOR=red>*</FONT> Include hosts and vulnerabilities removed in the current scan only
<P>
<INPUT TYPE=radio NAME=reintro_new VALUE="on" $reintro_new_on_checked>
<FONT COLOR=red>*</FONT> Classify reintroduced hosts and vulnerabilities as <I>new</I>
<BR><INPUT TYPE=radio NAME=reintro_new VALUE="reverse" $reintro_new_reverse_checked>
<FONT COLOR=red>*</FONT> Classify reintroduced hosts and vulnerabilities as <I>pre-existing</I>
<BR><INPUT TYPE=radio NAME=reintro_new VALUE="off" $reintro_new_off_checked>
<FONT COLOR=red>*</FONT> Create a separate category for reintroduced hosts and vulnerabilities
<P>
<INPUT TYPE=radio NAME=ignore_missing VALUE="off" $ignore_missing_off_checked>
<FONT COLOR=red>*</FONT> If a previously detected host is missing from a scan
set, assume it is removed (or reintroduced if it returns in a later scan).
<BR><INPUT TYPE=radio NAME=ignore_missing VALUE="on" $ignore_missing_on_checked>
<FONT COLOR=red>*</FONT> Ignore the fact that a host is missing from a scan.
Assume all data on missing hosts are the same as the previous scan, and do <I>not</I>
classify as removed or reintroduced.
<P>
Labels describing the status categories:
<DL>
<DT><B>New</B>
<DD>Hosts or vulnerabilities which were detected in the current
scan but were not detected in any previous scans
<DD><FONT COLOR=red>*</FONT> Label: <INPUT TYPE=text NAME=new_text VALUE="$new_text">
<DT><B>Pre-existing</B>
<DD>Hosts or vulnerabilities which were detected in the current
scan and the previous scan
<DD><FONT COLOR=red>*</FONT> Label: <INPUT TYPE=text NAME=existing_text VALUE="$existing_text">
<DT><B>Removed</B>
<DD>Hosts or vulnerabilities which were not detected in the current
scan but were detected in a previous scan
<DD><FONT COLOR=red>*</FONT> Label: <INPUT TYPE=text NAME=removed_text VALUE="$removed_text">
<DT><B>Reintroduced</B>
<DD>Hosts or vulnerabilities which were detected in the current
scan and an older scan, but not in the previous scan
<DD><FONT COLOR=red>*</FONT> Label: <INPUT TYPE=text NAME=reintro_text VALUE="$reintro_text">
<DT><B>Remaining</B>
<DD>Vulnerabilities which were detected in the previous
scan and again in the current scan (Synonym for pre-existing, used only in the
Status of Old Vulnerabilities chart)
<DD><FONT COLOR=red>*</FONT> Label: <INPUT TYPE=text NAME=remaining_text VALUE="$remaining_text">
</DL>
<HR>
<A NAME="sorting"><H2>Sorting</H2></A>
<P>
<I>Note:</I> Items will be sorted by the first sort key.
When the first sort keys are identical, the second sort
key, and then the third sort key will be used.
<P>
<DL>
<DT><B>Hosts</B>
EOF
;
$i=1;
while($i <= 3) {
    $selected = "host_sortkey${i}_selected";
    print CLIENT <<EOF
<DD>sort key $i:
<SELECT NAME=host_sortkey$i>
<OPTION VALUE="1" ${$selected}[1]>host name</OPTION>
<OPTION VALUE="2" ${$selected}[2]>netbios name</OPTION>
<OPTION VALUE="3" ${$selected}[3]>IP address</OPTION>
<OPTION VALUE="4" ${$selected}[4]>host type</OPTION>
<OPTION VALUE="5" ${$selected}[5]>severity / vuln. count</OPTION>
<OPTION VALUE="6" ${$selected}[6]>top 20 vuln. count</OPTION>
</SELECT>
EOF
;
    $i = $i + 1;
}
print CLIENT "<DT><B>Subnets</B>\n";
$i=1;
while($i <= 3) {
    $selected = "subnet_sortkey${i}_selected";
    print CLIENT <<EOF
<DD>sort key $i:
<SELECT NAME=subnet_sortkey$i>
<OPTION VALUE="3" ${$selected}[3]>IP address</OPTION>
<OPTION VALUE="5" ${$selected}[5]>severity / vuln. count</OPTION>
<OPTION VALUE="8" ${$selected}[8]>severity / host count</OPTION>
<OPTION VALUE="7" ${$selected}[7]>host count</OPTION>
</SELECT>
EOF
;
    $i = $i + 1;
}
print CLIENT <<EOF
<DT><B>Vulnerability Categories</B>
<DD>sort key:
<SELECT NAME=cat_sort_count>
<OPTION VALUE="off" $cat_sort_count_off_selected>category name</OPTION>
<OPTION VALUE="on" $cat_sort_count_on_selected>host count</OPTION>
</SELECT>
</DL>
<INPUT TYPE=checkbox NAME=invert_host_sort $invert_host_sort_checked>Reverse the host sort
<BR><INPUT TYPE=checkbox NAME=invert_subnet_sort $invert_subnet_sort_checked>Reverse the subnet sort
<P>
<HR>
<A NAME="format"><H2>Format</H2></A>
<P>
<INPUT TYPE=radio NAME=format VALUE=0 $format_checked[0]>HTML
<BR><INPUT TYPE=radio NAME=format VALUE=1 $format_checked[1]>Text
<BR><INPUT TYPE=radio NAME=format VALUE=2 $format_checked[2]>Tab-separated lists
<BR><INPUT TYPE=radio NAME=format VALUE=3 $format_checked[3]>Comma-separated lists
<P>
<HR>
<A NAME="advanced"><H2>Other Options</H2>
SAINT data directory <INPUT TYPE=text SIZE=40 NAME=data_dir VALUE=$saint_data>
<P><INPUT TYPE=radio NAME=short_severities VALUE=on $short_severities_on_checked>
Show severity levels as "red", "yellow", etc.
<BR><INPUT TYPE=radio NAME=short_severities VALUE=off $short_severities_off_checked>
Show severity levels as "Critical Problems", etc.
<P>
<INPUT TYPE=checkbox NAME=countall $countall_checked>Count all hosts, even if some are not shown in report.
<P>
<INPUT TYPE=checkbox NAME=combine_categories $combine_categories_checked>If any of the vulnerability categories
appear under more than one severity level, treat them as the same category. For example, if "FTP vulnerabilities"
appears under both red and brown, and <i>either one</i> is selected, then include <i>all</i> FTP vulnerabilities
and group <i>all</i> FTP vulnerabilities together in the category table. 
<P>
<INPUT TYPE=checkbox NAME=show_url $show_url_checked>Show reference URLs instead of hyperlinks
in HTML tutorials
<P>
<INPUT TYPE=checkbox NAME=riskwatch $riskwatch_checked>
<FONT COLOR=red>*</FONT> Export results to RiskWatch
<HR>
<A NAME="go"><H2>Go!</H2></A>
Save changes and generate the report.
<INPUT TYPE="submit" VALUE="Go">
<P>
<FONT COLOR=red>*</FONT> indicates options which require SAINTwriter&#153; 2.0 or higher
</FORM>
	  </TD>
	</TR>
</TABLE>
</BODY>
</HTML>
EOF
;
}
1;
