##############################################################################################
# uagen (http://www.fabiankeil.de/sourcecode/uagen/)
#
-# $Id: uagen.pl,v 1.11 2011/03/08 18:43:46 fabiankeil Exp $
+# $Id: uagen.pl,v 1.14 2011/06/29 18:35:53 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)'.
# Mozilla/5.0 (X11; U; OpenBSD sparc64; pl-PL; rv:1.8.0.2) Gecko/20060429 Firefox/1.5.0.2
# Mozilla/5.0 (X11; U; Linux i686; en-CA; rv:1.8.0.2) Gecko/20060413 Firefox/1.5.0.2
#
-# Copyright (c) 2006-2009 Fabian Keil <fk@fabiankeil.de>
+# Copyright (c) 2006-2011 Fabian Keil <fk@fabiankeil.de>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
use constant {
- UAGEN_VERSION => 'uagen 1.0.10',
+ UAGEN_VERSION => 'uagen 1.1',
UAGEN_LOGFILE => '/var/log/uagen.log',
ACTION_FILE => '/etc/privoxy/user-agent.action',
# 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.15",
- BROWSER_REVISION => '1.9.2.15',
- BROWSER_RELEASE_DATE => '20110305',
+ BROWSER_VERSION => "5.0",
+ BROWSER_REVISION => '5.0',
+ BROWSER_RELEASE_DATE => '20100101',
};
use constant LANGUAGES => qw(
my ($rel_year, $rel_mon, $rel_day);
my ($c_day, $c_mon, $c_year);
my $now = time;
- my ( $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst ) =
- localtime $now;
+ my (undef, undef, undef, $mday, $mon, $year, undef, undef, undef) = localtime($now);
$mon += 1;
$year += 1900;
$c_seconds = $now - (int rand ($now - $c_seconds));
@c_time = localtime $c_seconds;
- ($sec, $min, $hour, $c_day, $c_mon, $c_year, $wday, $yday, $isdst) = @c_time;
+ (undef, undef, undef, $c_day, $c_mon, $c_year, undef, undef, undef) = @c_time;
$c_mon += 1;
$c_year += 1900;
}
sub VersionMessage() {
- printf UAGEN_VERSION . "\n" . 'Copyright (C) 2006-2009 Fabian Keil <fk@fabiankeil.de> ' .
+ printf UAGEN_VERSION . "\n" . 'Copyright (C) 2006-2011 Fabian Keil <fk@fabiankeil.de> ' .
"\nhttp://www.fabiankeil.de/sourcecode/uagen/\n";
}