Skip to content

PeppeMonster/winrar-keygen

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WinRAR Keygen

WinRAR Keygen

Principle of WinRAR key generation

Issues License

简体中文 | English

1. What is WinRAR?

WinRAR is a trialware file archiver utility for Windows, developed by Eugene Roshal of win.rar GmbH.

It can create and view archives in RAR or ZIP file formats and unpack numerous archive file formats.

WinRAR is not a free software. If you want to use it, you should pay to RARLAB and then you will get a license file named rarreg.key.

This repository will tell you how WinRAR license file "rarreg.key" is generated.

2. How is "rarreg.key" generated?

See here.

3. How to use?

There are several ways to use it:

4. Encoding

WinRAR Keygen supports ASCII, ANSI and UTF-8 encoding types, the following is a brief description of the three encoding types.

Warning

It is recommended that you do not generate licenses with non-ASCII characters in ANSI encoding for the time being, as there is a problem with garbled PowerShell console characters for Chinese, Japanese, and Korean on Windows Server 2022, which is being fixed by Microsoft.

Encoding Instruction Supported Characters
ASCII Single byte encoding only using the bottom 7 bits. (Unicode code points 0-127.) No accents etc. Only full ASCII characters are supported.
ANSI There's no one fixed ANSI encoding - there are lots of them. Usually when people say "ANSI" they mean "the default locale/codepage for my system" which is obtained via Encoding.Default, and is often Windows-1252 but can be other locales. Only full ASCII characters and the language of your operating system are supported.
UTF-8 Variable length encoding, 1-4 bytes per code point. ASCII values are encoded as ASCII using 1 byte. Support full UTF8 encoded characters.

5. License type

There are two types of WinRAR licenses, rarreg.key and rarkey.rar, which differ only in their import.

rarreg.key rarkey.rar
Drag to import or place in a location Double-click to run automatic import

If you are unable to drag, you can try to put the rarreg.key in the following directory.

C:\Users\yourname\AppData\Roaming\WinRAR\rarreg.key

You can also compress rarreg.key into rarkey.rar and double-click it to run it, and the license import will take place automatically.

6. Use Github Actions

Click to expand

The new workflow can easily help you generate a license, you just need to follow these steps.

Your Username and License Name will appear in the actions log, if you don't want to give out this information, see 7. Using Github Actions with secrets.

6.1 Fork

Fork this repo.

Fork

Fork

6.2 Allow fork repo to run workflows

Go back to the repo you just forked and click Actions to allow Workflows to run in your forked repo.

Workflow

Workflow

6.3 Run workflow

After allowing the workflow, go to Actions > WinRAR Keygen > Run workflow and fill in the information to start generating.

For the difference of license encoding, please refer to 4. Encoding.

Secrets

Secrets

After running successfully, open the corresponding task and select rarreg_file to download.

File retention 90 days.

Download

Download

Extract rarreg_file.zip to get rarreg.key and drag to import into WinRAR. You can also compress rarreg.key into rarkey.rar, then double-click it to run it, and the license import will be done automatically.

If you get an invalid key, please check the specific solution.

7. Use Github Actions with secrets

Click to expand

Using secrets can help you hide license information.

7.1 Fork

Fork this repo.

Fork

Fork

7.2 Allow fork repo to run Workflows

Go back to the repo you just forked and click Actions to allow Workflows to run in your forked repo.

Workflow

Workflow

7.3 Create secrets

After allowing the workflow, go to Settings > Secrets and variables > Actions > New repository secret to create a secret.

Secrets

Secrets

Create three Secrets with the names TEXT1, TEXT2 and PWD and fill in the relevant values.

The value filled in should be consistent with the type of code you have chosen.

Secrets Name Explanation
TEXT1 Your Name
TEXT2 Your License Name
PWD 7-Zip Password

Add Secrets

Add Secrets

Once created, you will see it.

Secrets Repo

Secrets Repo

7.4 Run workflow

Go to Actions and select WinRAR Keygen with secrets to run workflow manually.

For the difference of license encoding, please refer to 4. Encoding.

Run

Run

After running successfully, open the corresponding task and select rarreg_file to download.

File retained for 1 day only.

Download

Download

Extract rarreg_file.zip to get rarreg.7z, unzip it with the password to get rarreg.key, then drag and drop to import into WinRAR. You can also compress rarreg.key into rarkey.rar, then double-click it to run it, and the license import will be done automatically.

If you get an invalid key, please check the specific solution.

8. Build in Visual Studio

Click to expand

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 page to get winrar-keygen.exe.

8.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 branch, but this branch will no longer be maintained.

  2. Please make sure you have installed vcpkg and the following libraries:

    • mpir:x86-windows-static
    • mpir:x64-windows-static

    is installed.

    You can install them by:

    $ vcpkg install mpir:x86-windows-static
    $ vcpkg install mpir:x64-windows-static
  3. Your vcpkg has been integrated into your Visual Studio, which means you have run successfully.

    $ vcpkg integrate install

8.2 Build

  1. Open this project in Visual Studio.

  2. Select Release configuration.

  3. Select Build > Build Solution.

You will see executable files in bin/ directory.

8.3 How to use?

Execute the following code in the terminal and configure two parameters to generate rarreg.key.

Here is an example of ASCII encoding for Github and Single PC usage license:

Usage:
        winrar-keygen.exe <Username> <License Name>

Example:

        winrar-keygen.exe "Github" "Single PC usage license"

  or:
        winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ASCII rarreg.key

Terminal

Now you can see the newly generated file.

RAR registration data
Github
Single PC usage license
UID=3a3d02329a32b63da7d8
6412212250a7d8753c5e7037d83011171578c57042fa30c506caae
9954e4853d415ec594e46017cb3db740bc4b32e47aea25db62f350
9f22065a27da4f8216d2938e1050b6e3347501a3767d1fdd7ee130
dd4ab952600ba16a99236d910bfa995d5f60651ec451f462511507
95b3722d059f2d5303a231e396cf21f17098edeec0b6e3347501a3
767d1fdd7ee45388769767642338ee8a63178f3458b71de5609b18
5eede7ed46566b10bf033daa6384062b259194b1acbd0378116064

Save the generated information in ANSI encoding as rarreg.key.

8.4 Multi-language support

Execute the following code in the terminal and configure two paramet

When using ANSI encoding, you can only use characters from the country or region where your operating system is located. ANSI encoding is supported from Powershell 7.4 onwards, and you will also need to upgrade your Powershell.

Generate multi-language licenses in ANSI encoding.

winrar-keygen.exe "简体中文" "license" | Out-File -Encoding ansi rarreg.key

winrar-keygen.exe "繁體中文" "license" | Out-File -Encoding ansi rarreg.key

winrar-keygen.exe "Deutsch" "license" | Out-File -Encoding ansi rarreg.key

winrar-keygen.exe "Français" "license" | Out-File -Encoding ansi rarreg.key

winrar-keygen.exe "日本語" "license" | Out-File -Encoding ansi rarreg.key

winrar-keygen.exe "한국어" "license" | Out-File -Encoding ansi rarreg.key

When generating utf-8 licenses, you may need to check Use Beta:Use Unicode UTF-8 for global language support in Control Panel > Clock and Regions > Regions > Administration > Change System Region Settings in order to process the data correctly. However, it is not recommended that you do this, which may cause many software to not work properly, and it is recommended to Use Github Actions.

Generate multi-language licenses with UTF-8 encoding.

utf8: is to ensure constant character representation in WinRAR across languages.

winrar-keygen.exe "utf8:简体中文" "license" | Out-File -Encoding utf8 rarreg.key

winrar-keygen.exe "utf8:繁體中文" "license" | Out-File -Encoding utf8 rarreg.key

winrar-keygen.exe "utf8:Deutsch" "license" | Out-File -Encoding utf8 rarreg.key

winrar-keygen.exe "utf8:Français" "license" | Out-File -Encoding utf8 rarreg.key

winrar-keygen.exe "utf8:日本語" "license" | Out-File -Encoding utf8 rarreg.key

winrar-keygen.exe "utf8:한국어" "license" | Out-File -Encoding utf8 rarreg.key

9. Invalid key

Why is my rarreg.key invalid?

9.1 Character encoding

TEXT1 and TEXT2 are required to fulfill [corresponding coding requirements](#4 - coding description).

winrar-keygen.exe <TEXT1> <TEXT2>

You can refer to: Generation of "rarreg.key"

9.2 Text encoding

If you use the following command:

winrar-keygen.exe "Github" "Single PC usage license" > rarreg.key

In the newer Windows 10, PowerShell will export in UTF16-LE format by default, which will cause the error.

Please use the following command:

winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ascii rarreg.key

winrar-keygen.exe "Github" "Github.com" | Out-File -Encoding ansi rarreg.key

winrar-keygen.exe "utf8:Github" "Github.com" | Out-File -Encoding utf8 rarreg.key

10. Contributing

10.1 Suggestion

If you encounter some problems, you can report on the Issues page. There will be many enthusiastic developers or Github users to help you.

This project welcomes contributions and suggestions. You can make suggestions in Issues, or submit a pull request 😄

10.2 Thanks

Thank you very much to some enthusiastic developers for helping answer some questions in Issues.

🏆 Special Thanks @Sonic-The-Hedgehog-LNK1123

11. License

The code is available under the MIT license

About

Principle of WinRAR key generation.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 99.3%
  • C 0.7%