Merge pull request #24 from onura/pr/macos_mac_parse_issue

fix: Cannot parse arp table since MAC addresses are not padded with 0…
This commit is contained in:
Simone Margaritelli 2018-01-22 14:31:39 +01:00 committed by GitHub
commit 3cc5faa297
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,5 +2,5 @@ package net
import "regexp"
var ArpTableParser = regexp.MustCompile("^[^\\d\\.]+([\\d\\.]+).+\\s+([a-f0-9:]{17})\\s+on\\s+([^\\s]+)\\s+.+$")
var ArpTableParser = regexp.MustCompile("^[^\\d\\.]+([\\d\\.]+).+\\s+([a-f0-9:]{11,17})\\s+on\\s+([^\\s]+)\\s+.+$")
var ArpTableTokens = 4