diff options
author | robiscool <robrob2626@yahoo.com> | 2011-08-09 10:04:28 -0700 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2011-08-09 10:04:28 -0700 |
commit | 7757b8de6deea0db6a75cb60cd41745aecacba36 (patch) | |
tree | c97a25087508f9224e1f2e673ba7ddf273e89be8 /config/orionids-dev/snort_rules_ips.php | |
parent | 1fae858397c86fc20ea0678e756f1310cc054e35 (diff) | |
download | pfsense-packages-7757b8de6deea0db6a75cb60cd41745aecacba36.tar.gz pfsense-packages-7757b8de6deea0db6a75cb60cd41745aecacba36.tar.bz2 pfsense-packages-7757b8de6deea0db6a75cb60cd41745aecacba36.zip |
orionids-dev, finally finished sig ips db gui, start snortsam.conf work
Diffstat (limited to 'config/orionids-dev/snort_rules_ips.php')
-rw-r--r-- | config/orionids-dev/snort_rules_ips.php | 43 |
1 files changed, 13 insertions, 30 deletions
diff --git a/config/orionids-dev/snort_rules_ips.php b/config/orionids-dev/snort_rules_ips.php index 618a684a..d026b566 100644 --- a/config/orionids-dev/snort_rules_ips.php +++ b/config/orionids-dev/snort_rules_ips.php @@ -84,24 +84,7 @@ if (isset($_GET['rulefilename'])) { } -function snortSearchArray($array, $key, $value) -{ - $results = array(); - - if (is_array($array)) - { - foreach ($array as $subarray) - { - if ($subarray[$key] == $value) { - $results = $subarray; - } - - } - - } - - return $results; -} + // get default settings $listGenRules = array(); @@ -111,6 +94,18 @@ $listGenRules = snortSql_fetchAllSettings('snortDBrules', 'SnortruleGenIps', 'rd $listSigRules = array(); $listSigRules = snortSql_fetchAllSettings('snortDBrules', 'SnortruleSigsIps', 'rdbuuid', $rdbuuid); +// if $listGenRules empty list defaults +if (empty($listGenRules)) { + $listGenRules[0] = array( + 'id' => 1, + 'rdbuuid' => $_POST['rdbuuid'], + 'enable' => 'on', + 'who' => 'src', + 'timeamount' => 15, + 'timetype' => 'minutes' + ); +} + $pgtitle = "Services: Snort: Ruleset Ips:"; include("/usr/local/pkg/snort/snort_head.inc"); @@ -273,18 +268,6 @@ jQuery(document).ready(function() { */ function createSidTmpBlockSpit($rdbuuid, $rulefilename) { - - function getCurrentIpsRuleArray($output) - { - - foreach (array_unique($output) as $line) - { - $newOutput = explode(' # ', $line); - $newLine[] = $newOutput; - } - - return $newLine; - } function getSidBlockJsonArray($getEnableSid) { |