From 07761dd88b81a98349b7f6ab3ae532c39f530c6c Mon Sep 17 00:00:00 2001 From: Gravit Date: Sat, 9 Mar 2019 22:41:12 +0700 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20=D0=9D=D0=BE=D0=B2=D1=8B=D0=B5=20?= =?UTF-8?q?=D0=BF=D0=B0=D1=80=D0=B0=D0=BC=D0=B5=D1=82=D1=80=D1=8B=20=D0=B2?= =?UTF-8?q?=20HWID?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../launcher/hwid/OshiHWIDProvider.java | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/Launcher/src/main/java/ru/gravit/launcher/hwid/OshiHWIDProvider.java b/Launcher/src/main/java/ru/gravit/launcher/hwid/OshiHWIDProvider.java index 01909b20..2f147063 100644 --- a/Launcher/src/main/java/ru/gravit/launcher/hwid/OshiHWIDProvider.java +++ b/Launcher/src/main/java/ru/gravit/launcher/hwid/OshiHWIDProvider.java @@ -62,6 +62,29 @@ public String getHWDisk() { } } + public String getSoundCardInfo() + { + for(SoundCard soundcard : hardware.getSoundCards()) + { + return soundcard.getName(); + } + return ""; + } + + public String getMacAddr() + { + for(NetworkIF networkIF : hardware.getNetworkIFs()) + { + for(String ipv4 : networkIF.getIPv4addr()) + { + if(ipv4.startsWith("127.")) continue; + if(ipv4.startsWith("10.")) continue; + return networkIF.getMacaddr(); + } + } + return ""; + } + public long getTotalMemory() { if (noHWID) return -1; if (hardware == null) hardware = systemInfo.getHardware(); @@ -85,6 +108,20 @@ public void printHardwareInformation() { for (UsbDevice s : hardware.getUsbDevices(true)) { LogHelper.debug("USBDevice Serial: %s Name: %s", s.getSerialNumber(), s.getName()); } + for(NetworkIF networkIF : hardware.getNetworkIFs()) + { + LogHelper.debug("Network Interface: %s mac: %s", networkIF.getName(), networkIF.getMacaddr()); + for(String ipv4 : networkIF.getIPv4addr()) + { + if(ipv4.startsWith("127.")) continue; + if(ipv4.startsWith("10.")) continue; + LogHelper.subDebug("IPv4: %s", ipv4); + } + } + for(SoundCard soundcard : hardware.getSoundCards()) + { + LogHelper.debug("SoundCard %s", soundcard.getName()); + } CentralProcessor processor = hardware.getProcessor(); LogHelper.debug("Processor Model: %s ID: %s", processor.getModel(), processor.getProcessorID()); } catch (Throwable e) {