[FEATURE] Дополнительная информация по сетевым интерфейсам в HWID

This commit is contained in:
Gravit 2019-03-11 17:43:55 +07:00
parent 24b8227685
commit 124f1ddbeb
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -7,6 +7,8 @@
import ru.gravit.launcher.OshiHWID;
import ru.gravit.utils.helper.LogHelper;
import java.net.NetworkInterface;
public class OshiHWIDProvider implements LauncherHWIDInterface {
public SystemInfo systemInfo;
public HardwareAbstractionLayer hardware;
@ -111,6 +113,9 @@ public void printHardwareInformation() {
for(NetworkIF networkIF : hardware.getNetworkIFs())
{
LogHelper.debug("Network Interface: %s mac: %s", networkIF.getName(), networkIF.getMacaddr());
NetworkInterface network = networkIF.getNetworkInterface();
if(network.isLoopback() || network.isVirtual()) continue;
LogHelper.debug("Network Interface display: %s name: %s", network.getDisplayName(), network.getName());
for(String ipv4 : networkIF.getIPv4addr())
{
if(ipv4.startsWith("127.")) continue;