diff options
-rw-r--r-- | config/suricata/suricata_defs.inc | 12 | ||||
-rw-r--r-- | config/suricata/suricata_interfaces.php | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/config/suricata/suricata_defs.inc b/config/suricata/suricata_defs.inc index 5467f88c..29e0a368 100644 --- a/config/suricata/suricata_defs.inc +++ b/config/suricata/suricata_defs.inc @@ -52,7 +52,7 @@ if (!is_array($config['installedpackages']['suricata'])) $config['installedpackages']['suricata'] = array(); /* Get installed package version for display */ -$suricata_package_version = "Suricata {$config['installedpackages']['package'][get_pkg_id("suricata")]['version']}"; +$suricata_package_version = "{$config['installedpackages']['package'][get_pkg_id("suricata")]['version']}"; // Define the installed package version if (!defined('SURICATA_PKG_VER')) @@ -71,6 +71,16 @@ if (!defined('SURICATA_PBI_BASEDIR')) { if (!defined('SURICATA_PBI_BINDIR')) define('SURICATA_PBI_BINDIR', SURICATA_PBI_BASEDIR . 'bin/'); +if (!defined("SURICATA_BIN_VERSION")) { + // Grab the Suricata binary version programmatically + $suricatabindir = SURICATA_PBI_BINDIR; + $suricataver = exec_command("{$suricatabindir}suricata -V 2>&1 |/usr/bin/cut -c26-"); + if (!empty($suricataver)) + define("SURICATA_BIN_VERSION", $suricataver); + else + define("SURICATA_BIN_VERSION", ""); +} + // Define the name of the pf table used for IP blocks if (!defined('SURICATA_PF_TABLE')) define('SURICATA_PF_TABLE', 'snort2c'); diff --git a/config/suricata/suricata_interfaces.php b/config/suricata/suricata_interfaces.php index e996a24f..39291803 100644 --- a/config/suricata/suricata_interfaces.php +++ b/config/suricata/suricata_interfaces.php @@ -145,8 +145,9 @@ if ($_POST['toggle']) { header("Location: /suricata/suricata_interfaces.php"); exit; } +$suri_bin_ver = SURICATA_BIN_VERSION; $suri_pkg_ver = SURICATA_PKG_VER; -$pgtitle = "Services: {$suri_pkg_ver} - Intrusion Detection System"; +$pgtitle = "Services: Suricata {$suri_bin_ver} pkg v{$suri_pkg_ver} - Intrusion Detection System"; include_once("head.inc"); ?> |