diff options
author | robiscool <robrob2626@yahoo.com> | 2011-05-10 07:50:22 -0700 |
---|---|---|
committer | robiscool <robrob2626@yahoo.com> | 2011-05-10 07:54:02 -0700 |
commit | 93d9d427d22f6d9d15e7edaaada2d6850686a060 (patch) | |
tree | 8566e33b4f5aad185f60e45cdc79baa905087a47 /config/snort-dev/testing.php | |
parent | 1767a26f91ffe441474ea5f2f3676206eacc468b (diff) | |
download | pfsense-packages-93d9d427d22f6d9d15e7edaaada2d6850686a060.tar.gz pfsense-packages-93d9d427d22f6d9d15e7edaaada2d6850686a060.tar.bz2 pfsense-packages-93d9d427d22f6d9d15e7edaaada2d6850686a060.zip |
snort-dev, add interfaces edit tab, update code
Diffstat (limited to 'config/snort-dev/testing.php')
-rw-r--r-- | config/snort-dev/testing.php | 58 |
1 files changed, 16 insertions, 42 deletions
diff --git a/config/snort-dev/testing.php b/config/snort-dev/testing.php index 20411304..f36a9edd 100644 --- a/config/snort-dev/testing.php +++ b/config/snort-dev/testing.php @@ -1,52 +1,26 @@ <?php -//require_once("/usr/local/pkg/snort/snort_new.inc"); - - -// fetch db Settings NONE Json -function snortSql_fetchAllSettings($dbrule, $table, $type, $id_uuid) -{ - - if ($table == '') - { - return false; - } - - $db = sqlite_open("/usr/local/pkg/snort/$dbrule"); - - if ($type == 'id') - { - $result = sqlite_query($db, - "SELECT * FROM {$table} where id = '{$id_uuid}'; - "); - } - - if ($type == 'uuid') - { - $result = sqlite_query($db, - "SELECT * FROM {$table} where uuid = '{$id_uuid}'; - "); - } - - $chktable = sqlite_fetch_array($result, SQLITE_ASSOC); - - sqlite_close($db); - - return $chktable; - - -} // end func - - - -$generalSettings = snortSql_fetchAllSettings('snortDB', 'SnortWhitelist', 'uuid', '2565656'); +require_once("/usr/local/pkg/snort/snort_new.inc"); + +// set page vars + +$a_whitelist = snortSql_fetchAllWhitelistTypes('SnortWhitelist', 'SnortWhitelistips'); + +$a_suppresslist = snortSql_fetchAllWhitelistTypes('SnortSuppress', ''); + +//$a_whitelist = snortSql_fetchAllSettings('snortDBrules', 'Snortrules', 'uuid', '42770'); echo '<pre>' . "\n\n"; - print_r($generalSettings); + print_r($a_suppresst); + + //foreach ($a_whitelist as $value) + //{ + //echo $value['filename'] . "\n"; + //} echo "\n" . '</pre>'; - + ?> |