diff --git a/doc/dpc32_dump.csv b/doc/dpc32_dump.csv new file mode 100644 index 0000000..1b3efc9 --- /dev/null +++ b/doc/dpc32_dump.csv @@ -0,0 +1,81 @@ +ID,BINK_ID,CID_MIN,CID_MAX,LIC_TYPE,ACT_DAYS +00,21,119,119,OEM,30 +01,21,120,169,Retail,30 +02,21,400,665,Retail,30 +03,21,667,699,Retail,30 +04,21,700,754,Retail,30 +05,22,119,119,OEM,30 +06,22,120,169,Retail,30 +07,22,400,665,Retail,30 +08,22,667,699,Retail,30 +09,22,170,269,Retail,30 +10,22,700,754,Retail,30 +11,22,803,899,Retail,30 +12,06,100,199,Embedded,None +13,06,200,899,Embedded,None +14,20,005,110,Evaluation,14 +15,20,112,119,Evaluation,120 +16,21,005,085,Retail,30 +17,21,337,359,TablePC,60 +18,22,005,085,Retail,30 +19,22,337,359,TablePC,60 +20,22,755,779,Retail,30 +21,22,785,789,Retail,30 +22,23,640,699,Corporate,None +23,22,360,369,TablePC,60 +24,21,755,779,Retail,30 +25,22,085,089,Retail,30 +26,22,095,099,Retail,30 +27,24,900,904,TablePC,60 +28,24,119,119,OEM,30 +29,24,120,169,Retail,30 +30,24,400,665,Retail,30 +31,24,667,699,Retail,30 +32,24,700,754,Retail,30 +33,24,905,999,Retail,30 +34,25,119,119,OEM,30 +35,25,120,169,Retail,30 +36,25,400,665,Retail,30 +37,25,667,699,Retail,30 +38,25,170,269,Retail,30 +39,25,700,754,Retail,30 +40,25,803,899,Retail,30 +41,25,291,300,TablePC,None +42,25,301,320,Retail,30 +43,21,085,085,Retail,30 +44,21,086,095,Retail,30 +45,21,096,105,Retail,30 +46,21,106,106,Retail,30 +47,21,187,187,TablePC,60 +48,21,188,188,TablePC,60 +49,21,170,186,Retail,30 +50,21,189,189,Retail,30 +51,21,190,190,OEM,30 +52,21,191,191,OEM,30 +53,22,090,090,Retail,30 +54,22,111,111,TablePC,60 +55,22,112,112,TablePC,60 +56,22,090,090,OEM,30 +57,22,100,110,Retail,30 +58,22,113,113,OEM,30 +59,22,114,114,Retail,30 +60,23,700,701,Corporate,None +61,23,704,705,Corporate,None +62,21,107,118,Retail,30 +63,21,192,336,Retail,30 +64,21,755,899,Retail,30 +65,21,921,979,Retail,30 +66,22,271,336,Retail,30 +67,22,370,399,Retail,30 +68,22,780,784,Retail,30 +69,22,790,799,Retail,30 +70,22,900,979,Retail,30 +71,22,114,116,Retail,30 +72,21,362,376,Retail,30 +73,21,377,377,Retail,30 +74,21,984,984,Retail,30 +75,22,311,334,Retail,30 +76,22,336,336,Retail,30 +77,22,370,384,Retail,30 +78,22,385,385,Retail,30 +Wardial,0,1,3-99,, \ No newline at end of file diff --git a/doc/dpc64_dump.csv b/doc/dpc64_dump.csv new file mode 100644 index 0000000..5390df3 --- /dev/null +++ b/doc/dpc64_dump.csv @@ -0,0 +1,78 @@ +ID,BINK_ID,CID_MIN,CID_MAX,LIC_TYPE,ACT_DAYS +00,42,005,084,Retail,30 +01,42,093,098,Retail,30 +02,42,099,100,TablePC,60 +03,42,111,114,TablePC,60 +04,42,337,369,TablePC,60 +05,42,370,372,TablePC,60 +06,42,373,373,Retail,30 +07,42,374,376,TablePC,60 +08,42,377,377,Retail,30 +09,42,378,379,TablePC,60 +10,42,380,380,Retail,30 +11,42,755,789,Retail,30 +12,42,101,101,Retail,30 +13,42,119,119,OEM,30 +14,42,120,163,Retail,30 +15,42,164,169,Retail,30 +16,42,170,269,Retail,30 +17,43,005,014,Evaluation,14 +18,43,015,019,Evaluation,14 +19,43,020,023,Evaluation,120 +20,43,024,063,Evaluation,14 +21,43,064,068,Evaluation,14 +22,43,101,110,Evaluation,14 +23,43,112,113,Evaluation,120 +24,43,136,145,Evaluation,14 +25,43,146,147,Evaluation,120 +26,43,152,157,Evaluation,14 +27,44,005,083,Retail,30 +28,44,085,092,Retail,30 +29,44,099,104,TablePC,60 +30,44,281,310,TablePC,60 +31,44,720,729,TablePC,60 +32,44,781,788,Retail,30 +33,44,792,794,Retail,30 +34,44,119,119,OEM,30 +35,44,119,119,OEM,30 +36,44,120,162,Retail,30 +37,44,170,269,Retail,30 +38,44,271,280,Retail,30 +39,45,640,649,Corporate,None +40,45,650,654,Corporate,None +41,45,655,656,Corporate,None +42,50,001,002,Evaluation,14 +43,50,640,649,Corporate,None +44,50,652,657,Corporate,None +45,51,306,370,Retail,30 +46,51,371,410,TablePC,60 +47,51,005,118,Retail,30 +48,51,119,119,OEM,30 +49,52,005,092,Retail,30 +50,52,095,095,Retail,30 +51,52,281,314,TablePC,60 +52,52,319,330,TablePC,60 +53,52,781,789,Retail,30 +54,52,792,792,Retail,30 +55,52,119,119,OEM,30 +56,52,120,263,Retail,30 +57,52,271,280,Retail,30 +58,53,005,014,Evaluation,14 +59,53,101,110,Evaluation,14 +60,53,112,113,Evaluation,120 +61,53,114,133,Evaluation,14 +62,53,134,135,Evaluation,120 +63,53,136,145,Evaluation,14 +64,53,146,147,Evaluation,120 +65,53,150,169,Evaluation,14 +66,53,170,171,Evaluation,120 +67,53,200,216,Evaluation,14 +68,53,217,218,Evaluation,120 +69,54,005,084,Retail,30 +70,54,090,092,Retail,30 +71,54,094,094,Retail,30 +72,54,115,118,Retail,30 +73,54,300,309,TablePC,60 +74,54,119,119,OEM,30 +75,54,120,263,Retail,30 +Wardial,306-410,,,, diff --git a/keys.json b/keys.json index 4ff4a1c..5f2f234 100644 --- a/keys.json +++ b/keys.json @@ -1,157 +1,324 @@ { "Products": { "Windows CE Platform Builder 3": { - "BINK": ["00", "01", "0E", "0D", "0F"] + "BINK": { + "00": {}, + "01": {}, + "0E": {}, + "0D": {}, + "0F": {} + } }, "Windows CE .Net Platform Builder 4": { - "BINK": ["00", "01"] + "BINK": { + "00": {}, + "01": {} + } }, "Windows 98 (all)": { - "BINK": ["02","03"] + "BINK": { + "02": {}, + "03": {} + } }, "Office 2000": { - "BINK": ["04", "05"] + "BINK": { + "04": {}, + "05": {} + } }, "Internet Security and Acceleration (ISA) Server 2004": { - "BINK": ["06", "07"] + "BINK": { + "06": {}, + "07": {} + } }, "PLUS! for Windows XP": { - "BINK": ["08", "09"] + "BINK": { + "08": {}, + "09": {} + } }, "Windows 2000 Server (all)": { - "BINK": ["0A", "13"] + "BINK": { + "0A": {}, + "13": {} + } }, "Office Communicator 2007": { - "BINK": ["0C", "0D"] + "BINK": { + "0C": {}, + "0D": {} + } }, "Windows Embedded POSReady 2009": { - "BINK": ["0D", "0D"] + "BINK": { + "0D": {}, + "0D": {} + } }, "Windows CE .Net Platform Builder 5": { - "BINK": ["0D", "0D"] + "BINK": { + "0D": {}, + "0D": {} + } }, "Commerce Server 2002": { - "BINK": ["0E", "0F"] + "BINK": { + "0E": {}, + "0F": {} + } }, "Passport Manager": { "BINK": ["10"] }, "Windows 2000 Professional": { - "BINK": ["12", "13"] + "BINK": { + "12": {}, + "13": {} + } }, "Office for Mac 2004 / 2008": { - "BINK": ["18", "19"] + "BINK": { + "18": {}, + "19": {} + } }, "Windows ME": { - "BINK": ["1C", "1D"] + "BINK": { + "1C": {}, + "1D": {} + } }, "Office XP Applications": { - "BINK": ["20", "21"] + "BINK": { + "20": {}, + "21": {} + } }, "Works Suite 2003 and 2004": { - "BINK": ["20", "21"] + "BINK": { + "20": {}, + "21": {} + } }, "Office XP": { - "BINK": ["22", "23"] + "BINK": { + "22": {}, + "23": {} + } }, "Visual Studio .Net / .Net 2003": { - "BINK": ["24", "25"] + "BINK": { + "24": {}, + "25": {} + } }, "Windows XP Professional Evaluation": { - "BINK": ["28", "29"] + "BINK": { + "28": {}, + "29": {} + } }, "Windows XP Home": { - "BINK": ["2A", "2B"] + "BINK": { + "2A": {}, + "2B": {} + } }, "Windows XP Pro": { - "BINK": ["2C", "2D"] + "BINK": { + "2C": { + "Retail": [[5, 90], [95, 99], [114, 116], [311, 334], 336, [370, 385], [755, 779], [785, 789]], + "TablePC": [111, 112, [337, 369]] + }, + "2D": { + "OEM": [[100, 110], 114, [120, 269], [271, 336], [370, 665], [667, 754], [780, 799], [803, 979]], + "OEM-SLP": [90, 113, 119] + } + } }, "Windows XP Pro IA-64": { - "BINK": ["2C", "2D"] + "BINK": { + "2C": {}, + "2D": {} + } }, "Windows XP Pro VLK": { - "BINK": ["2E", "2F"] + "BINK": { + "2E": {}, + "2F": {} + } }, "Windows XP Fundamentals for Legacy PCs": { - "BINK": ["2E", "2F"] + "BINK": { + "2E": {}, + "2F": {} + } }, "Windows XP Professional K": { - "BINK": ["30", "31"] + "BINK": { + "30": {}, + "31": {} + } }, "Windows XP Starter Edition": { - "BINK": ["32", "33"] + "BINK": { + "32": {}, + "33": {} + } }, "Windows Longhorn (6.0.3683.0 -> 6.0.4029.0)": { - "BINK": ["40", "41"] + "BINK": { + "40": {}, + "41": {} + } }, "Halo: Combat Evolved": { - "BINK": ["50", "51"] + "BINK": { + "50": {}, + "51": {} + } }, "Halo: Custom Edition": { - "BINK": ["50", "51"] + "BINK": { + "50": {}, + "51": {} + } }, "Visual Studio 2005": { - "BINK": ["52", "53"] + "BINK": { + "52": {}, + "53": {} + } }, "Plus! Digital Media Edition for Windows XP": { - "BINK": ["52", "53"] + "BINK": { + "52": {}, + "53": {} + } }, "Windows Longhorn (6.0.4033.0)": { - "BINK": ["54", "55"] + "BINK": { + "54": {}, + "55": {} + } }, "Windows Server 2003": { - "BINK": ["54", "55", "58", "59"] + "BINK": { + "54": {}, + "55": {}, + "58": {}, + "59": {} + } }, "Windows Server 2003 VLK": { - "BINK": ["5A", "5B"] + "BINK": { + "5A": {}, + "5B": {} + } }, "Windows XP Pro 64 Bit Edition VLK": { - "BINK": ["64", "65"] + "BINK": { + "64": {}, + "65": {} + } }, "Windows XP Pro 64 Bit Edition": { - "BINK": ["66", "67"] + "BINK": { + "66": { + "Retail": [[306, 370]], + "TablePC": [[371, 410]] + }, + "67": { + "OEM": [[5, 118]] + } + } }, "Windows Server 2003 64 Bit": { - "BINK": ["68", "69", "6C", "6D"] + "BINK": { + "68": {}, + "69": {}, + "6C": {}, + "6D": {} + } }, "Windows Server 2003 64 Bit VLK": { - "BINK": ["68", "69", "6C", "6D"] + "BINK": { + "68": {}, + "69": {}, + "6C": {}, + "6D": {} + } }, "Office 2003 Applications": { - "BINK": ["6E", "6F"] + "BINK": { + "6E": {}, + "6F": {} + } }, "Office 2003 Small Business": { - "BINK": ["70", "71"] + "BINK": { + "70": {}, + "71": {} + } }, "Office 2003 Student and Teacher": { - "BINK": ["70", "71"] + "BINK": { + "70": {}, + "71": {} + } }, "Office 2003 Professional": { - "BINK": ["72", "73"] + "BINK": { + "72": {}, + "73": {} + } }, "Windows Longhorn (6.0.4039.0 -> Pre PIDGENX)": { - "BINK": ["74", "75"] + "BINK": { + "74": {}, + "75": {} + } }, "Identity Lifecycle Manager 2007": { - "BINK": ["78", "79"] + "BINK": { + "78": {}, + "79": {} + } }, "Visual Studio 2008": { - "BINK": ["78", "79"] + "BINK": { + "78": {}, + "79": {} + } }, "Office 2007 Applications": { - "BINK": ["7E", "7F"] + "BINK": { + "7E": {}, + "7F": {} + } }, "Office 2007 Basic / Small Business": { - "BINK": ["80", "81"] + "BINK": { + "80": {}, + "81": {} + } }, "Office 2007 Standard / Professional / Ultimate / Enterprise": { - "BINK": ["82", "83"] + "BINK": { + "82": {}, + "83": {} + } }, "Office 2007 OEM (2007 MS Office system)": { "BINK": ["84"] }, "Office 2007 Home & Student": { - "BINK": ["88", "89"] + "BINK": { + "88": {}, + "89": {} + } } }, "BINK": { diff --git a/src/cli.cpp b/src/cli.cpp index d4ba941..6ecf435 100644 --- a/src/cli.cpp +++ b/src/cli.cpp @@ -65,7 +65,7 @@ void CLI::showHelp(char *argv[]) { fmt::print("\t-m --mode\tproduct family to activate.\n\t\t\tvalid options are \"WINDOWS\", \"OFFICEXP\", \"OFFICE2K3\", \"OFFICE2K7\" or \"PLUSDME\"\n\t\t\t(defaults to \"WINDOWS\")\n"); fmt::print("\t-p --productid\tthe product ID of the Program to activate. only required for Office 2K3 and Office 2K7 programs\n"); fmt::print("\t-b --binkid\tspecify which BINK identifier to load (defaults to 2E)\n"); - fmt::print("\t-l --list\tshow which products/binks can be loaded\n"); + fmt::print("\t-l --list\tshow which products/binks (and their associated channel ids) can be loaded\n"); fmt::print("\t-c --channelid\tspecify which Channel Identifier to use (defaults to 640)\n"); fmt::print("\t-s --serial\tspecifies a serial to use in the product ID (defaults to random, BINK1998 only)\n"); fmt::print("\t-u --upgrade\tspecifies the Product Key will be an \"Upgrade\" version\n"); @@ -257,10 +257,52 @@ int CLI::validateCommandLine(Options* options, char *argv[], json *keys) { } if (options->list) { + //List each product for (auto el : (*keys)["Products"].items()) { - int id; - sscanf((el.value()["BINK"][0]).get().c_str(), "%x", &id); - std::cout << el.key() << ": " << el.value()["BINK"] << std::endl; + std::cout << el.key() << ": ["; + + //List each bink + bool f = false; + for (auto bink : el.value()["BINK"].items()) { + if (bink.value().empty()) { //If no CIDs are associated + if (f) { std::cout << ", "; } else { f = true; } + std::cout << bink.key(); + } else { //If CIDs are associated + size_t padding = el.key().length() + 2; + if (!f) { std::cout << std::endl; + for (int i = 0; i < padding; i++) { + std::cout << " "; + } + f = true; + } + std::cout << " "; + + std::cout << bink.key() << ":" << std::endl; + + //List each CID + for (auto cids : bink.value().items()) { + for (int i = 0; i < padding + 5; i++) { + std::cout << " "; + } + + std::cout << cids.key() << ": "; + + //List each CID's values + bool ff = false; + for (auto cid : cids.value().items()) { + if (ff) { std::cout << ", "; } else { ff = true; } + std::cout << cid.value(); + } + + std::cout << std::endl; + } + + for (int i = 0; i < padding; i++) { + std::cout << " "; + } + } + } + std::cout << "]" << std::endl; } fmt::print("\n\n");