mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2024-12-22 12:30:17 +02:00
Update confid.cpp
This commit is contained in:
parent
1aeceb28f1
commit
25db955b61
@ -924,13 +924,6 @@ int ConfirmationID::Generate(const char* installation_id_str, char confirmation_
|
|||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
decode_iid_new_version(installation_id, hardwareID, &version);
|
decode_iid_new_version(installation_id, hardwareID, &version);
|
||||||
productID[0] = stoi(productid.substr(0,5));
|
|
||||||
int channelID = stoi(productid.substr(6,3));
|
|
||||||
if (channelID == 0) {
|
|
||||||
productID[3] = ((stoi(productid.substr(10,2))) * 1000) + productID[3];
|
|
||||||
} else {
|
|
||||||
productID[3] = ((stoi(productid.substr(18,2))) * 1000) + productID[3];
|
|
||||||
}
|
|
||||||
switch (activationMode) {
|
switch (activationMode) {
|
||||||
case 2:
|
case 2:
|
||||||
if (version != 3)
|
if (version != 3)
|
||||||
@ -941,7 +934,18 @@ int ConfirmationID::Generate(const char* installation_id_str, char confirmation_
|
|||||||
return ERR_UNKNOWN_VERSION;
|
return ERR_UNKNOWN_VERSION;
|
||||||
}
|
}
|
||||||
memcpy(&parsed, hardwareID, 8);
|
memcpy(&parsed, hardwareID, 8);
|
||||||
break;
|
productID[0] = stoi(productid.substr(0,5));
|
||||||
|
std::string channelid = productid.substr(6,3);
|
||||||
|
char *p = &channelid[0];
|
||||||
|
for (; *p; p++) {
|
||||||
|
*p = toupper((unsigned char)*p);
|
||||||
|
}
|
||||||
|
p = &channelid[0];
|
||||||
|
if (strcmp(p, "OEM") == 0) {
|
||||||
|
productID[3] = ((stoi(productid.substr(10,2))) * 1000) + productID[3];
|
||||||
|
} else {
|
||||||
|
productID[3] = ((stoi(productid.substr(18,2))) * 1000) + productID[3];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned char keybuf[16];
|
unsigned char keybuf[16];
|
||||||
|
Loading…
Reference in New Issue
Block a user