summaryrefslogtreecommitdiffstats
path: root/tools/generate-bacnet-vendors.py
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:14:33 +0000
commit9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9 (patch)
tree2784370cda9bbf2da9114d70f05399c0b229d28c /tools/generate-bacnet-vendors.py
parentAdding debian version 4.2.6-1. (diff)
downloadwireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.tar.xz
wireshark-9f153fbfec0fb9c9ce38e749a7c6f4a5e115d4e9.zip
Merging upstream version 4.4.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/generate-bacnet-vendors.py')
-rwxr-xr-xtools/generate-bacnet-vendors.py21
1 files changed, 17 insertions, 4 deletions
diff --git a/tools/generate-bacnet-vendors.py b/tools/generate-bacnet-vendors.py
index 14fc5303..06d21e88 100755
--- a/tools/generate-bacnet-vendors.py
+++ b/tools/generate-bacnet-vendors.py
@@ -1,16 +1,29 @@
#!/usr/bin/env python3
+#
+# Wireshark - Network traffic analyzer
+# By Gerald Combs <gerald@wireshark.org>
+# Copyright 1998 Gerald Combs
+#
+# SPDX-License-Identifier: GPL-2.0-or-later
+'''Update the BACNET vendors list.
-'''
- Copyright 2023 Jaap Keuter <jaap.keuter@xs4all.nl>
- based on work by Anish Bhatt <anish@chelsio.com>
+generate-bacnet-vendors generates output containing BACNET vendor Identifiers.
+
+Copyright 2023 Jaap Keuter <jaap.keuter@xs4all.nl>
+based on work by Anish Bhatt <anish@chelsio.com>
-SPDX-License-Identifier: GPL-2.0-or-later
'''
import sys
import urllib.request, urllib.error, urllib.parse
from bs4 import BeautifulSoup
+def exit_msg(msg=None, status=1):
+ if msg is not None:
+ sys.stderr.write(msg + '\n\n')
+ sys.stderr.write(__doc__ + '\n')
+ sys.exit(status)
+
req_headers = { 'User-Agent': 'Wireshark generate-bacnet-vendors' }
try:
req = urllib.request.Request("https://bacnet.org/assigned-vendor-ids/", headers=req_headers)