forked from osmocom/wireshark
Tools: Fetch IANA data over HTTPS.
This commit is contained in:
parent
070aeddf76
commit
51c714bfb5
|
@ -9,7 +9,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
iana_svc_url = 'http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv'
|
||||
iana_svc_url = 'https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.csv'
|
||||
|
||||
__doc__ = '''\
|
||||
Usage: make-services.py [url]
|
||||
|
@ -23,7 +23,6 @@ import getopt
|
|||
import csv
|
||||
import re
|
||||
import collections
|
||||
|
||||
import urllib.request, urllib.error, urllib.parse
|
||||
import codecs
|
||||
|
||||
|
@ -55,7 +54,6 @@ def port_to_str(port):
|
|||
return str(port[0])
|
||||
|
||||
def parse_rows(svc_fd):
|
||||
lines = []
|
||||
port_reader = csv.reader(svc_fd)
|
||||
count = 0
|
||||
|
||||
|
@ -158,10 +156,10 @@ def main(argv):
|
|||
sys.exit(2)
|
||||
|
||||
try:
|
||||
opts, args = getopt.getopt(argv, "h", ["help"])
|
||||
opts, _ = getopt.getopt(argv, "h", ["help"])
|
||||
except getopt.GetoptError:
|
||||
exit_msg()
|
||||
for opt, arg in opts:
|
||||
for opt, _ in opts:
|
||||
if opt in ("-h", "--help"):
|
||||
exit_msg(None, 0)
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl -w
|
||||
# create the enterprises file from
|
||||
# http://www.iana.org/assignments/enterprise-numbers
|
||||
# https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
|
||||
#
|
||||
# Wireshark - Network traffic analyzer
|
||||
# By Gerald Combs <gerald@wireshark.org>
|
||||
|
@ -17,7 +17,7 @@ chdir($root_dir) || die("Can't find $root_dir");
|
|||
|
||||
my $in = shift;
|
||||
|
||||
$in = "http://www.iana.org/assignments/enterprise-numbers" unless(defined $in);
|
||||
$in = "https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers" unless(defined $in);
|
||||
|
||||
my @in_lines;
|
||||
my $revision = '2014-04-27';
|
||||
|
@ -25,7 +25,7 @@ my $revision = '2014-04-27';
|
|||
my $min_entries = 100;
|
||||
my $smi_total = 0;
|
||||
|
||||
if($in =~ m/^http:/i) {
|
||||
if($in =~ m/^https?:/i) {
|
||||
eval "require LWP::UserAgent;";
|
||||
die "LWP isn't installed. It is part of the standard Perl module libwww." if $@;
|
||||
|
||||
|
@ -81,7 +81,7 @@ open OUT, "> enterprises.tsv";
|
|||
|
||||
print OUT <<"_SMINMPEC";
|
||||
#
|
||||
# generated from http://www.iana.org/assignments/enterprise-numbers
|
||||
# generated from https://www.iana.org/assignments/enterprise-numbers/enterprise-numbers
|
||||
# run "tools/make-sminmpec.pl [infile]" to regenerate
|
||||
#
|
||||
# The format used here is: <NUMERICAL_ID><SPACE><NAME>
|
||||
|
|
Loading…
Reference in New Issue