diff --git a/CHANGELOG b/CHANGELOG index da350678..0c07f95f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,10 +1,10 @@ Changes in 3.8.0: - Support for Mac M1 (provided that it runs an arm64 build of Java) - thanks to @aplr #284 - SWT updated for all platforms -- Java 11 is now the minimum required (due to SWT) -- Source can be built with Java 17 +- Java 11 is now the minimum required (due to SWT), source can now be built with Java 17 - If real network netmask is known (e.g. LAN), then skipping of broadcast addresses will respect that instead of always skipping .0 and .255 #309 - Pressing IP^ button to prefill local network interfaces will now set netmask in Range Feeder +- LinuxMACFetcher will now read Kernel ARP table directly, not relying on the arp utility to be available #320 - Mac vendors updated Changes in 3.7.6: diff --git a/src/net/azib/ipscan/config/ComponentRegistry.java b/src/net/azib/ipscan/config/ComponentRegistry.java index fda0e225..04e85b68 100644 --- a/src/net/azib/ipscan/config/ComponentRegistry.java +++ b/src/net/azib/ipscan/config/ComponentRegistry.java @@ -43,7 +43,8 @@ public class ComponentRegistry { i.register(TXTExporter.class, CSVExporter.class, XMLExporter.class, IPListExporter.class); i.register(IPFetcher.class, PingFetcher.class, PingTTLFetcher.class, HostnameFetcher.class, PortsFetcher.class); - i.register(MACFetcher.class, (MACFetcher) Class.forName(MACFetcher.class.getPackage().getName() + (Platform.WINDOWS ? ".WinMACFetcher" : ".UnixMACFetcher")).newInstance()); + i.register(MACFetcher.class, (MACFetcher) Class.forName(MACFetcher.class.getPackage().getName() + + (Platform.WINDOWS ? ".WinMACFetcher" : Platform.LINUX ? ".LinuxMACFetcher" : ".UnixMACFetcher")).newInstance()); i.register(CommentFetcher.class, FilteredPortsFetcher.class, WebDetectFetcher.class, HTTPSenderFetcher.class, NetBIOSInfoFetcher.class, PacketLossFetcher.class, HTTPProxyFetcher.class, MACVendorFetcher.class); i.register(FeederRegistry.class, i.require(FeederGUIRegistry.class)); diff --git a/src/net/azib/ipscan/fetchers/LinuxMACFetcher.java b/src/net/azib/ipscan/fetchers/LinuxMACFetcher.java index f55e52f8..81b7581f 100644 --- a/src/net/azib/ipscan/fetchers/LinuxMACFetcher.java +++ b/src/net/azib/ipscan/fetchers/LinuxMACFetcher.java @@ -28,7 +28,7 @@ public class LinuxMACFetcher extends MACFetcher { @Override public String resolveMAC(InetAddress address) { try { String ip = address.getHostAddress(); - return arpLines().filter(line -> line.startsWith(ip)).findFirst() + return arpLines().filter(line -> line.startsWith(ip + " ")).findFirst() .map(line -> line.substring(macIndex, macIndex + macLength).toUpperCase()) .filter(mac -> !unavailableMac.equals(mac)) .orElse(getLocalMAC(address));