On Saturday 16 October 2004 07:02, Derek Fage (lists account) wrote:
>
> I've got flow-report working to do allow me to easily identify IP addresses
> that are the target of a DDoS attack and it seems to be working fine, and I
> now want to build this into a web page so we can do some automated checking
> using existing SiteScope tools.
>
> What I really want to do is to simply output to screen rather than to file,
Wrap the flow-report command line in a script and run it from the web servers'
cgi-bin. The output will only print to the web page and no output file
created. The skeleton below is Perl but you can use anything you want. This
is assuming that flow-tools and the collected flow files are available to the
web server.
________________________
#!/usr/bin/perl
# put your command here \/ \/
my $CMD = "/usr/local/netflow/flow-report ...." ;
# HTML page
print <<"EOT";
<html>
<head>
<title>Flow Report Output Title of Your Choice</title>
</head>
<body bgcolor="#FFFFE0" text="#000000">
<pre>
EOT
# enough HTML for now
# execute the command and pipe results back
open(FH, "$CMD |") or die "could not execute $CMD";
while(<FH>) {
print $_ ;
}
# Finish HTML
print <<"EOT" ;
</pre>
<p>End of Report</p>
<p>Generated using Mark Fullmer's Flow-Tools</p>
</body>
</html>
EOT
exit ;
_______________________________________________
Flow-tools mailing list
[EMAIL PROTECTED]
http://mailman.splintered.net/mailman/listinfo/flow-tools