diff --git a/.vs/winrar-keygen/v17/.suo b/.vs/winrar-keygen/v17/.suo index 0eea669..37cd2e9 100644 Binary files a/.vs/winrar-keygen/v17/.suo and b/.vs/winrar-keygen/v17/.suo differ diff --git a/.vs/winrar-keygen/v17/Browse.VC.db b/.vs/winrar-keygen/v17/Browse.VC.db index f57781a..9e4a701 100644 Binary files a/.vs/winrar-keygen/v17/Browse.VC.db and b/.vs/winrar-keygen/v17/Browse.VC.db differ diff --git a/.vs/winrar-keygen/v17/ipch/AutoPCH/d7897464e69c1b44/_TMAIN.ipch b/.vs/winrar-keygen/v17/ipch/AutoPCH/d7897464e69c1b44/_TMAIN.ipch new file mode 100644 index 0000000..3ea4728 Binary files /dev/null and b/.vs/winrar-keygen/v17/ipch/AutoPCH/d7897464e69c1b44/_TMAIN.ipch differ diff --git a/README.md b/README.md index 945cacb..a622971 100644 --- a/README.md +++ b/README.md @@ -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 ``` -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 $ vcpkg integrate install ``` - successfully. ### 3.2 Build diff --git a/WinRarKeygen.hpp b/WinRarKeygen.hpp index 2eb42da..e2a5f2a 100644 --- a/WinRarKeygen.hpp +++ b/WinRarKeygen.hpp @@ -189,7 +189,7 @@ public: RegInfo.Items[0] = GeneratePublicKeySM2CompressedFormat(RegInfo.Items[3].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 LicenseTypeSignatureR = LicenseTypeSignature.r.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()); 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]; - while (true) { + /*while (true) { auto UserNameSignature = Sign(temp.c_str(), temp.length()); auto UserNameSignatureR = UserNameSignature.r.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()); 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); @@ -224,6 +258,8 @@ public: RegInfo.Items[3].c_str(), RegInfo.Checksum ); + + // maybe have fixed if (RegInfo.HexData.length() % 54 != 0) { throw std::runtime_error("InternalError: The length of register data is not correct."); } diff --git a/bin/Win32-Release/winrar-keygen.exe b/bin/Win32-Release/winrar-keygen.exe index f0ec527..ef5352e 100644 Binary files a/bin/Win32-Release/winrar-keygen.exe and b/bin/Win32-Release/winrar-keygen.exe differ diff --git a/bin/Win32-Release/winrar-keygen.pdb b/bin/Win32-Release/winrar-keygen.pdb index 92e0eb4..2cea42d 100644 Binary files a/bin/Win32-Release/winrar-keygen.pdb and b/bin/Win32-Release/winrar-keygen.pdb differ diff --git a/bin/x64-Release/winrar-keygen.exe b/bin/x64-Release/winrar-keygen.exe index 091f9d4..4b64991 100644 Binary files a/bin/x64-Release/winrar-keygen.exe and b/bin/x64-Release/winrar-keygen.exe differ diff --git a/bin/x64-Release/winrar-keygen.pdb b/bin/x64-Release/winrar-keygen.pdb index 4ecb3d7..cfa0941 100644 Binary files a/bin/x64-Release/winrar-keygen.pdb and b/bin/x64-Release/winrar-keygen.pdb differ diff --git a/obj/Win32-Release/_tmain.obj b/obj/Win32-Release/_tmain.obj new file mode 100644 index 0000000..c9f9d16 Binary files /dev/null and b/obj/Win32-Release/_tmain.obj differ diff --git a/obj/Win32-Release/vc143.pdb b/obj/Win32-Release/vc143.pdb new file mode 100644 index 0000000..2ff647c Binary files /dev/null and b/obj/Win32-Release/vc143.pdb differ diff --git a/obj/Win32-Release/vcpkg.applocal.log b/obj/Win32-Release/vcpkg.applocal.log new file mode 100644 index 0000000..e02abfc --- /dev/null +++ b/obj/Win32-Release/vcpkg.applocal.log @@ -0,0 +1 @@ + diff --git a/obj/Win32-Release/winrar-keygen.exe.recipe b/obj/Win32-Release/winrar-keygen.exe.recipe new file mode 100644 index 0000000..8978cb6 --- /dev/null +++ b/obj/Win32-Release/winrar-keygen.exe.recipe @@ -0,0 +1,11 @@ + + + + + D:\Users\haoning\Documents\GitHub\@bitcookies\winrar-keygen\bin\Win32-Release\winrar-keygen.exe + + + + + + \ No newline at end of file diff --git a/obj/Win32-Release/winrar-keygen.iobj b/obj/Win32-Release/winrar-keygen.iobj new file mode 100644 index 0000000..0591444 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.iobj differ diff --git a/obj/Win32-Release/winrar-keygen.ipdb b/obj/Win32-Release/winrar-keygen.ipdb new file mode 100644 index 0000000..6a308c9 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.ipdb differ diff --git a/obj/Win32-Release/winrar-keygen.log b/obj/Win32-Release/winrar-keygen.log new file mode 100644 index 0000000..3eb6fad --- /dev/null +++ b/obj/Win32-Release/winrar-keygen.log @@ -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 diff --git a/obj/Win32-Release/winrar-keygen.res b/obj/Win32-Release/winrar-keygen.res new file mode 100644 index 0000000..a2c1ea3 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.res differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/CL.command.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/CL.command.1.tlog new file mode 100644 index 0000000..b9577e4 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/CL.command.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/CL.read.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/CL.read.1.tlog new file mode 100644 index 0000000..128a2d5 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/CL.read.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/CL.write.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/CL.write.1.tlog new file mode 100644 index 0000000..d4058ad Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/CL.write.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/link.command.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/link.command.1.tlog new file mode 100644 index 0000000..c470409 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/link.command.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/link.read.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/link.read.1.tlog new file mode 100644 index 0000000..1ee74fe Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/link.read.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/link.write.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/link.write.1.tlog new file mode 100644 index 0000000..40a3257 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/link.write.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/rc.command.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/rc.command.1.tlog new file mode 100644 index 0000000..26e5be8 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/rc.command.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/rc.read.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/rc.read.1.tlog new file mode 100644 index 0000000..10df12a Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/rc.read.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/rc.write.1.tlog b/obj/Win32-Release/winrar-keygen.tlog/rc.write.1.tlog new file mode 100644 index 0000000..88bce4c Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/rc.write.1.tlog differ diff --git a/obj/Win32-Release/winrar-keygen.tlog/winrar-keygen.lastbuildstate b/obj/Win32-Release/winrar-keygen.tlog/winrar-keygen.lastbuildstate new file mode 100644 index 0000000..5ca4be2 --- /dev/null +++ b/obj/Win32-Release/winrar-keygen.tlog/winrar-keygen.lastbuildstate @@ -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\| diff --git a/obj/Win32-Release/winrar-keygen.tlog/winrar-keygen.write.1u.tlog b/obj/Win32-Release/winrar-keygen.tlog/winrar-keygen.write.1u.tlog new file mode 100644 index 0000000..1aa6284 Binary files /dev/null and b/obj/Win32-Release/winrar-keygen.tlog/winrar-keygen.write.1u.tlog differ diff --git a/obj/x64-Release/_tmain.obj b/obj/x64-Release/_tmain.obj new file mode 100644 index 0000000..198c52e Binary files /dev/null and b/obj/x64-Release/_tmain.obj differ diff --git a/obj/x64-Release/vc143.pdb b/obj/x64-Release/vc143.pdb new file mode 100644 index 0000000..bd66968 Binary files /dev/null and b/obj/x64-Release/vc143.pdb differ diff --git a/obj/x64-Release/vcpkg.applocal.log b/obj/x64-Release/vcpkg.applocal.log new file mode 100644 index 0000000..e02abfc --- /dev/null +++ b/obj/x64-Release/vcpkg.applocal.log @@ -0,0 +1 @@ + diff --git a/obj/x64-Release/winrar-keygen.Build.CppClean.log b/obj/x64-Release/winrar-keygen.Build.CppClean.log new file mode 100644 index 0000000..49edd58 --- /dev/null +++ b/obj/x64-Release/winrar-keygen.Build.CppClean.log @@ -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 diff --git a/obj/x64-Release/winrar-keygen.exe.recipe b/obj/x64-Release/winrar-keygen.exe.recipe new file mode 100644 index 0000000..e87dced --- /dev/null +++ b/obj/x64-Release/winrar-keygen.exe.recipe @@ -0,0 +1,11 @@ + + + + + D:\Users\haoning\Documents\GitHub\@bitcookies\winrar-keygen\bin\x64-Release\winrar-keygen.exe + + + + + + \ No newline at end of file diff --git a/obj/x64-Release/winrar-keygen.iobj b/obj/x64-Release/winrar-keygen.iobj new file mode 100644 index 0000000..cba9412 Binary files /dev/null and b/obj/x64-Release/winrar-keygen.iobj differ diff --git a/obj/x64-Release/winrar-keygen.ipdb b/obj/x64-Release/winrar-keygen.ipdb new file mode 100644 index 0000000..053a45b Binary files /dev/null and b/obj/x64-Release/winrar-keygen.ipdb differ diff --git a/obj/x64-Release/winrar-keygen.log b/obj/x64-Release/winrar-keygen.log new file mode 100644 index 0000000..3869662 --- /dev/null +++ b/obj/x64-Release/winrar-keygen.log @@ -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 diff --git a/obj/x64-Release/winrar-keygen.res b/obj/x64-Release/winrar-keygen.res new file mode 100644 index 0000000..a2c1ea3 Binary files /dev/null and b/obj/x64-Release/winrar-keygen.res differ diff --git a/obj/x64-Release/winrar-keygen.tlog/CL.command.1.tlog b/obj/x64-Release/winrar-keygen.tlog/CL.command.1.tlog new file mode 100644 index 0000000..b96d72c Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/CL.command.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/CL.read.1.tlog b/obj/x64-Release/winrar-keygen.tlog/CL.read.1.tlog new file mode 100644 index 0000000..2ff44e7 Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/CL.read.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/CL.write.1.tlog b/obj/x64-Release/winrar-keygen.tlog/CL.write.1.tlog new file mode 100644 index 0000000..59d8e97 Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/CL.write.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/link.command.1.tlog b/obj/x64-Release/winrar-keygen.tlog/link.command.1.tlog new file mode 100644 index 0000000..3007211 Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/link.command.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/link.read.1.tlog b/obj/x64-Release/winrar-keygen.tlog/link.read.1.tlog new file mode 100644 index 0000000..e59118b Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/link.read.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/link.write.1.tlog b/obj/x64-Release/winrar-keygen.tlog/link.write.1.tlog new file mode 100644 index 0000000..0fa20b5 Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/link.write.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/rc.command.1.tlog b/obj/x64-Release/winrar-keygen.tlog/rc.command.1.tlog new file mode 100644 index 0000000..d994b2a Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/rc.command.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/rc.read.1.tlog b/obj/x64-Release/winrar-keygen.tlog/rc.read.1.tlog new file mode 100644 index 0000000..10df12a Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/rc.read.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/rc.write.1.tlog b/obj/x64-Release/winrar-keygen.tlog/rc.write.1.tlog new file mode 100644 index 0000000..d7b935f Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/rc.write.1.tlog differ diff --git a/obj/x64-Release/winrar-keygen.tlog/winrar-keygen.lastbuildstate b/obj/x64-Release/winrar-keygen.tlog/winrar-keygen.lastbuildstate new file mode 100644 index 0000000..1e880b0 --- /dev/null +++ b/obj/x64-Release/winrar-keygen.tlog/winrar-keygen.lastbuildstate @@ -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\| diff --git a/obj/x64-Release/winrar-keygen.tlog/winrar-keygen.write.1u.tlog b/obj/x64-Release/winrar-keygen.tlog/winrar-keygen.write.1u.tlog new file mode 100644 index 0000000..93c2805 Binary files /dev/null and b/obj/x64-Release/winrar-keygen.tlog/winrar-keygen.write.1u.tlog differ diff --git a/winrar-keygen.aps b/winrar-keygen.aps index f0fed6d..630bc4b 100644 Binary files a/winrar-keygen.aps and b/winrar-keygen.aps differ diff --git a/winrar-keygen.rc b/winrar-keygen.rc index 48ce6c6..cdc2fb7 100644 --- a/winrar-keygen.rc +++ b/winrar-keygen.rc @@ -61,8 +61,8 @@ IDI_ICON1 ICON "icon.ico" // VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,3,0 - PRODUCTVERSION 1,0,3,0 + FILEVERSION 1,0,4,0 + PRODUCTVERSION 1,0,4,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -79,12 +79,12 @@ BEGIN BEGIN VALUE "CompanyName", "WinRAR Keygen" VALUE "FileDescription", "WinRAR Key Generation Tool" - VALUE "FileVersion", "1.0.3.0" + VALUE "FileVersion", "1.0.4.0" VALUE "InternalName", "winrar-keygen.exe" VALUE "LegalCopyright", "Copyright (C) 2021" VALUE "OriginalFilename", "winrar-keygen.exe" VALUE "ProductName", "WinRAR Keygen" - VALUE "ProductVersion", "1.0.3.0" + VALUE "ProductVersion", "1.0.4.0" END END BLOCK "VarFileInfo"