projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove a useless SCCS marker
[privoxy.git]
/
tools
/
uagen.pl
diff --git
a/tools/uagen.pl
b/tools/uagen.pl
index
404e903
..
8e5f4ee
100755
(executable)
--- a/
tools/uagen.pl
+++ b/
tools/uagen.pl
@@
-3,7
+3,7
@@
##############################################################################################
# uagen (http://www.fabiankeil.de/sourcecode/uagen/)
#
##############################################################################################
# uagen (http://www.fabiankeil.de/sourcecode/uagen/)
#
-# $Id: uagen.pl,v 1.
18 2011/11/13 16:55:32
fabiankeil Exp $
+# $Id: uagen.pl,v 1.
24 2012/10/21 13:42:46
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)'.
#
# 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)'.
@@
-40,7
+40,7
@@
use Getopt::Long;
use constant {
use constant {
- UAGEN_VERSION => 'uagen 1.1',
+ UAGEN_VERSION => 'uagen 1.
2.
1',
UAGEN_LOGFILE => '/var/log/uagen.log',
ACTION_FILE => '/etc/privoxy/user-agent.action',
UAGEN_LOGFILE => '/var/log/uagen.log',
ACTION_FILE => '/etc/privoxy/user-agent.action',
@@
-60,8
+60,8
@@
use constant {
# are too lazy to check, but want to change them anyway, take the values you
# see in the "Help/About Mozilla Firefox" menu.
# 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 => "1
0.0.3
",
- BROWSER_REVISION => '1
0.0.3
',
+ BROWSER_VERSION => "1
7.0
",
+ BROWSER_REVISION => '1
7.0
',
BROWSER_RELEASE_DATE => '20100101',
};
BROWSER_RELEASE_DATE => '20100101',
};
@@
-234,7
+234,7
@@
sub log_to_file($) {
return if $no_logging;
return if $no_logging;
- open(my $log_fd, ">>"
.
$logfile) || die "Writing " . $logfile . " failed";
+ open(my $log_fd, ">>"
,
$logfile) || die "Writing " . $logfile . " failed";
printf $log_fd UAGEN_VERSION . " ($logtime) $message\n";
close($log_fd);
}
printf $log_fd UAGEN_VERSION . " ($logtime) $message\n";
close($log_fd);
}
@@
-276,7
+276,7
@@
sub write_action_file() {
$action_file_content .= sprintf " +hide-user-agent{%s} \\\n}\n/\n",
$user_agent;
}
$action_file_content .= sprintf " +hide-user-agent{%s} \\\n}\n/\n",
$user_agent;
}
- open(my $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);
or log_error "Writing action file $action_file failed!";
print $actionfile_fd $action_file_content;
close($actionfile_fd);
@@
-294,7
+294,7
@@
sub write_prefs_file() {
my $prefs_file_content = '';
my $prefsfile_fd;
my $prefs_file_content = '';
my $prefsfile_fd;
- if (open($prefsfile_fd, $mozilla_prefs_file)) {
+ if (open($prefsfile_fd,
"<",
$mozilla_prefs_file)) {
while (<$prefsfile_fd>) {
s@user_pref\(\"general.useragent.override\",.*\);\n?@@;
while (<$prefsfile_fd>) {
s@user_pref\(\"general.useragent.override\",.*\);\n?@@;
@@
-311,7
+311,7
@@
sub write_prefs_file() {
sprintf("user_pref(\"intl.accept_languages\", \"%s\");\n", $accept_language)
unless $clean_prefs;
sprintf("user_pref(\"intl.accept_languages\", \"%s\");\n", $accept_language)
unless $clean_prefs;
- open($prefsfile_fd, ">"
.
$mozilla_prefs_file)
+ open($prefsfile_fd, ">"
,
$mozilla_prefs_file)
or log_error "Writing prefs file $mozilla_prefs_file failed!";
print $prefsfile_fd $prefs_file_content;
close($prefsfile_fd);
or log_error "Writing prefs file $mozilla_prefs_file failed!";
print $prefsfile_fd $prefs_file_content;
close($prefsfile_fd);