aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-08-04 22:12:54 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-08-04 22:12:54 +0000
commit101775ca237e99eefae35d623e214edb01f1963e (patch)
treee0356660f0ab1bc1e56e3e02f8079de8c3eca76c
parentd29f985c6e72e4906810ccd919ae3913b658ddb4 (diff)
downloadpfsense-packages-101775ca237e99eefae35d623e214edb01f1963e.tar.gz
pfsense-packages-101775ca237e99eefae35d623e214edb01f1963e.tar.bz2
pfsense-packages-101775ca237e99eefae35d623e214edb01f1963e.zip
Pretend we are Mozilla so that we can communicate with snort.org.
-rw-r--r--packages/snort/snort_download_rules.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/snort/snort_download_rules.php b/packages/snort/snort_download_rules.php
index e69aa8d1..8d9f7e54 100644
--- a/packages/snort/snort_download_rules.php
+++ b/packages/snort/snort_download_rules.php
@@ -95,6 +95,7 @@ include("head.inc");
echo "</div>\n";
ob_flush();
sleep(1);
+ ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)');
$text = file_get_contents("http://www.snort.org/pub-bin/downloads.cgi");
echo "<script type=\"text/javascript\">\n";
echo "$('loading').style.visibility = 'hidden';\n";
@@ -191,12 +192,14 @@ exec("/bin/rm -rf {$tmpfname};/bin/mkdir -p {$tmpfname}");
/* download snort rules */
$static_output = gettext("Downloading current snort rules... ");
update_all_status($static_output);
+ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)');
download_file_with_progress_bar($dl, $tmpfname . "/{$snort_filename}");
verify_downloaded_file($tmpfname . "/{$snort_filename}");
/* download snort rules md5 file */
$static_output = gettext("Downloading current snort rules md5... ");
update_all_status($static_output);
+ini_set('user_agent','Mozilla/4.0 (compatible; MSIE 6.0)');
download_file_with_progress_bar($dl_md5, $tmpfname . "/{$snort_filename_md5}");
verify_downloaded_file($tmpfname . "/{$snort_filename_md5}");