From b1f3a863bdb6fbfc252c542a81f567b070282b1e Mon Sep 17 00:00:00 2001 From: bmeeks8 Date: Fri, 3 Oct 2014 22:40:17 -0400 Subject: Replace exec() calls with PHP native functions where possible. --- config/suricata/suricata_blocked.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'config/suricata/suricata_blocked.php') diff --git a/config/suricata/suricata_blocked.php b/config/suricata/suricata_blocked.php index 61422b4d..c3a0c1e3 100644 --- a/config/suricata/suricata_blocked.php +++ b/config/suricata/suricata_blocked.php @@ -96,9 +96,9 @@ if ($_POST['download']) exec("/sbin/pfctl -t {$suri_pf_table} -T show", $blocked_ips_array_save); /* build the list */ if (is_array($blocked_ips_array_save) && count($blocked_ips_array_save) > 0) { - $save_date = exec('/bin/date "+%Y-%m-%d-%H-%M-%S"'); + $save_date = date("Y-m-d-H-i-s"); $file_name = "suricata_blocked_{$save_date}.tar.gz"; - exec("/bin/mkdir -p {$g['tmp_path']}/suricata_blocked"); + safe_mkdir("{$g['tmp_path']}/suricata_blocked"); file_put_contents("{$g['tmp_path']}/suricata_blocked/suricata_block.pf", ""); foreach($blocked_ips_array_save as $counter => $fileline) { if (empty($fileline)) -- cgit v1.2.3