https://www.52pojie.cn/thread-1668629-1-1.html
上面的大佬提供了生成公钥私钥的源码和解析了原理和步骤的
大致步骤如下:
- 替换
plugins
下面com.dbeaver.app.ultimate_*.jar
zip包里面keys目录下的公钥(dbeaver-ue-public.key), - 修改
dbeaver.ini
开启-Dlm.debug.mode=true
, - 将私钥(private-key.txt)放到
~/.jkiss-lm
目录下,使用假的序列号(license.txt)即可激活。
jkiss-lm.zip (2.8 KB)
仅供研究学习使用,请勿用于非法用途,请支持正版!
更新了下附件,License文件少了个=
更新下C#代码替换证书,添加配置
using System.IO.Compression;
const string privateKeyString =
"""
MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCFfG6J3YAt9IXrzJSsfQfd7Z4n
RL0x8m5WKXWvTcz8ldO7kWCNPJR/VDkomddItrGKJu0eMAlRdGTXQL2KSzsUU144/x2IMvYpxs9N
J3LuJqkJgBrFmKUhEirQBv9mGL4fA+H3C4mT/pcSChQgLV6IqPRpUzPbkbm51ce0jHw6Nq8fZ6gV
2U6kPCbpkyPVlJuRjnRyc5vp4m/fygoXx8vhveLcnS+/mWT3Q1ilVIYXA+z1LYA2xZPUJdd+XfBA
64Ec58spOgk31Xl+oyCICg81PwG87k0wwnx30wpAPiu2qrdLjQTuIhn983nWH+RDTKcIdd2x3N7j
yND6q5KyJ8dPAgMBAAECggEATJu5JM5GfhlTspxaxxOKrEdu+MJugnfL8w8gR1ezSVMDjSZF70jR
QLIpi6+e6lBPXCYy95xB/Ml8Bj1VikTaxzOBY9ymKkB1HkzHNFRrlVoCsT0gID8WpgAzKeiaMxII
KuyjhpDMiG8YbHX0TvM6yduNSdVCccUUfh6+2lO2CAH1fRT+FJqEI8tUGbuB16YvM6t/mNjtbOo1
dSsRacc/7fV3vPP7a3kqc0PHpIDAyuKcLWn1HwEzBeAgp/TlX9J1bU8WcijKQBLcrxYmxAqDZOPD
imcV0XfKs6I2JUHEePUHiAoG59BhVGA/rJnkyQEpaD3mKkFImIIKm6poLv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ilIRIq0Ab/Zhi+HwPh9wuJk/6XEgoUIC1eiKj0aVMz25G5udXHtIx8OjavH2eoFdlOpDwm
6ZMj1ZSbkY50cnOb6eJv38oKF8fL4b3i3J0vv5lk90NYpVSGFwPs9S2ANsWT1CXXfl3wQOuBHOfL
KToJN9V5fqMgiAoPNT8BvO5NMMJ8d9MKQD4rtqq3S40E7iIZ/fN51h/kQ0ynCHXdsdze48jQ+quS
sifHTwIDAQAB
""";
const string licenseString =
"""
ReJalXttbssteHQ63re1sGcW2XbP4emJiJxLGaa/JEXXcRiuUzwfwAHh5gUWD+blYrIVKy4Ibx9k
xm6XcIlg4X1eWI4UrlTep+D5l2cKSqw63Hzi8hyau8H9OFfPe9PHig1Kla+u4fQCkn7AidqZPkV7
QVK2F++ZIUcPmc+qEkm3suOEtRgEKKBfsZpHTg+CUrUb37DlEz6qWnOI+5hy95B3z892TTJzkARc
HOhSdFM/1/q4WMUtfjcVcav7x7qiFDIfuWQsMNASVMxBJtbKsKv9tqc+2ExGV+9bZBHls7JehGOW
bG7YOpoZA49Ha6DnWlhoWAeFizL6zFLbH8+tZQ==
""";
var userFolder = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
var lmFolder = Path.Combine(userFolder, ".jkiss-lm");
if (!Directory.Exists(lmFolder))
{
Directory.CreateDirectory(lmFolder);
}
File.WriteAllText(Path.Combine(lmFolder, "private-key.txt"), privateKeyString);
var programFiles = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
var dbeaverFolder = Path.Combine(programFiles, "DBeaverUltimate");
var pluginsFolder = Path.Combine(dbeaverFolder, "plugins");
const string jarPattern = "com.dbeaver.app.ultimate_*.jar";
var jarFile = Directory.GetFiles(pluginsFolder, jarPattern).FirstOrDefault();
if (jarFile == null)
{
Console.WriteLine($"Jar file not found: {jarPattern} in {pluginsFolder}");
return;
}
Console.WriteLine($"Update public key file in {jarFile}");
using var zipArchive = ZipFile.Open(jarFile, ZipArchiveMode.Update);
const string publicKeyFileName = "dbeaver-ue-public.key";
const string publicKeyFileEntryName = $"keys/{publicKeyFileName}";
var publicKeyFileEntry = zipArchive.GetEntry(publicKeyFileEntryName);
if (publicKeyFileEntry == null)
{
Console.WriteLine($"Entry not found: {publicKeyFileEntryName}");
return;
}
using var publicKeyStream = publicKeyFileEntry.Open();
using var publicKeyStreamWriter = new StreamWriter(publicKeyStream);
publicKeyStreamWriter.Write(publicKeyString);
var dbeaverIniFile = Path.Combine(dbeaverFolder, "dbeaver.ini");
Console.WriteLine($"Enable debug mode in {dbeaverIniFile}");
var lines = File.ReadAllLines(dbeaverIniFile);
const string debugModeLine = "-Dlm.debug.mode=true";
if (lines.Length != 0 && !lines.Contains(debugModeLine))
{
File.AppendAllLines(dbeaverIniFile, new[] { debugModeLine });
}
Console.WriteLine($"Done, use license as below: \n\n{licenseString}");
Console.ReadKey();
这是编译后,直接执行即可,需要 .NET 8.0,需要UAC,因为要写入 Program Files 目录。
Debug.zip (81.6 KB)