[FEATURE] Подправлены числа сравнения HWID при compareMode

This commit is contained in:
Gravit 2019-10-16 22:50:35 +07:00
parent cd4e89dc15
commit 80e24715f6
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -27,7 +27,7 @@ public int getLevel() //Уровень доверия, насколько уни
if (totalMemory != 0) result += 32; if (totalMemory != 0) result += 32;
if (serialNumber != null) result += isRealSerialNumber() ? 20 : 3; if (serialNumber != null) result += isRealSerialNumber() ? 20 : 3;
if (HWDiskSerial != null && !HWDiskSerial.isEmpty()) result += 38; if (HWDiskSerial != null && !HWDiskSerial.isEmpty()) result += 38;
if (processorID != null && !processorID.isEmpty()) result += 20; if (processorID != null && !processorID.isEmpty()) result += 15;
if (macAddr != null && !macAddr.isEmpty()) result += 25; if (macAddr != null && !macAddr.isEmpty()) result += 25;
return result; return result;
} }
@ -43,10 +43,10 @@ public int compare(HWID hwid) {
int rate = 0; int rate = 0;
OshiHWID oshi = (OshiHWID) hwid; OshiHWID oshi = (OshiHWID) hwid;
if (Math.abs(oshi.totalMemory - totalMemory) < 1024 * 1024) rate += 5; if (Math.abs(oshi.totalMemory - totalMemory) < 1024 * 1024) rate += 5;
if (oshi.totalMemory == totalMemory) rate += 15; if (oshi.totalMemory == totalMemory) rate += 32;
if (oshi.HWDiskSerial.equals(HWDiskSerial)) rate += 45; if (oshi.HWDiskSerial.equals(HWDiskSerial) && !HWDiskSerial.isEmpty()) rate += 38;
if (oshi.processorID.equals(processorID)) rate += 18; if (oshi.processorID.equals(processorID) && !processorID.isEmpty()) rate += 15;
if (oshi.serialNumber.equals(serialNumber)) rate += 15; if (oshi.serialNumber.equals(serialNumber)) rate += isRealSerialNumber() ? 20 : 3;
if (!oshi.macAddr.isEmpty() && oshi.macAddr.equals(macAddr)) rate += 19; if (!oshi.macAddr.isEmpty() && oshi.macAddr.equals(macAddr)) rate += 19;
return rate; return rate;
} }