##############################################################################################
# uagen (http://www.fabiankeil.de/sourcecode/uagen/)
#
-# $Id: uagen.pl,v 1.7 2010/10/30 15:57:26 fabiankeil Exp $
+# $Id: uagen.pl,v 1.10 2010/12/11 15:54:30 fabiankeil Exp $
#
# Generates a pseudo-random Firefox user agent and writes it into a Privoxy action file
# and optionally into a Mozilla prefs file. For documentation see 'perldoc uagen(.pl)'.
# are too lazy to check, but want to change them anyway, take the values you
# see in the "Help/About Mozilla Firefox" menu.
- BROWSER_VERSION => "3.6.12",
- BROWSER_REVISION => '1.9.2.12',
- BROWSER_RELEASE_DATE => '20101028',
+ BROWSER_VERSION => "3.6.15",
+ BROWSER_REVISION => '1.9.2.15',
+ BROWSER_RELEASE_DATE => '20110305',
};
use constant LANGUAGES => qw(
our $action_injection;
my $action_file_content = '';
- my $actionfile_fd;
if ($action_injection){
- open($actionfile_fd, $action_file)
+ open(my $actionfile_fd, "<", $action_file)
or log_error "Reading action file $action_file failed!";
while (<$actionfile_fd>) {
s@(hide-accept-language\{).*?(\})@$1$accept_language$2@;
$action_file_content .= sprintf " +hide-user-agent{%s} \\\n}\n/\n",
$user_agent;
}
- open($actionfile_fd, ">" . $action_file)
+ open(my $actionfile_fd, ">" . $action_file)
or log_error "Writing action file $action_file failed!";
print $actionfile_fd $action_file_content;
close($actionfile_fd);