From 9f499cede759a27e657b4a0345bab956ae18db8e Mon Sep 17 00:00:00 2001 From: Stone_Red <56473591+Stone-Red-Code@users.noreply.github.com> Date: Tue, 8 Aug 2023 19:13:39 +0200 Subject: [PATCH] Small fix --- ARP-Scanner/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ARP-Scanner/Program.cs b/ARP-Scanner/Program.cs index 043d903..61e0ab8 100644 --- a/ARP-Scanner/Program.cs +++ b/ARP-Scanner/Program.cs @@ -54,8 +54,10 @@ internal static class Program int localProcessedIpAddressesCount = Interlocked.Increment(ref processedIpAddressesCount); if (mac is not null) { - List info = new List { ipAddress.ToString(), mac.ToString() }; - info.AddRange(macVendorLookup.GetInformation(mac.ToString())); + string formattedMac = BitConverter.ToString(mac.GetAddressBytes()); + + List info = new List { ipAddress.ToString(), formattedMac }; + info.AddRange(macVendorLookup.GetInformation(formattedMac)); ConsoleExt.WriteLine($"Progress: {localProcessedIpAddressesCount}/{ipAddressesCount} [{100d / ipAddressesCount * localProcessedIpAddressesCount:0.00}%] | Active: {ipAddress}", ConsoleColor.Green); activeHosts.Add(info.ToArray()); }