diff --git a/.github/workflows/action.yml b/.github/workflows/action.yml new file mode 100644 index 0000000..26e5b25 --- /dev/null +++ b/.github/workflows/action.yml @@ -0,0 +1,40 @@ +name: WinRAR Keygen + +on: + push: + branches: [ master ] + paths: + - 'keygen/*.json' + +jobs: + build: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Get key text1 + id: text1 + uses: notiz-dev/github-action-json-property@release + with: + path: 'keygen/info.json' + prop_path: 'text1' + + - name: Get key text2 + id: text2 + uses: notiz-dev/github-action-json-property@release + with: + path: 'keygen/info.json' + prop_path: 'text2' + + - name: Generate key + shell: powershell + run: | + bin/x64-Release/winrar-keygen.exe ${{steps.text1.outputs.prop}} ${{steps.text2.outputs.prop}} > rarreg.key + - name: Upload key + uses: actions/upload-artifact@v2 + with: + name: rarreg_file + path: rarreg.key + retention-days: 90 \ No newline at end of file diff --git a/.vs/winrar-keygen/v17/.suo b/.vs/winrar-keygen/v17/.suo index 2bbf1fe..2f06ffa 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 d58ec73..bf7b227 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/668bd2139634a6e1/_TMAIN.ipch b/.vs/winrar-keygen/v17/ipch/AutoPCH/668bd2139634a6e1/_TMAIN.ipch new file mode 100644 index 0000000..bcd93a3 Binary files /dev/null and b/.vs/winrar-keygen/v17/ipch/AutoPCH/668bd2139634a6e1/_TMAIN.ipch differ diff --git a/README.md b/README.md index 76a4cff..4d495cc 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@

- WinRAR Keygen + WinRAR Keygen

WinRAR Keygen

Principle of WinRAR key generation

@@ -9,6 +9,9 @@ Issues + + + License @@ -33,13 +36,69 @@ This repository will tell you how WinRAR license file `"rarreg.key"` is generate See [here](README.HOW_DOES_IT_WORK.md). -## 3. How to build? +## 3. Use Github Actions -If you don't want to compile it yourself, you can also go to the [release page](https://github.com/bitcookies/winrar-keygen/releases/) to get `winrar-keygen.exe`. +Github Action is a CI/CD tool introduced after Microsoft acquired Github, and you can run programs on GitHub Action by following these steps. -### 3.1 Prerequisites +### 3.1 Fork -1. Please make sure that you have **Visual Studio 2022**. Because this is a VS2022 project. If you are still using Visual Studio 2019, you can find projects for VS2019 in the [vs2019](https://github.com/bitcookies/winrar-keygen/tree/vs2019) branch. +**Fork** this repo. + +![step-1](assets/actions-step-1.png) + +If you've forked before and I've committed new code, but you don't know how to merge the new content into your repository, then you can delete the current fork and fork again. + +### 3.2 Modify info.json + +Go to `keygen/info.json` and click on the edit button to edit the file. + +![step-2](assets/actions-step-2.png) + +You can see: + +```json +{ + "text1": "Github", + "text2": "Github.com" +} +``` + +You can modify the values corresponding to `text1` and `text2` + +```json +{ + "text1": "yourname", + "text2": "yourteam" +} +``` + +It is important to note that `test1` and `test2` are **ANSI-encoded string, without null-terminator.** + +Once you have finished making changes, click the **Commit changes** button and Github Actions will start automatically. + +### 3.3 Download key + +Go to the Actions page to see the status of the program. + +![step-3](assets/actions-step-3.png) + +Green means it ran successfully, yellow means it is running, red means it failed. After running successfully, open the corresponding task and select **rarreg_file** to download. + +![step-4](assets/actions-step-4.png) + +After decompression, you will get `rarreg.key `, just drag and drop it into WinRAR. + +If you get an invalid key, check that the `test1` and `test2 ` parameters are **ANSI encoded without spaces.** + +## 4. Build in Visual Studio + +I recommend using the Github Actions, but you can still do your own compilation. + +If you don't want to compile it yourself, you can also go to the [release](https://github.com/bitcookies/winrar-keygen/releases/) page to get `winrar-keygen.exe`. + +### 4.1 Prerequisites + +1. Please make sure that you have **Visual Studio 2022**. Because this is a VS2022 project. If you are still using Visual Studio 2019, you can find projects for VS2019 in the [vs2019](https://github.com/bitcookies/winrar-keygen/tree/vs2019) branch, but this branch will no longer be maintained. 2. Please make sure you have installed `vcpkg` and the following libraries: @@ -62,7 +121,7 @@ If you don't want to compile it yourself, you can also go to the [release page]( ``` -### 3.2 Build +### 4.2 Build 1. Open this project in __Visual Studio__. @@ -72,7 +131,7 @@ If you don't want to compile it yourself, you can also go to the [release page]( You will see executable files in `bin/` directory. -## 4. How to Use? +### 4.3 How to Use? Execute the following code in the terminal and configure two parameters to generate `rarreg.key`. @@ -89,7 +148,7 @@ Example: winrar-keygen.exe "Github" "Github.com" > rarreg.key ``` -![Terminal](terminal.png) +![Terminal](assets/terminal.png) Now you can see the newly generated file. @@ -115,7 +174,7 @@ Why is my `rarreg.key` invalid? ### 5.1 ANSI Encoded -Username and License type are **ANSI-encoded string, without null-terminator.** +`test1` and `test2` are **ANSI-encoded string, without null-terminator.** ```console winrar-keygen.exe diff --git a/README.zh-CN.md b/README.zh-CN.md index 287da08..28ed1c6 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,5 +1,5 @@

- WinRAR Keygen + WinRAR Keygen

WinRAR Keygen

Principle of WinRAR key generation

@@ -9,6 +9,9 @@ Issues + + + License @@ -33,13 +36,69 @@ WinRAR不是免费软件。如果你想使用它,你应当向 [__RARLAB__](htt 见 [这里](README.HOW_DOES_IT_WORK.zh-CN.md)。 -## 3. 如何编译? +## 3. 通过 Github Actions 使用 + +Github Action 是微软收购 Github 之后推出的 CI/CD 工具,通过以下步骤即可在 GitHub Action 上运行程序: + +### 3.1 Fork + +点击该项目右上角的 **Fork** 按钮,fork 一份代码到你的 Github: + +![step-1](assets/actions-step-1.png) + +如果你之前 fork 过,然后我提交了新的代码,但是你不懂得如何合并新内容到你的仓库,那你也可以删掉当前 fork 的仓库,然后重新 fork 一次。 + +### 3.2 修改 info.json + +进入 `keygen/info.json`,点击编辑按钮,对该文件进行编辑: + +![step-2](assets/actions-step-2.png) + +打开该文件,你会发现有以下内容: + +```json +{ + "text1": "Github", + "text2": "Github.com" +} +``` + +你可以自己修改 `text1` 和 `text2` 相对应的值,例如: + +```json +{ + "text1": "yourname", + "text2": "yourteam" +} +``` + +需要注意的是,`test1` 和 `test2 ` 参数均是**不含空格的 ANSI 编码。** + +修改完成之后,点击 **Commit changes** 按钮,Github Actions 会自动开始。 + +### 3.3 下载文件 + +进入 Actions 页面查看程序运行状况: + +![step-3](assets/actions-step-3.png) + +绿色说明运行成功,黄色说明正在运行,红色说明运行失败。运行成功之后,打开对应的任务,选择 **rarreg_file** 下载: + +![step-4](assets/actions-step-4.png) + +解压缩后会得到 `rarreg.key ` ,拖动导入 WinRAR 即可。 + +如果你得到的是无效的 key,请检查 `test1` 和 `test2 ` 参数是否是**不含空格的 ANSI 编码。** + +## 4. 通过 Visual Studio 编译使用 + +我建议通过 Github Actions 的方法来使用,但是你仍然可以自己进行编译。 如果你不想自己编译,也可以到 [Release](https://github.com/bitcookies/winrar-keygen/releases/) 页面获取对应版本的 `winrar-keygen.exe`。 -### 3.1 前提条件 +### 4.1 前提条件 -1. 请确保你有 **Visual Studio 2022**,因为这是一个 VS2022 项目。如果你仍在使用 Visual Studio 2019,可以在 [vs2019](https://github.com/bitcookies/winrar-keygen/tree/vs2019) 分支中找到适合 VS2019 的项目。 +1. 请确保你有 **Visual Studio 2022**,因为这是一个 VS2022 项目。如果你仍在使用 Visual Studio 2019,可以在 [vs2019](https://github.com/bitcookies/winrar-keygen/tree/vs2019) 分支中找到适合 VS2019 的项目,但是此分支将不再维护。 2. 请确保你安装了 `vcpkg` 以及下面几个库: @@ -60,7 +119,7 @@ WinRAR不是免费软件。如果你想使用它,你应当向 [__RARLAB__](htt $ vcpkg integrate install ``` -### 3.2 编译 +### 4.2 编译 1. 在 __Visual Studio__ 中打开这个项目。 2. 选择 `Release` 配置。 @@ -68,7 +127,7 @@ WinRAR不是免费软件。如果你想使用它,你应当向 [__RARLAB__](htt 你将在 `bin/` 目录下看到生成的文件。 -## 4. 如何使用? +### 4.3 如何使用? 直接在终端执行以下代码,配置两个参数即可生成 `rarreg.key`。 @@ -85,7 +144,7 @@ Example: winrar-keygen.exe "Github" "Github.com" > rarreg.key ``` -![Terminal](terminal.png) +![Terminal](assets/terminal.png) 现在你可以看到新生成的文件: @@ -111,7 +170,7 @@ de3cdc56b311475b484e80b48157a0c3af60ca4f7f9c75d49bc50d ### 5.1 ANSI编码 -用户名参数以及生成的许可文本,均是 **不含空格的 ANSI 编码。** +`test1` 以及 `test2` 生成的许可文本,均是 **不含空格的 ANSI 编码。** ```console winrar-keygen.exe diff --git a/assets/actions-step-1.png b/assets/actions-step-1.png new file mode 100644 index 0000000..01181be Binary files /dev/null and b/assets/actions-step-1.png differ diff --git a/assets/actions-step-2.png b/assets/actions-step-2.png new file mode 100644 index 0000000..0bf9547 Binary files /dev/null and b/assets/actions-step-2.png differ diff --git a/assets/actions-step-3.png b/assets/actions-step-3.png new file mode 100644 index 0000000..270b160 Binary files /dev/null and b/assets/actions-step-3.png differ diff --git a/assets/actions-step-4.png b/assets/actions-step-4.png new file mode 100644 index 0000000..115f8c0 Binary files /dev/null and b/assets/actions-step-4.png differ diff --git a/assets/keygen-icon.png b/assets/keygen-icon.png new file mode 100644 index 0000000..98125af Binary files /dev/null and b/assets/keygen-icon.png differ diff --git a/terminal.png b/assets/terminal.png similarity index 100% rename from terminal.png rename to assets/terminal.png diff --git a/bin/Win32-Release/winrar-keygen.exe b/bin/Win32-Release/winrar-keygen.exe index 384dac8..6355f83 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 e32e559..337209d 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 bb837ff..8c661d1 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 7318ff1..28ddba9 100644 Binary files a/bin/x64-Release/winrar-keygen.pdb and b/bin/x64-Release/winrar-keygen.pdb differ diff --git a/icon.ico b/icon.ico index cdd1894..cd53c19 100644 Binary files a/icon.ico and b/icon.ico differ diff --git a/icon.png b/icon.png index 2496654..d4973c1 100644 Binary files a/icon.png and b/icon.png differ diff --git a/icon.svg b/icon.svg deleted file mode 100644 index 39f9d9d..0000000 --- a/icon.svg +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - -W -i -n -R -A -R - -K -e -y -g -e -n - diff --git a/keygen/info.json b/keygen/info.json new file mode 100644 index 0000000..16d21a8 --- /dev/null +++ b/keygen/info.json @@ -0,0 +1,4 @@ +{ + "text1": "Github", + "text2": "Github.com" +} diff --git a/winrar-keygen.aps b/winrar-keygen.aps index 630bc4b..d930a37 100644 Binary files a/winrar-keygen.aps and b/winrar-keygen.aps differ diff --git a/winrar-keygen.rc b/winrar-keygen.rc index cdc2fb7..1cff518 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,4,0 - PRODUCTVERSION 1,0,4,0 + FILEVERSION 2,0,0,0 + PRODUCTVERSION 2,0,0,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.4.0" + VALUE "FileVersion", "2.0.0.0" VALUE "InternalName", "winrar-keygen.exe" VALUE "LegalCopyright", "Copyright (C) 2021" VALUE "OriginalFilename", "winrar-keygen.exe" VALUE "ProductName", "WinRAR Keygen" - VALUE "ProductVersion", "1.0.4.0" + VALUE "ProductVersion", "2.0.0.0" END END BLOCK "VarFileInfo"