summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2012-05-09 19:17:48 +0000
committerGerald Combs <gerald@wireshark.org>2012-05-09 19:17:48 +0000
commitd5b3acebd191c7c4b7417fa9c57017b095bf4f8c (patch)
tree7bc7f7e5a78c2f4ee9db1c2dac11871f7d35cee8 /tools
parent582c102f16fb0aa1bfc38b00eeee3d22896923ba (diff)
downloadwireshark-d5b3acebd191c7c4b7417fa9c57017b095bf4f8c.tar.gz
Send a useful User-Agent header.
svn path=/trunk/; revision=42522
Diffstat (limited to 'tools')
-rwxr-xr-xtools/make-manuf5
-rwxr-xr-xtools/make-services.pl4
-rwxr-xr-xtools/make-sminmpec.pl4
3 files changed, 13 insertions, 0 deletions
diff --git a/tools/make-manuf b/tools/make-manuf
index be4eef45e5..af981bdfcd 100755
--- a/tools/make-manuf
+++ b/tools/make-manuf
@@ -27,8 +27,13 @@ if( $@ ) {
die "LWP isn't installed. It is part of the standard Perl\n" .
" module libwww. Bailing.\n";
}
+
+$revision = '$Revision$';
+if ($revision !~ /[0-9]/ ) { $revision = "unknown"; }
+
$agent = LWP::UserAgent->new;
$agent->env_proxy;
+$agent->agent("Wireshark make-manuf/$revision");
$template = "manuf.tmpl";
$wkatmpl = "wka.tmpl";
diff --git a/tools/make-services.pl b/tools/make-services.pl
index fb4707b48f..d77621f791 100755
--- a/tools/make-services.pl
+++ b/tools/make-services.pl
@@ -38,6 +38,9 @@ my $iana_port_url = "http://www.iana.org/assignments/service-names-port-numbers/
# is XML. Perhaps we should parse that instead.
$in = $iana_port_url unless(defined $in);
+my $revision = '$Revision$';
+if ($revision !~ /[0-9]/ ) { $revision = "unknown"; }
+
my $body = "";
if($in =~ m/^http:/i) {
@@ -46,6 +49,7 @@ if($in =~ m/^http:/i) {
my $agent = LWP::UserAgent->new;
$agent->env_proxy;
+ $agent->agent("Wireshark make-services.pl/$revision");
warn "starting to fetch $in ...\n";
diff --git a/tools/make-sminmpec.pl b/tools/make-sminmpec.pl
index 7b1f13d9ab..0202867e6f 100755
--- a/tools/make-sminmpec.pl
+++ b/tools/make-sminmpec.pl
@@ -29,12 +29,16 @@ $in = "http://www.iana.org/assignments/enterprise-numbers" unless(defined $in);
my @in_lines;
+my $revision = '$Revision$';
+if ($revision !~ /[0-9]/ ) { $revision = "unknown"; }
+
if($in =~ m/^http:/i) {
eval "require LWP::UserAgent;";
die "LWP isn't installed. It is part of the standard Perl module libwww." if $@;
my $agent = LWP::UserAgent->new;
$agent->env_proxy;
+ $agent->agent("Wireshark make-sminmpec.pl/$revision");
warn "starting to fetch $in ...\n";