Always pad mac addresses from nmap tracker with leading zeros (#23492)
parent
75a2c057f2
commit
09012e7baa
|
@ -47,7 +47,7 @@ def _arp(ip_address):
|
|||
out, _ = arp.communicate()
|
||||
match = re.search(r'(([0-9A-Fa-f]{1,2}\:){5}[0-9A-Fa-f]{1,2})', str(out))
|
||||
if match:
|
||||
return match.group(0)
|
||||
return ':'.join([i.zfill(2) for i in match.group(0).split(':')])
|
||||
_LOGGER.info('No MAC address found for %s', ip_address)
|
||||
return None
|
||||
|
||||
|
|
Loading…
Reference in New Issue