某专业起名程序注册码分析与注册机
## 前言 ##看到论坛讨论帖:((https://www.52pojie.cn/thread-1879511-1-1.html)),有了这篇注册机分析与注册机。
## 分析过程 ##
从原帖可知Net程序,有混淆。
直接de4处理并找到注册验证:
private void method_0(object sender, EventArgs e)
{
ProjectData.ClearProjectError();
if (Class18.bool_16)
{
base.Close();
}
else if (Strings.Len(Class15.string_1) == 0)
{
Interaction.MsgBox("机器码不能为空,如不能解决,请与南方联系。", MsgBoxStyle.OkOnly, null);
}
else
{
Conversions.ToString(Class1.smethod_0().Registry.GetValue("HKEY_CURRENT_USER\\Software\\NanfangSoft .net\\ProName730", "PCNB", ""));
string text = Strings.Trim(this.vmethod_2().Text);
string text2 = Strings.Trim(this.vmethod_6().Text);
if ((text2.Length < 14) | (text2.Length > 15)) //长度15位
{
this.vmethod_0().Text = "注册码不对!";
}
else
{
string text3 = Strings.Mid(text2, 1, 4) + Strings.Mid(text2, 9, 4);
string text4 = Strings.Mid(text2, 5, 1);
string text5 = Strings.Mid(text2, 6, 1);
string text6 = Strings.Mid(text2, 7, 1);
string text7 = Strings.Mid(text2, 8, 1);
string text8 = Strings.Mid(text2, 13, 1);
string str = Strings.Mid(text2, 14, 1);
if ((Operators.CompareString(text4, "6", false) == 0) | (Operators.CompareString(text4, "7", false) == 0) | (Operators.CompareString(text4, "B", false) == 0))
{
text4 = "1";
}
if ((Operators.CompareString(text4, "8", false) == 0) | (Operators.CompareString(text4, "9", false) == 0) | (Operators.CompareString(text4, "C", false) == 0))
{
text4 = "2";
}
if (Operators.CompareString(text5, "A", false) == 0)
{
text5 = "0";
}
if (Operators.CompareString(text5, "B", false) == 0)
{
text5 = "1";
}
if (Operators.CompareString(text5, "C", false) == 0)
{
text5 = "2";
}
if (Operators.CompareString(text5, "D", false) == 0)
{
text5 = "3";
}
if (Operators.CompareString(text5, "E", false) == 0)
{
text5 = "4";
}
if (Operators.CompareString(text5, "F", false) == 0)
{
text5 = "5";
}
if (Operators.CompareString(text5, "G", false) == 0)
{
text5 = "6";
}
if (Operators.CompareString(text5, "H", false) == 0)
{
text5 = "7";
}
if (Operators.CompareString(text5, "J", false) == 0)
{
text5 = "8";
}
if (Operators.CompareString(text5, "K", false) == 0)
{
text5 = "9";
}
string value = "20" + text4 + text5;//5、6位组成年份
if ((Operators.CompareString(text6, "6", false) == 0) | (Operators.CompareString(text6, "7", false) == 0) | (Operators.CompareString(text6, "B", false) == 0))
{
text6 = "1";
}
if ((Operators.CompareString(text6, "4", false) == 0) | (Operators.CompareString(text6, "5", false) == 0) | (Operators.CompareString(text6, "A", false) == 0))
{
text6 = "0";
}
if (Operators.CompareString(text7, "A", false) == 0)
{
text7 = "0";
}
if (Operators.CompareString(text7, "B", false) == 0)
{
text7 = "1";
}
if (Operators.CompareString(text7, "C", false) == 0)
{
text7 = "2";
}
if (Operators.CompareString(text7, "D", false) == 0)
{
text7 = "3";
}
if (Operators.CompareString(text7, "E", false) == 0)
{
text7 = "4";
}
if (Operators.CompareString(text7, "F", false) == 0)
{
text7 = "5";
}
if (Operators.CompareString(text7, "G", false) == 0)
{
text7 = "6";
}
if (Operators.CompareString(text7, "H", false) == 0)
{
text7 = "7";
}
if (Operators.CompareString(text7, "J", false) == 0)
{
text7 = "8";
}
if (Operators.CompareString(text7, "K", false) == 0)
{
text7 = "9";
}
string value2 = text6 + text7;//7、8位组成月份
if (Operators.CompareString(text8, "A", false) == 0)
{
text8 = "0";
}
if (Operators.CompareString(text8, "B", false) == 0)
{
text8 = "1";
}
if (Operators.CompareString(text8, "C", false) == 0)
{
text8 = "2";
}
string value3 = text8 + str;//13、14位组成日
if (((text2.Length == 15) & ((Operators.CompareString(Strings.Mid(text2, 15, 1), "1", false) == 0) | (Operators.CompareString(Strings.Mid(text2, 15, 1), "2", false) == 0))) && Class1.smethod_0().FileSystem.FileExists(Class20.string_8 + "\\syspnam730.dll"))
{
Class1.smethod_0().FileSystem.DeleteFile(Class20.string_8 + "\\syspnam730.dll");
}
int num = Conversions.ToInteger(value);//年 <=2030
int num2 = Conversions.ToInteger(value2);//月 1-12
int num3 = Conversions.ToInteger(value3);//日 1-28
if ((num3 < 1) | (num3 > 28) | (num < 2013) | (num > 2030) | (num2 < 1) | (num2 > 12) | (num < DateAndTime.Now.Year) | ((num == DateAndTime.Now.Year) & (num2 < DateAndTime.Now.Month)))
{
this.vmethod_0().Text = "注册码不对!";
}
else if (this.short_0 == 1)
{
this.method_1(this.vmethod_8(), new EventArgs());
}
else if (Strings.Len(Strings.Trim(this.vmethod_4().Text)) == 0)
{
this.vmethod_0().Text = "您没有输入姓名。";
}
else if (Strings.Len(text3) == 0)
{
this.vmethod_0().Text = "您没有输入注册码。";
}
//机器码和注册码比较
else if (Class18.smethod_3(ref text, ref text3) & !File.Exists(Class20.string_8 + "\\syspnam730.dll"))
{
Class1.smethod_0().Registry.SetValue("HKEY_CURRENT_USER\\Software\\NanfangSoft .net\\ProName730", "Name", this.vmethod_4().Text);
string text9 = Strings.UCase(text3);
Class20.smethod_11(ref text, ref text9, ref value, ref value2, ref value3);
Class20.bool_0 = true;
this.vmethod_0().Text = "注册成功!点击'退出',您现在可以使用本程序了。";
}
else
{
this.vmethod_0().Text = "注册码不对!";
}
}
}
int num4;
if (num4 != 0)
{
ProjectData.ClearProjectError();
}
}
分析可知:注册码长度15位,1-4位+9-12位为机器码转换信息,5、6位授权年份信息,7、8位授权月份信息,13、14位授权日信息,第15位1或2固定。
且年<=2030年,月:1-12,日:1-28,授权的时间信息比较简单,看相应代码即可。
机器码和注册码比较Class18.smethod_3(ref text, ref text3)
跟进看一下,调用太复杂,不容易得到算法,也是原贴楼主困惑的地方,相互调用太多了,直接挖代码可能有难度,换个思路直接反射调用。
## 注册机编写 ##
试了下反射调用成功。
获取机器码:
机器码转换:
注册码拼接:
搞定~~~
## 食用说明 ##
仅限于学习交流,请勿用于商业或非法用途。 本帖最后由 dork 于 2024-1-15 22:49 编辑
从来没有接触过C#,用 了二个小时终于编译出来EXE了
反射方法是很好,但纯算法还是值得分析的 yangxiaofeng 发表于 2024-1-14 22:21
52604-77305-62920-20730
注册人姓名 Administrator
求助攻!!!
37319F7CR221C82 谢谢楼主,又学了一招。 楼主再出一个反射教程就好了,小白们好学习学习 waynevan 发表于 2024-1-16 10:12
大佬 帮我算下,谢谢,给你热心
谁帮我算下 谢谢,给你点热心
00352-79418-62920-20730
7N529J7BN754B12 反射用法炉火纯情,值得一学。。。{:1_893:} 看到这篇文章,我在另一篇文章看到你的评论,谁懂我的笑点哈哈哈哈
jyjjf 发表于 2024-1-12 12:46
求安装包分享
http://www.downcc.com/soft/271707.html 这里下载的 手打,不行啊
Assembly assembly = Assembly.LoadFrom("南方专业起名7.3.0.exe");
type = assembly.GetField ("Clss15");
type.GetMethod("smethoh_3").Invoke(null,null);
txtId.Text=type.GetField("string_1").GetValue(null).Tostring();
string jqm=txId.text.Trim();
if (jqm=="") return;
type.GetMethod("smethod_5").Invoke(null,new object[]{jqm});
string str1=type.GetField("string_2").GetField("string_2").GetValue(null).ToString();
string str2=txtSC.Text.Trim();
string str2=Convert.ToDateTime(str2).ToString("yyyyMMdd");
string []year3={"8","9","C"};
string []year41={"0","1","2","3","4","5","6","7","8","9"};
string []year41={"A","B","C","D","E","F","G","H","J","K"};
string []month10={"4","5"."A"};
string []month11={"6","7"."B"};
Random rd =new Random();
int i =rd.Next(0,2);
string y3 = str3.Substring(2,1);
string y4 = str3.Substring(3,1);
string m1 = str3.Substring(4,1);
string m2 = str3.Substring(5,1);
string d1 = str3.Substring(6,1);
string d2 = str3.Substring(7,1);
string[] month=month10;
if(m1=="1")month=month11;
string zcCode=str1.Substring(0,4)+
year3+year42+
month+year42+
str1.Substring(4,4)+
year42+d2+
"2";
发下课件 好好好,学习了 机呢?哈哈哈…………{:1_918:} 感谢大佬出手 这个方式看的少,条条大路通罗马,何必单恋一枝花 注册机在哪里? 又学到一招。感谢大佬分享 发下代码课件