Skip to content

Commit

Permalink
Manual flatbot 2 update (#170)
Browse files Browse the repository at this point in the history
  • Loading branch information
qduk authored Nov 9, 2022
1 parent ceb12e1 commit 0dc5d3a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
6 changes: 6 additions & 0 deletions flat_postprocess/oui_postprocess.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
"""Python code used to postprocess Flat github action data related to OUI mappings."""
import sys
import re
from urllib.request import urlopen

HEX_RE = r"^(?P<hex>[A-Fa-f0-9]{6})\s+\(.*\)[^a-zA-Z0-9]+(?P<company>.*)$"
OUI_MAPPINGS = {}

if __name__ == "__main__":
if len(sys.argv) == 3:
with urlopen("https://standards-oui.ieee.org").read().decode("utf-8") as oui_textfile: # nosec B310
with open(sys.argv[1], "w", encoding="utf-8") as oui_mappings:
oui_mappings.write(oui_textfile)

with open(sys.argv[1], "r", encoding="utf-8") as oui_file:
for line in oui_file:
if re.search(HEX_RE, line):
Expand Down
21 changes: 14 additions & 7 deletions netutils/oui_mappings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"44d791": "HUAWEI TECHNOLOGIES CO.,LTD",
"8446fe": "HUAWEI TECHNOLOGIES CO.,LTD",
"d82918": "HUAWEI TECHNOLOGIES CO.,LTD",
"d0d003": "Samsung Electronics Co.,LTD",
"64b21d": "Chengdu Phycom Tech Co., Ltd.",
"c42996": "Signify B.V.",
"980637": "IEEE Registration Authority",
Expand Down Expand Up @@ -6560,10 +6559,14 @@
"f83c80": "MITSUMI ELECTRIC CO.,LTD.",
"d83add": "Raspberry Pi Trading Ltd",
"70f8ae": "Microsoft Corporation",
"f4a17f": "Co.Ltd",
"f42462": "Co., Ltd",
"64ec65": "vivo Mobile Communication Co., Ltd.",
"b85cee": "Co., Ltd",
"f4a17f": "Co.Ltd",
"d0d003": "Samsung Electronics Co.,Ltd",
"5c76d5": "Nokia",
"8c7a00": "Nokia",
"8c7909": "Aruba, a Hewlett Packard Enterprise Company",
"9cffc2": "AVI Systems GmbH",
"44d878": "Hui Zhou Gaoshengda Technology Co.,LTD",
"a0d807": "Huawei Device Co., Ltd.",
Expand Down Expand Up @@ -13061,6 +13064,8 @@
"b4cbb8": "Universal Electronics, Inc.",
"f8d758": "Veratron AG",
"24fe9a": "CyberTAN Technology Inc.",
"ec8a48": "Arista Networks",
"e81098": "Aruba, a Hewlett Packard Enterprise Company",
"848094": "Meter, Inc.",
"10b3d5": "Cisco Systems, Inc",
"30a2c2": "Huawei Device Co., Ltd.",
Expand Down Expand Up @@ -26157,8 +26162,9 @@
"4831db": "Huawei Device Co., Ltd.",
"d0a9d3": "EM Microelectronic",
"147f0f": "Texas Instruments",
"205f3d": "Adtran, Inc",
"04f778": "Sony Interactive Entertainment Inc.",
"205f3d": "Adtran Inc",
"0092a5": "LG Innotek",
"7c8ae1": "CO., LTD. ",
"54e4a9": "BHR Tech GmbH",
"208058": "Ciena Corporation",
Expand Down Expand Up @@ -31362,7 +31368,6 @@
"54f294": "Huawei Device Co., Ltd.",
"245ab5": "Samsung Electronics Co.,Ltd",
"c0d2dd": "Samsung Electronics Co.,Ltd",
"ac1e92": "Samsung Electronics Co.,LTD",
"0068eb": "HP Inc.",
"7cb37b": "Qingdao Intelligent&Precise Electronics Co.,Ltd.",
"484c86": "Huawei Device Co., Ltd.",
Expand All @@ -31383,7 +31388,6 @@
"acbd0b": "Leimac Ltd.",
"e0ccf8": "Xiaomi Communications Co Ltd",
"98524a": "Technicolor CH USA Inc.",
"3868a4": "Samsung Electronics Co.,LTD",
"b4a5ac": "GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP.,LTD",
"1c784e": "China Mobile Iot Limited company",
"843e79": "Shenzhen Belon Technology CO.,LTD",
Expand Down Expand Up @@ -32672,8 +32676,6 @@
"a88055": "Tuya Smart Inc.",
"508bb9": "Tuya Smart Inc.",
"001b1f": "FORCE Technology",
"28d0cb": "Adtran, Inc",
"ac51ee": "Adtran, Inc",
"fc6a1c": "Mellanox Technologies, Inc.",
"a088c2": "Mellanox Technologies, Inc.",
"6cacc2": "Samsung Electronics Co.,Ltd",
Expand All @@ -32684,4 +32686,9 @@
"a4d5c2": "Hangzhou Hikvision Digital Technology Co.,Ltd.",
"0023c7": "AVSystem sp. z o. o.",
"c4fc22": "NETWORK TECHNOLOGY CO.,LTD.",
"ac51ee": "Adtran Inc",
"28d0cb": "Adtran Inc",
"b837b2": "Aruba, a Hewlett Packard Enterprise Company",
"3868a4": "Samsung Electronics Co.,Ltd",
"ac1e92": "Samsung Electronics Co.,Ltd",
}

0 comments on commit 0dc5d3a

Please sign in to comment.