🎉 v1.0.4

fix a internal error: The length of register data is not correct
This commit is contained in:
BitCookies 2021-12-05 19:38:52 +08:00 committed by bitcookies
parent 7b98b4f08a
commit d7d090049e
50 changed files with 86 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View file

@ -55,13 +55,12 @@ If you don't want to compile it yourself, you can also go to the [release page](
$ vcpkg install mpir:x64-windows-static $ vcpkg install mpir:x64-windows-static
``` ```
3. Your `vcpkg` has been integrated into your __Visual Studio__, which means you have run 3. Your `vcpkg` has been integrated into your __Visual Studio__, which means you have run successfully.
```console ```console
$ vcpkg integrate install $ vcpkg integrate install
``` ```
successfully.
### 3.2 Build ### 3.2 Build

View file

@ -189,7 +189,7 @@ public:
RegInfo.Items[0] = GeneratePublicKeySM2CompressedFormat(RegInfo.Items[3].c_str()); RegInfo.Items[0] = GeneratePublicKeySM2CompressedFormat(RegInfo.Items[3].c_str());
RegInfo.UID = HelperStringFormat("%.16s%.4s", temp.c_str() + 48, RegInfo.Items[0].c_str()); RegInfo.UID = HelperStringFormat("%.16s%.4s", temp.c_str() + 48, RegInfo.Items[0].c_str());
while (true) { /*while (true) {
auto LicenseTypeSignature = Sign(RegInfo.LicenseType.c_str(), RegInfo.LicenseType.length()); auto LicenseTypeSignature = Sign(RegInfo.LicenseType.c_str(), RegInfo.LicenseType.length());
auto LicenseTypeSignatureR = LicenseTypeSignature.r.ToString(16, true); auto LicenseTypeSignatureR = LicenseTypeSignature.r.ToString(16, true);
auto LicenseTypeSignatureS = LicenseTypeSignature.s.ToString(16, true); auto LicenseTypeSignatureS = LicenseTypeSignature.s.ToString(16, true);
@ -197,10 +197,27 @@ public:
RegInfo.Items[1] = HelperStringFormat("60%060s%060s", LicenseTypeSignatureS.c_str(), LicenseTypeSignatureR.c_str()); RegInfo.Items[1] = HelperStringFormat("60%060s%060s", LicenseTypeSignatureS.c_str(), LicenseTypeSignatureR.c_str());
break; break;
} }
}*/
// Fix InternalError: The length of register data is not correct.
while (true) {
auto LicenseTypeSignature = Sign(RegInfo.LicenseType.c_str(), RegInfo.LicenseType.length());
auto LicenseTypeSignatureR = LicenseTypeSignature.r.ToString(16, true);
auto LicenseTypeSignatureS = LicenseTypeSignature.s.ToString(16, true);
if (LicenseTypeSignatureR.length() < 60) {
LicenseTypeSignatureR.insert(LicenseTypeSignatureR.begin(), 60 - LicenseTypeSignatureR.size(), '0');
}
if (LicenseTypeSignatureS.length() < 60) {
LicenseTypeSignatureS.insert(LicenseTypeSignatureS.begin(), 60 - LicenseTypeSignatureS.size(), '0');
}
if (LicenseTypeSignatureR.length() == 60 && LicenseTypeSignatureS.length() == 60) {
RegInfo.Items[1] = HelperStringFormat("60%060s%060s", LicenseTypeSignatureS.c_str(), LicenseTypeSignatureR.c_str());
break;
}
} }
temp = RegInfo.UserName + RegInfo.Items[0]; temp = RegInfo.UserName + RegInfo.Items[0];
while (true) { /*while (true) {
auto UserNameSignature = Sign(temp.c_str(), temp.length()); auto UserNameSignature = Sign(temp.c_str(), temp.length());
auto UserNameSignatureR = UserNameSignature.r.ToString(16, true); auto UserNameSignatureR = UserNameSignature.r.ToString(16, true);
auto UserNameSignatureS = UserNameSignature.s.ToString(16, true); auto UserNameSignatureS = UserNameSignature.s.ToString(16, true);
@ -208,6 +225,23 @@ public:
RegInfo.Items[2] = HelperStringFormat("60%060s%060s", UserNameSignatureS.c_str(), UserNameSignatureR.c_str()); RegInfo.Items[2] = HelperStringFormat("60%060s%060s", UserNameSignatureS.c_str(), UserNameSignatureR.c_str());
break; break;
} }
}*/
// Fix InternalError: The length of register data is not correct.
while (true) {
auto UserNameSignature = Sign(temp.c_str(), temp.length());
auto UserNameSignatureR = UserNameSignature.r.ToString(16, true);
auto UserNameSignatureS = UserNameSignature.s.ToString(16, true);
if (UserNameSignatureR.length() < 60) {
UserNameSignatureR.insert(UserNameSignatureR.begin(), 60 - UserNameSignatureR.size(), '0');
}
if (UserNameSignatureS.length() < 60) {
UserNameSignatureS.insert(UserNameSignatureS.begin(), 60 - UserNameSignatureS.size(), '0');
}
if (UserNameSignatureR.length() == 60 || UserNameSignatureS.length() == 60) {
RegInfo.Items[2] = HelperStringFormat("60%060s%060s", UserNameSignatureS.c_str(), UserNameSignatureR.c_str());
break;
}
} }
CalculateChecksum(RegInfo); CalculateChecksum(RegInfo);
@ -224,6 +258,8 @@ public:
RegInfo.Items[3].c_str(), RegInfo.Items[3].c_str(),
RegInfo.Checksum RegInfo.Checksum
); );
// maybe have fixed
if (RegInfo.HexData.length() % 54 != 0) { if (RegInfo.HexData.length() % 54 != 0) {
throw std::runtime_error("InternalError: The length of register data is not correct."); throw std::runtime_error("InternalError: The length of register data is not correct.");
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
obj/Win32-Release/vc143.pdb Normal file

Binary file not shown.

View file

@ -0,0 +1 @@


View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>D:\Users\haoning\Documents\GitHub\@bitcookies\winrar-keygen\bin\Win32-Release\winrar-keygen.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,6 @@
 _tmain.cpp
正在生成代码
Previous IPDB not found, fall back to full compilation.
All 413 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
已完成代码的生成
winrar-keygen.vcxproj -> D:\Users\haoning\Documents\GitHub\@bitcookies\winrar-keygen\bin\Win32-Release\winrar-keygen.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native32Bit:VCToolsVersion=14.30.30705:TargetPlatformVersion=10.0.19041.0:
Release|Win32|D:\Users\haoning\Documents\GitHub\@bitcookies\winrar-keygen\|

BIN
obj/x64-Release/_tmain.obj Normal file

Binary file not shown.

BIN
obj/x64-Release/vc143.pdb Normal file

Binary file not shown.

View file

@ -0,0 +1 @@


View file

@ -0,0 +1,3 @@
d:\users\haoning\documents\github\@bitcookies\winrar-keygen\bin\x64-release\winrar-keygen.pdb
d:\users\haoning\documents\github\@bitcookies\winrar-keygen\bin\x64-release\winrar-keygen.exe
d:\users\haoning\documents\github\@bitcookies\winrar-keygen\obj\x64-release\winrar-keygen.vcxproj.filelistabsolute.txt

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<ProjectOutputs>
<ProjectOutput>
<FullPath>D:\Users\haoning\Documents\GitHub\@bitcookies\winrar-keygen\bin\x64-Release\winrar-keygen.exe</FullPath>
</ProjectOutput>
</ProjectOutputs>
<ContentFiles />
<SatelliteDlls />
<NonRecipeFileRefs />
</Project>

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,6 @@
 _tmain.cpp
正在生成代码
Previous IPDB not found, fall back to full compilation.
All 414 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
已完成代码的生成
winrar-keygen.vcxproj -> D:\Users\haoning\Documents\GitHub\@bitcookies\winrar-keygen\bin\x64-Release\winrar-keygen.exe

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -0,0 +1,2 @@
PlatformToolSet=v143:VCToolArchitecture=Native64Bit:VCToolsVersion=14.30.30705:TargetPlatformVersion=10.0.19041.0:
Release|x64|D:\Users\haoning\Documents\GitHub\@bitcookies\winrar-keygen\|

Binary file not shown.

View file

@ -61,8 +61,8 @@ IDI_ICON1 ICON "icon.ico"
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,3,0 FILEVERSION 1,0,4,0
PRODUCTVERSION 1,0,3,0 PRODUCTVERSION 1,0,4,0
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -79,12 +79,12 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "WinRAR Keygen" VALUE "CompanyName", "WinRAR Keygen"
VALUE "FileDescription", "WinRAR Key Generation Tool" VALUE "FileDescription", "WinRAR Key Generation Tool"
VALUE "FileVersion", "1.0.3.0" VALUE "FileVersion", "1.0.4.0"
VALUE "InternalName", "winrar-keygen.exe" VALUE "InternalName", "winrar-keygen.exe"
VALUE "LegalCopyright", "Copyright (C) 2021" VALUE "LegalCopyright", "Copyright (C) 2021"
VALUE "OriginalFilename", "winrar-keygen.exe" VALUE "OriginalFilename", "winrar-keygen.exe"
VALUE "ProductName", "WinRAR Keygen" VALUE "ProductName", "WinRAR Keygen"
VALUE "ProductVersion", "1.0.3.0" VALUE "ProductVersion", "1.0.4.0"
END END
END END
BLOCK "VarFileInfo" BLOCK "VarFileInfo"