Comment out ERR_UNKNOWN_VERSION checks

Temporary fix for Office 2007 not generating confid's.
This commit is contained in:
TheTank20 2024-04-13 18:00:07 +00:00 committed by GitHub
parent 8ec60bf396
commit 4bf3800281
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -870,8 +870,8 @@ int ConfirmationID::Generate(const char* installation_id_str, char confirmation_
iid_key[3] = 0xF3;
}
Unmix(installation_id, totalCount == 41 ? 17 : 19, iid_key, 4);
if (installation_id[18] >= 0x10)
return ERR_UNKNOWN_VERSION;
//if (installation_id[18] >= 0x10)
// return ERR_UNKNOWN_VERSION;
#pragma pack(push, 1)
struct {
@ -891,32 +891,32 @@ int ConfirmationID::Generate(const char* installation_id_str, char confirmation_
productID[2] = (parsed.ProductIDLow >> 27) & ((1 << 24) - 1);
version = (parsed.ProductIDLow >> 51) & 15;
productID[3] = (parsed.ProductIDLow >> 55) | (parsed.ProductIDHigh << 9);
switch (activationMode) {
case 0:
if (version != (totalCount == 41 ? 9 : 10))
return ERR_UNKNOWN_VERSION;
break;
case 1:
if (version != 1)
return ERR_UNKNOWN_VERSION;
break;
case 3:
if (version != 4)
return ERR_UNKNOWN_VERSION;
}
//switch (activationMode) {
// case 0:
// if (version != (totalCount == 41 ? 9 : 10))
// return ERR_UNKNOWN_VERSION;
// break;
// case 1:
// if (version != 1)
// return ERR_UNKNOWN_VERSION;
// break;
// case 3:
// if (version != 4)
// return ERR_UNKNOWN_VERSION;
//}
break;
case 2:
case 3:
decode_iid_new_version(installation_id, hardwareID, &version);
switch (activationMode) {
case 2:
if (version != 3)
return ERR_UNKNOWN_VERSION;
break;
case 3:
if (version != 4)
return ERR_UNKNOWN_VERSION;
}
//switch (activationMode) {
// case 2:
// if (version != 3)
// return ERR_UNKNOWN_VERSION;
// break;
// case 3:
// if (version != 4)
// return ERR_UNKNOWN_VERSION;
//}
memcpy(&parsed, hardwareID, 8);
productID[0] = stoi(productid.substr(0,5));
std::string channelid = productid.substr(6,3);