From 1504a375179cecc182dd40b8a5324eb2c1320ada Mon Sep 17 00:00:00 2001 From: Stefan Schantl Date: Tue, 19 Dec 2017 11:56:04 +0100 Subject: [PATCH] ids.cgi: Rework snort configuration area Signed-off-by: Stefan Schantl --- html/cgi-bin/ids.cgi | 124 +++++++++++++++++++++++++++---------------- 1 file changed, 78 insertions(+), 46 deletions(-) diff --git a/html/cgi-bin/ids.cgi b/html/cgi-bin/ids.cgi index 80ef2343e7..917cf29932 100644 --- a/html/cgi-bin/ids.cgi +++ b/html/cgi-bin/ids.cgi @@ -390,65 +390,97 @@ if ($errormessage) { } &Header::openbox('100%', 'left', $Lang::tr{'intrusion detection system'}); + +my $rulesdate; + +# Check if a ruleset allready has been downloaded. +if ( -f "$rulestarball"){ + # Call stat on the filename to obtain detailed information. + my @Info = stat("$rulestarball"); + + # Grab details about the creation time. + $rulesdate = localtime($Info[9]); +} + print < - + + + + + + + + + + + + + + +
GREEN Snort +
+ + + + + + + \n"; + +print " - - - - - - - - + + + + + + + + + + + + - - - - - - - - - "; - -print < -
+ RED Snort + + GREEN Snort + END ; -if ($netsettings{'BLUE_DEV'} ne '') { - print "       BLUE Snort"; + +# Check if a blue device is configured. +if ($netsettings{'BLUE_DEV'}) { + print "BLUE Snort\n"; } -if ($netsettings{'ORANGE_DEV'} ne '') { - print "       ORANGE Snort"; + +print "\n"; + +# Check if an orange device is configured. +if ($netsettings{'ORANGE_DEV'}) { + print "ORANGE Snort\n"; } - print "       RED Snort"; print <


$Lang::tr{'ids rules update'}


$Lang::tr{'ids rules update'}
-

- $Lang::tr{'ids rules license'} www.snort.org$Lang::tr{'ids rules license1'}

- $Lang::tr{'ids rules license2'} Get an Oinkcode, $Lang::tr{'ids rules license3'} -
Oinkcode: 

-END -; -if ( -e "/var/tmp/snortrules.tar.gz"){ - my @Info = stat("/var/tmp/snortrules.tar.gz"); - $snortsettings{'INSTALLDATE'} = localtime($Info[9]); -} -print " $Lang::tr{'updates installed'}: $snortsettings{'INSTALLDATE'}
-

- - - - -
+
+
$Lang::tr{'ids rules license'} www.snort.org$Lang::tr{'ids rules license1'}
+
$Lang::tr{'ids rules license2'} Get an Oinkcode, $Lang::tr{'ids rules license3'}
+
Oinkcode: 

+  $Lang::tr{'updates installed'}: $rulesdate +
+ +

+ + + + + +
END ; -- 2.39.2