脱完壳了想写注册机没有头绪也找到机器码和注册码位置
里面有两份一份脱完了一分没脱完想请教一下如何编写注册机
https://wwk.lanzout.com/iRfVN26qg1uh https://s1.locimg.com/2024/08/07/7c6c4aca5238d.png
不知道能不能用
public partial class Form1 : Form {
static char?[] Charcode = new char?;
static int[] intNumber = new int;
static int[] intCode = new int;
static void SetIntCode() {
// 按照 C# 代码中的逻辑初始化 intCode 数组
for (int i = 1; i <= intCode.Length / 10; i++) {
for (int j = 0; j < 10; j++) {
intCode[(i - 1) * 10 + j] = j;
}
}
}
static public string GetCode(string code) {
if (!string.IsNullOrEmpty(code)) {
SetIntCode();
for (int i = 1; i < Charcode.Length; i++) {
if (i - 1 < code.Length) {
Charcode = code;
}
}
for (int j = 1; j < intNumber.Length; j++) {
if (j < Charcode.Length && Charcode.HasValue) {
intNumber = intCode[(int)Charcode.Value] + (int)Charcode.Value;
}
}
string text = "";
for (int k = 1; k < intNumber.Length; k++) {
if ((48 <= intNumber && intNumber <= 57) ||
(65 <= intNumber && intNumber <= 90) ||
(97 <= intNumber && intNumber <= 122)) {
text += (char)intNumber;
}
else if (intNumber > 122) {
int value = intNumber - 10;
if (0 <= value && value <= 0x10FFFF) {
text += (char)value;
}
}
else {
int value = intNumber - 9;
if (0 <= value && value <= 0x10FFFF) {
text += (char)value;
}
}
}
return text;
}
else {
return "";
}
}
public Form1() {
InitializeComponent();
}
private static string GetMd5(string input) {
using (MD5 md5 = MD5.Create()) {
byte[] inputBytes = Encoding.ASCII.GetBytes(input);
byte[] hashBytes = md5.ComputeHash(inputBytes);
StringBuilder sb = new StringBuilder();
for (int i = 0; i < hashBytes.Length; i++) {
sb.Append(hashBytes.ToString("X2"));
}
return sb.ToString();
}
}
public static string GenerateActivationCode(string currentCode) {
DateTime now = DateTime.Now;
DateTime futureDate = now.AddYears(1);
long nowBinary = now.ToBinary();
long futureBinary = futureDate.ToBinary();
string part3 = "extra_part_3";
string part4 = "extra_part_4";
string part5 = "extra_part_5";
string part6 = "extra_part_6";
string part7 = "extra_part_7";
string activationCode = $"{currentCode}[{nowBinary}[{futureBinary}[{part3}[{part4}[{part5}[{part6}[{part7}";
return activationCode;
}
private void button1_Click(object sender, EventArgs e) {
var tmp_string = GetCode(""); // 这里是申请码
textBox2.Text = GenerateActivationCode(tmp_string );
}
} 本帖最后由 3yu3 于 2024-8-7 09:20 编辑
运行不起来中,能发个完整的安装包吗?
注册过程:机器码经过GetCode()计算后变成激活码的一部分,最终的激活码 跟FindClass.RegistIt()进去 分析吧。
本帖最后由 SnowRen 于 2024-8-7 10:39 编辑
文件包不完整,另外需要管理员才能注册成功,因为Registry.LocalMachine.OpenSubKey
注册码以[分隔为8段(0-7):GetCode(申请码)[有效期[随意日期[随意字符[随意字符[随意字符[随意字符[随意字符
把注册类型改为true, Benx1 发表于 2024-8-7 11:07
不知道能不能用
public partial class Form1 : Form {
static char?[] C ...
可以激活但是里面功能并不能使用 离线的机器码咋破解
页:
[1]