diff --git a/src/machine_code.cpp b/src/machine_code.cpp index 777e1be..29c2c0c 100644 --- a/src/machine_code.cpp +++ b/src/machine_code.cpp @@ -135,24 +135,18 @@ std::string getCpuId() { return getWMIProperty(L"Win32_Processor", L"ProcessorId"); } -std::string getDiskSerial() { - return getWMIProperty(L"Win32_DiskDrive", L"SerialNumber"); -} - std::string getMacAddress() { return getWMIProperty(L"Win32_NetworkAdapterConfiguration", L"MACAddress"); } std::string getMachineCode() { std::string cpuId = getCpuId(); - std::string diskSerial = getDiskSerial(); std::string macAddress = getMacAddress(); // Clean up strings cpuId.erase(std::remove_if(cpuId.begin(), cpuId.end(), isspace), cpuId.end()); - diskSerial.erase(std::remove_if(diskSerial.begin(), diskSerial.end(), isspace), diskSerial.end()); macAddress.erase(std::remove_if(macAddress.begin(), macAddress.end(), isspace), macAddress.end()); macAddress.erase(std::remove(macAddress.begin(), macAddress.end(), ':'), macAddress.end()); - return cpuId + "-" + diskSerial + "-" + macAddress; + return cpuId + "-" + "-" + macAddress; }