aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata/suricata_blocked.php
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-03 22:40:17 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-15 12:04:39 -0500
commitb1f3a863bdb6fbfc252c542a81f567b070282b1e (patch)
treee52a6aacccc675cb02ce91fc1400530d10d6f185 /config/suricata/suricata_blocked.php
parent23933b62da3f2f0cf3c3cd3cca815a3ee31cc748 (diff)
downloadpfsense-packages-b1f3a863bdb6fbfc252c542a81f567b070282b1e.tar.gz
pfsense-packages-b1f3a863bdb6fbfc252c542a81f567b070282b1e.tar.bz2
pfsense-packages-b1f3a863bdb6fbfc252c542a81f567b070282b1e.zip
Replace exec() calls with PHP native functions where possible.
Diffstat (limited to 'config/suricata/suricata_blocked.php')
-rw-r--r--config/suricata/suricata_blocked.php4
1 files changed, 2 insertions, 2 deletions
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))