From 4bf38002815ea8932952c4b58dd6f026188c65bc Mon Sep 17 00:00:00 2001 From: TheTank20 Date: Sat, 13 Apr 2024 18:00:07 +0000 Subject: [PATCH] Comment out ERR_UNKNOWN_VERSION checks Temporary fix for Office 2007 not generating confid's. --- src/libumskt/confid/confid.cpp | 48 +++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/src/libumskt/confid/confid.cpp b/src/libumskt/confid/confid.cpp index 2eb6b42..b4ac0fc 100644 --- a/src/libumskt/confid/confid.cpp +++ b/src/libumskt/confid/confid.cpp @@ -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);