Small fix

This commit is contained in:
Stone_Red
2023-08-08 19:13:39 +02:00
parent e10fd2f2b3
commit 9f499cede7
+4 -2
View File
@@ -54,8 +54,10 @@ internal static class Program
int localProcessedIpAddressesCount = Interlocked.Increment(ref processedIpAddressesCount); int localProcessedIpAddressesCount = Interlocked.Increment(ref processedIpAddressesCount);
if (mac is not null) if (mac is not null)
{ {
List<string> info = new List<string> { ipAddress.ToString(), mac.ToString() }; string formattedMac = BitConverter.ToString(mac.GetAddressBytes());
info.AddRange(macVendorLookup.GetInformation(mac.ToString()));
List<string> info = new List<string> { ipAddress.ToString(), formattedMac };
info.AddRange(macVendorLookup.GetInformation(formattedMac));
ConsoleExt.WriteLine($"Progress: {localProcessedIpAddressesCount}/{ipAddressesCount} [{100d / ipAddressesCount * localProcessedIpAddressesCount:0.00}%] | Active: {ipAddress}", ConsoleColor.Green); ConsoleExt.WriteLine($"Progress: {localProcessedIpAddressesCount}/{ipAddressesCount} [{100d / ipAddressesCount * localProcessedIpAddressesCount:0.00}%] | Active: {ipAddress}", ConsoleColor.Green);
activeHosts.Add(info.ToArray()); activeHosts.Add(info.ToArray());
} }