From dc5d3683c84a74869fb36f20037204048b000040 Mon Sep 17 00:00:00 2001 From: robiscool Date: Tue, 24 Nov 2009 12:22:29 -0800 Subject: snort-dev, add if snort is running add color disply, error checking for snort_interface_edit.php --- config/snort-dev/NOTES.txt | 9 +++++++++ config/snort-dev/help_and_info.html | 1 + config/snort-dev/snort.inc | 2 +- config/snort-dev/snort_interfaces.php | 25 +++++++++++++++++++++++-- config/snort-dev/snort_interfaces_edit.php | 10 +++++++--- 5 files changed, 41 insertions(+), 6 deletions(-) diff --git a/config/snort-dev/NOTES.txt b/config/snort-dev/NOTES.txt index fa3eb844..9b4d8d0e 100644 --- a/config/snort-dev/NOTES.txt +++ b/config/snort-dev/NOTES.txt @@ -18,6 +18,15 @@ Move the Snort GUI to base of Pfsense. The divert options should be added to fir Ask Ermal to add divert out to Pfsense again though, he has kept divert in. +===================== +What Im working on +===================== + +snort.inc +Must be recoded so that it reads the [snortglobal] [snortglobal][rule] options in conf.xml and makes the files whitelist, snort.sh, snort.conf, and barnyard.conf. +This is easy, just cut and paste from the old snort.inc. I will work on this. + + ================================= Any Devs that would like to help please work on snort_rules_edit.php and snort_rules.php. They work but need cleaning up. ================================= diff --git a/config/snort-dev/help_and_info.html b/config/snort-dev/help_and_info.html index fc506f93..894d647f 100644 --- a/config/snort-dev/help_and_info.html +++ b/config/snort-dev/help_and_info.html @@ -3,6 +3,7 @@ Help & Info + diff --git a/config/snort-dev/snort.inc b/config/snort-dev/snort.inc index 76754ee4..4e582d7a 100644 --- a/config/snort-dev/snort.inc +++ b/config/snort-dev/snort.inc @@ -239,7 +239,7 @@ rc_start() { /usr/local/bin/php -f /usr/local/pkg/pf/snort_dynamic_ip_reload.php $id $if_real /bin/kill -HUP \${snort_pid} sleep 3 - AFTER_MEM=`/usr/bin/top | /usr/bin/grep Wired | /usr/bin/awk '{print $12}'` + AFTER_MEM=`/usr/bin/top | /usr/bin/grep Wired | /usr/bin/awk '{print $2}'` /bin/cp /var/log/system.log /var/log/snort/snort_sys_$if_real.log /bin/killall syslogd /usr/sbin/clog -i -s 262144 /var/log/system.log diff --git a/config/snort-dev/snort_interfaces.php b/config/snort-dev/snort_interfaces.php index fc640df0..6a275ca7 100644 --- a/config/snort-dev/snort_interfaces.php +++ b/config/snort-dev/snort_interfaces.php @@ -161,6 +161,17 @@ border-top:2px solid #DBAC48; border-bottom:2px solid #DBAC48; padding: 15px 10px 50% 50px; } +.listbg2 { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #090; + color: #000; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} @@ -215,7 +226,17 @@ padding: 15px 10px 50% 50px; - + + diff --git a/config/snort-dev/snort_interfaces_edit.php b/config/snort-dev/snort_interfaces_edit.php index 8467dfb4..410bb02b 100644 --- a/config/snort-dev/snort_interfaces_edit.php +++ b/config/snort-dev/snort_interfaces_edit.php @@ -119,9 +119,13 @@ if ($_POST["Submit"]) { // $input_errors[] = "The target port range must be an integer between 1 and 65535."; // } -// if ($a_nat[$id]['performance'] == "lowmem") { -// $input_errors[] = "This is a test of error echecking"; -// } + if ($_POST['interface'] == $pconfig['interface']) { + $input_errors[] = "The {$pconfig['interface']} interface is in use. Please select another interface."; + } + + if ($pconfig['descr'] == "") { + $input_errors[] = "Please enter a description for your reference."; + } /* check for overlaps */ -- cgit v1.2.3