Option to flag randomized MAC addresses

3 posts

rtremmel
12 Oct

I would like to request a feature: an option to flag randomized MAC addresses.

x2:xx:xx:xx:xx:xx
x6:xx:xx:xx:xx:xx
xA:xx:xx:xx:xx:xx
xE:xx:xx:xx:xx:xx

Andrew SoftPerfect
13 Oct

You can already do this in the current version, in a few ways. A randomised (locally administered) address always has 2, 6, A or E as its second hex digit, so it only takes a very short regular expression:

^.[26AE]

This pattern works with whichever MAC format you have chosen in the options, as the second character is the same digit in all of them, and matching is not case-sensitive. Then, choose your preferred method:

Highlight the cells

Right-click the MAC address column header and choose Change Column View. Pick a background or text colour, set Highlighting condition to Regex and enter the above pattern. Only the randomised addresses will be coloured.

Filter the rows

Press Ctrl+I to open the advanced filter panel, select the MAC address column, set the operation to Regex and enter the same pattern. The matching devices are highlighted, and you can also show only those and hide everything else.

Add a dedicated column

If you would rather have an explicit flag you can sort by or export, go to Options → Remote Scripting and add an item named, say, Randomised MAC with this VBScript:

mac = Input.Column("MAC address")
If Len(mac) > 1 Then
    If InStr("26AE", UCase(Mid(mac, 2, 1))) > 0 Then Output.Write "Yes"
End If

The same can be done under Options → Remote Python if you prefer Python:

mac = Input.Column("MAC address")
if len(mac) > 1 and mac[1].upper() in "26AE":
    Output.Write("Yes")
rtremmel
13 Oct

Awesome! Thank you for the solutions. Perfect! (tu)

Reply
Shown with your post. Sign in to keep the same name every time.
(optional, never shown)
Only needed if you want notifications about replies.
Drag files here, paste a screenshot, or . Images up to 10 MB. Text, log and zip files up to 2 MB. Up to 5 files per post.
You can edit your post until someone replies.