From 45b0a1e0868b268a477b3886b2aec8c40d4f050a Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Thu, 7 Mar 2013 09:26:14 +0100 Subject: [PATCH] update-oui.py: Adjust OUI matching regular expression Only match hex digits (not the entire alphabet) and allow for preceeding whitespaces as this seems to be the new format used. Signed-off-by: Tobias Klauser --- update-oui.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-oui.py b/update-oui.py index 0b676e1..52af122 100755 --- a/update-oui.py +++ b/update-oui.py @@ -21,7 +21,7 @@ except ImportError: DEFAULT_OUPUT_FILE = "oui.conf" DEFAULT_OUI_URL = "http://standards.ieee.org/develop/regauth/oui/oui.txt" -OUI_PATTERN = re.compile(b"^([a-zA-Z0-9]{2})-([a-zA-Z0-9]{2})-([a-zA-Z0-9]{2})\s+\(hex\)\s+(.*)$") +OUI_PATTERN = re.compile(b"^\s*([a-fA-F0-9]{2})-([a-fA-F0-9]{2})-([a-fA-F0-9]{2})\s+\(hex\)\s+(.*)$") def usage(): print("""usage: {0} [OPTION...] -- 2.11.4.GIT