mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FEATURE] Новые параметры в HWID
This commit is contained in:
parent
5786699474
commit
07761dd88b
1 changed files with 37 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue