mirror of
https://github.com/Neo-Desktop/WindowsXPKg
synced 2024-11-25 07:11:00 +02:00
Compare commits
14 Commits
d378c6499e
...
75f22215b1
Author | SHA1 | Date | |
---|---|---|---|
|
75f22215b1 | ||
|
be99f6b8e9 | ||
|
e830f97e7e | ||
|
0251546d0d | ||
|
a12afcd601 | ||
|
c7a555abe4 | ||
|
74ff4bf144 | ||
|
2b408913c4 | ||
|
c965b88113 | ||
|
2bc3503fd8 | ||
|
3fbd1cffea | ||
|
4bf3800281 | ||
|
8ec60bf396 | ||
|
5fbbd5e6eb |
12
.github/workflows/windows.yml
vendored
12
.github/workflows/windows.yml
vendored
@ -52,11 +52,11 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: Download And Install 32-bit OpenSSL 3.1.4
|
- name: Download And Install 32-bit OpenSSL 3.1.5
|
||||||
run: |
|
run: |
|
||||||
$installDir = "$Env:ProgramFiles\OpenSSL"
|
$installDir = "$Env:ProgramFiles\OpenSSL"
|
||||||
$installerURL = "https://slproweb.com/download/Win32OpenSSL-3_1_4.exe"
|
$installerURL = "https://slproweb.com/download/Win32OpenSSL-3_1_5.exe"
|
||||||
$installerName = "Win32OpenSSL-3_1_4.exe"
|
$installerName = "Win32OpenSSL-3_1_5.exe"
|
||||||
$installerPath = Join-Path -Path "${env:Temp}" -ChildPath "$installerName"
|
$installerPath = Join-Path -Path "${env:Temp}" -ChildPath "$installerName"
|
||||||
|
|
||||||
(New-Object System.Net.WebClient).DownloadFile($installerURL, $installerPath)
|
(New-Object System.Net.WebClient).DownloadFile($installerURL, $installerPath)
|
||||||
@ -112,11 +112,11 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
- name: Download And Install 64-bit OpenSSL 3.1.4
|
- name: Download And Install 64-bit OpenSSL 3.1.5
|
||||||
run: |
|
run: |
|
||||||
$installDir = "$Env:ProgramFiles\OpenSSL"
|
$installDir = "$Env:ProgramFiles\OpenSSL"
|
||||||
$installerURL = "https://slproweb.com/download/Win64OpenSSL-3_1_4.exe"
|
$installerURL = "https://slproweb.com/download/Win64OpenSSL-3_1_5.exe"
|
||||||
$installerName = "Win64OpenSSL-3_1_4.exe"
|
$installerName = "Win64OpenSSL-3_1_5.exe"
|
||||||
$installerPath = Join-Path -Path "${env:Temp}" -ChildPath "$installerName"
|
$installerPath = Join-Path -Path "${env:Temp}" -ChildPath "$installerName"
|
||||||
|
|
||||||
(New-Object System.Net.WebClient).DownloadFile($installerURL, $installerPath)
|
(New-Object System.Net.WebClient).DownloadFile($installerURL, $installerPath)
|
||||||
|
@ -71,6 +71,7 @@ void CLI::showHelp(char *argv[]) {
|
|||||||
fmt::print("\t-u --upgrade\tspecifies the Product Key will be an \"Upgrade\" version\n");
|
fmt::print("\t-u --upgrade\tspecifies the Product Key will be an \"Upgrade\" version\n");
|
||||||
fmt::print("\t-V --validate\tproduct key to validate signature\n");
|
fmt::print("\t-V --validate\tproduct key to validate signature\n");
|
||||||
fmt::print("\t-N --nonewlines\tdisables newlines (for easier embedding in other apps)\n");
|
fmt::print("\t-N --nonewlines\tdisables newlines (for easier embedding in other apps)\n");
|
||||||
|
fmt::print("\t-o --override\tDisables version check for confirmation ID's, if you need this send an issue on GitHub");
|
||||||
fmt::print("\n");
|
fmt::print("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,6 +93,7 @@ int CLI::parseCommandLine(int argc, char* argv[], Options* options) {
|
|||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
false,
|
false,
|
||||||
|
false,
|
||||||
MODE_BINK1998_GENERATE,
|
MODE_BINK1998_GENERATE,
|
||||||
WINDOWS
|
WINDOWS
|
||||||
};
|
};
|
||||||
@ -210,6 +212,8 @@ int CLI::parseCommandLine(int argc, char* argv[], Options* options) {
|
|||||||
|
|
||||||
} else if (arg == "-N" || arg == "--nonewlines") {
|
} else if (arg == "-N" || arg == "--nonewlines") {
|
||||||
options->nonewlines = true;
|
options->nonewlines = true;
|
||||||
|
} else if (arg == "-o" || arg == "--override") {
|
||||||
|
options->overrideVersion = true;
|
||||||
} else {
|
} else {
|
||||||
options->error = true;
|
options->error = true;
|
||||||
}
|
}
|
||||||
@ -559,7 +563,7 @@ int CLI::BINK2002Validate() {
|
|||||||
|
|
||||||
int CLI::ConfirmationID() {
|
int CLI::ConfirmationID() {
|
||||||
char confirmation_id[49];
|
char confirmation_id[49];
|
||||||
int err = ConfirmationID::Generate(this->options.instid.c_str(), confirmation_id, options.activationMode, options.productid);
|
int err = ConfirmationID::Generate(this->options.instid.c_str(), confirmation_id, options.activationMode, options.productid, options.overrideVersion);
|
||||||
|
|
||||||
switch (err) {
|
switch (err) {
|
||||||
case ERR_TOO_SHORT:
|
case ERR_TOO_SHORT:
|
||||||
|
@ -68,6 +68,7 @@ struct Options {
|
|||||||
bool error;
|
bool error;
|
||||||
bool list;
|
bool list;
|
||||||
bool nonewlines;
|
bool nonewlines;
|
||||||
|
bool overrideVersion;
|
||||||
|
|
||||||
MODE applicationMode;
|
MODE applicationMode;
|
||||||
ACTIVATION_ALGORITHM activationMode;
|
ACTIVATION_ALGORITHM activationMode;
|
||||||
|
@ -773,7 +773,7 @@ void ConfirmationID::Unmix(unsigned char* buffer, size_t bufSize, const unsigned
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ConfirmationID::Generate(const char* installation_id_str, char confirmation_id[49], int mode, std::string productid)
|
int ConfirmationID::Generate(const char* installation_id_str, char confirmation_id[49], int mode, std::string productid, bool overrideVersion)
|
||||||
{
|
{
|
||||||
int version;
|
int version;
|
||||||
unsigned char hardwareID[8];
|
unsigned char hardwareID[8];
|
||||||
@ -870,7 +870,7 @@ int ConfirmationID::Generate(const char* installation_id_str, char confirmation_
|
|||||||
iid_key[3] = 0xF3;
|
iid_key[3] = 0xF3;
|
||||||
}
|
}
|
||||||
Unmix(installation_id, totalCount == 41 ? 17 : 19, iid_key, 4);
|
Unmix(installation_id, totalCount == 41 ? 17 : 19, iid_key, 4);
|
||||||
if (installation_id[18] >= 0x10)
|
if (installation_id[18] >= 0x10 && overrideVersion == false)
|
||||||
return ERR_UNKNOWN_VERSION;
|
return ERR_UNKNOWN_VERSION;
|
||||||
|
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
@ -891,31 +891,37 @@ int ConfirmationID::Generate(const char* installation_id_str, char confirmation_
|
|||||||
productID[2] = (parsed.ProductIDLow >> 27) & ((1 << 24) - 1);
|
productID[2] = (parsed.ProductIDLow >> 27) & ((1 << 24) - 1);
|
||||||
version = (parsed.ProductIDLow >> 51) & 15;
|
version = (parsed.ProductIDLow >> 51) & 15;
|
||||||
productID[3] = (parsed.ProductIDLow >> 55) | (parsed.ProductIDHigh << 9);
|
productID[3] = (parsed.ProductIDLow >> 55) | (parsed.ProductIDHigh << 9);
|
||||||
switch (activationMode) {
|
if (overrideVersion == false) {
|
||||||
case 0:
|
switch (activationMode) {
|
||||||
if (version != (totalCount == 41 ? 9 : 10))
|
case 0:
|
||||||
return ERR_UNKNOWN_VERSION;
|
if (version != (totalCount == 41 ? 9 : 10))
|
||||||
break;
|
return ERR_UNKNOWN_VERSION;
|
||||||
case 1:
|
break;
|
||||||
if (version != 1)
|
case 1:
|
||||||
return ERR_UNKNOWN_VERSION;
|
if (version != 1)
|
||||||
break;
|
return ERR_UNKNOWN_VERSION;
|
||||||
case 3:
|
break;
|
||||||
if (version != 4)
|
case 3:
|
||||||
return ERR_UNKNOWN_VERSION;
|
if (version != 4)
|
||||||
|
return ERR_UNKNOWN_VERSION;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
case 3:
|
case 3:
|
||||||
decode_iid_new_version(installation_id, hardwareID, &version);
|
decode_iid_new_version(installation_id, hardwareID, &version);
|
||||||
switch (activationMode) {
|
if (overrideVersion == false) {
|
||||||
case 2:
|
switch (activationMode) {
|
||||||
if (version != 3)
|
case 2:
|
||||||
return ERR_UNKNOWN_VERSION;
|
if (version != 3)
|
||||||
break;
|
return ERR_UNKNOWN_VERSION;
|
||||||
case 3:
|
break;
|
||||||
|
case 3:
|
||||||
if (version != 4)
|
if (version != 4)
|
||||||
return ERR_UNKNOWN_VERSION;
|
return ERR_UNKNOWN_VERSION;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
memcpy(&parsed, hardwareID, 8);
|
memcpy(&parsed, hardwareID, 8);
|
||||||
productID[0] = stoi(productid.substr(0,5));
|
productID[0] = stoi(productid.substr(0,5));
|
||||||
|
@ -66,7 +66,7 @@ EXPORT class ConfirmationID {
|
|||||||
static void Unmix(unsigned char* buffer, size_t bufSize, const unsigned char* key, size_t keySize);
|
static void Unmix(unsigned char* buffer, size_t bufSize, const unsigned char* key, size_t keySize);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static int Generate(const char* installation_id_str, char confirmation_id[49], int mode, std::string productid);
|
static int Generate(const char* installation_id_str, char confirmation_id[49], int mode, std::string productid, bool overrideVersion);
|
||||||
//EXPORT static int CLIRun();
|
//EXPORT static int CLIRun();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -27,8 +27,8 @@
|
|||||||
#include "pidgen3/BINK2002.h"
|
#include "pidgen3/BINK2002.h"
|
||||||
#include "pidgen2/PIDGEN2.h"
|
#include "pidgen2/PIDGEN2.h"
|
||||||
|
|
||||||
FNEXPORT int ConfirmationID_Generate(const char* installation_id_str, char confirmation_id[49], int mode, std::string productid) {
|
FNEXPORT int ConfirmationID_Generate(const char* installation_id_str, char confirmation_id[49], int mode, std::string productid, bool bypassVersion) {
|
||||||
return ConfirmationID::Generate(installation_id_str, confirmation_id, mode, productid);
|
return ConfirmationID::Generate(installation_id_str, confirmation_id, mode, productid, bypassVersion);
|
||||||
}
|
}
|
||||||
|
|
||||||
FNEXPORT EC_GROUP* PIDGEN3_initializeEllipticCurve(char* pSel, char* aSel, char* bSel, char* generatorXSel, char* generatorYSel, char* publicKeyXSel, char* publicKeyYSel, EC_POINT *&genPoint, EC_POINT *&pubPoint) {
|
FNEXPORT EC_GROUP* PIDGEN3_initializeEllipticCurve(char* pSel, char* aSel, char* bSel, char* generatorXSel, char* generatorYSel, char* publicKeyXSel, char* publicKeyYSel, EC_POINT *&genPoint, EC_POINT *&pubPoint) {
|
||||||
|
Loading…
Reference in New Issue
Block a user