From 1891313532c369d836404ce68cc08a85cbe6e3f2 Mon Sep 17 00:00:00 2001 From: Ermal Date: Mon, 9 Jul 2012 14:16:53 +0000 Subject: Some small fixes to cleanup --- config/snort/snort_blocked.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'config/snort/snort_blocked.php') diff --git a/config/snort/snort_blocked.php b/config/snort/snort_blocked.php index c5c0e478..aedb3dc0 100644 --- a/config/snort/snort_blocked.php +++ b/config/snort/snort_blocked.php @@ -80,7 +80,7 @@ if ($_POST['download']) file_put_contents("/tmp/snort_blocked/snort_block.pf", "{$fileline}\n", FILE_APPEND); } - exec("/usr/bin/tar cfz /tmp/snort_blocked_{$save_date}.tar.gz /tmp/snort_blocked"); + exec("/usr/bin/tar cf /tmp/{$file_name} /tmp/snort_blocked"); if(file_exists("/tmp/{$file_name}")) { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT\n"); @@ -92,8 +92,8 @@ if ($_POST['download']) header("Content-disposition: attachment; filename = {$file_name}"); readfile("/tmp/{$file_name}"); ob_end_clean(); //importanr or other post will fail - @unlink("/tmp/snort_blocked_{$save_date}.tar.gz"); - @unlink("/tmp/snort_blocked/snort_block.pf"); + @unlink("/tmp/{$file_name}"); + exec("/bin/rm -fr /tmp/snort_blocked"); } else $savemsg = "An error occurred while createing archive"; } else -- cgit v1.2.3