diff options
Diffstat (limited to 'tools/generate-bacnet-vendors.py')
-rwxr-xr-x | tools/generate-bacnet-vendors.py | 21 |
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) |