diff options
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>'; - + ?> |