#  This software was derived from SATAN 1.1.1 by Dan Farmer and Wietse Venema
#  (http://www.porcupine.org/satan).
#
#
# Report all internet domains.
#
print CLIENT <<EOF;
<HTML>
<HEAD>
<SCRIPT language="JavaScript">
  function movepic(img_name,img_src) {
  document[img_name].src=img_src;
}
</SCRIPT>
<title> Host Tables - by Internet Domain </title>
<LINK REV="made" HREF="mailto:satan\@fish.com">
<LINK REV="made" HREF="mailto:sara\@arc.com">
</HEAD>
<BODY>
EOF
if ($pi_menu) {
  $screen = &$pi_menu;
} else {
  $screen = print_menu();
}
$screen =~ s/\\n/\n/g;
print CLIENT $screen;
print CLIENT <<EOF;
</TD><TD valign=top>
<CENTER><H1>Host Tables - by Internet Domain </H1></CENTER>
<hr>
<h3>Number of hosts per internet domain (vulnerable/total).</h3>
<strong>Domains with a red dot next to them have a vulnerable host contained within.</strong>
<ul>
EOF

&make_domain_info() ;

for (sort keys %all_domains) {
	next if (!$_);
	$_dot = $domain_severities{$_} ? "reddot" : "blackdot";
	$_alt = $domain_severities{$_} ? "*" : "-";
	print CLIENT <<EOF;
	<dt><IMG SRC=$HTML_ROOT/dots/$_dot.gif ALT="$_alt"> 
	<a href="sara_results_domain.pl,$_,"> $_</a>
	($domain_severities{$_}/$domain_count{$_})
EOF
}

print CLIENT <<EOF;
</ul>
EOF

if (sizeof(*all_domains) == 0) {
	print CLIENT <<EOF;
	No domain information available.
EOF
}

print CLIENT <<EOF;
</ul>
<hr> <a href="/"> Back to the SARA start page </a> |
<a href=/reporting/analysis.pl> Back to SARA Reporting and Analysis </a>
</UL></UL></TABLE>
</BODY>
</HTML>
EOF
