吾爱汇编

 找回密码
 立即注册

QQ登录

绑定QQ避免忘记帐号

查看: 2881|回复: 2

.net追码分析求助

[复制链接]
钢牙妹 发表于 2021-6-6 22:40 | 显示全部楼层 |阅读模式

本站严厉禁止求脱求破行为(包含无自我分析直接求思路),如发现此类求助主题请点击“举报”,让我们共同维护优质的学习环境!


30HB
本帖最后由 钢牙妹 于 2021-6-6 22:43 编辑

一款.net的DLL.不能动态调式,只能静态分析,关键代码如下,按道理应该是读取注册码跟真码对比然后 怎么怎么样吗?这段这几个参数得出的码都试过了都不对,。哪位大侠给解答一下呀

[C#] 纯文本查看 复制代码
private void LicenseVerify()
		{
			int year = this.Function("Convert.ToInt32", "2000");
			int month = this.Function("Convert.ToInt32", "1");
			int day = this.Function("Convert.ToInt32", "1");
			DateTime d = new DateTime(year, month, day);
			x_Const.Today = (DateTime.Today - d).Days;
			if (x_Const.Today < this.fld_pluginDate)
			{
				return;
			}
			List<string> list = new List<string>();
			bool flag = false;
			if (!File.Exists(x_Const.LicenseFile))
			{
				RegistryKey registryKey = Registry.CurrentUser.CreateSubKey(this.fld_regDir);
				string text = Convert.ToString(registryKey.GetValue(this.fld_Key));
				if (text == string.Empty)
				{
					int arg = x_Const.Today + x_Const.FreeDays;
					text = string.Concat(new string[]
					{
						this.SubKey(x_Const.HDD_id),
						"#",
						this.Function("ToString", arg),
						"#",
						this.Function("ToString", x_Const.Today),
						"#1#",
						x_Const.FreeDays.ToString(),
						"#012#1#"
					});
					text = this.CheckSumm(text) + "#" + text;
					text = this.Crypt(text, x_Const.HDD_id, this.Function("Convert.ToInt32", "0"));
				}
				list.Add(text);
			}
			else
			{
				StreamReader streamReader = new StreamReader(x_Const.LicenseFile);
				flag = true;
				while (!streamReader.EndOfStream)
				{
					list.Add(streamReader.ReadLine());
				}
				streamReader.Close();
			}
			int num = 0;
			int num2 = 0;
			int num3 = 0;
			int num4 = 0;
			string text2 = "";
			int num5 = 0;
			string value = "#";
			string text3 = "";
			for (int i = 0; i < list.Count; i++)
			{
				int num6 = list[i].IndexOf("+");
				string text4 = list[i];
				if (num6 > 0)
				{
					text3 = text4.Substring(num6 + 1);
					text4 = text4.Substring(0, num6);
				}
				int num7 = this.Function("Convert.ToInt32", "1");
				num7 = this.Function("minus", i, num7);
				text4 = this.Crypt(text4, x_Const.HDD_id, num7);
				int num8 = text4.IndexOf(value);
				string a = text4.Substring(0, num8);
				string text5 = text4.Substring(num8 + 1);
				if (!(a != this.CheckSumm(text5)))
				{
					num8 = text5.IndexOf(value);
					string a2 = text5.Substring(0, num8);
					if (!(a2 != this.SubKey(x_Const.HDD_id)))
					{
						text5 = text5.Substring(num8 + 1);
						num8 = text5.IndexOf(value);
						string arg2 = text5.Substring(0, num8);
						num2 = this.Function("Convert.ToInt32", arg2);
						text5 = text5.Substring(num8 + 1);
						num8 = text5.IndexOf(value);
						arg2 = text5.Substring(0, num8);
						num3 = this.Function("Convert.ToInt32", arg2);
						text5 = text5.Substring(num8 + 1);
						num8 = text5.IndexOf(value);
						arg2 = text5.Substring(0, num8);
						x_Const.WorkedDay = this.Function("Convert.ToInt32", arg2);
						text5 = text5.Substring(num8 + 1);
						num8 = text5.IndexOf(value);
						arg2 = text5.Substring(0, num8);
						num4 = this.Function("Convert.ToInt32", arg2);
						text5 = text5.Substring(num8 + 1);
						num8 = text5.IndexOf(value);
						text2 = text5.Substring(0, num8);
						text5 = text5.Substring(num8 + 1);
						num8 = text5.IndexOf(value);
						arg2 = text5.Substring(0, num8);
						num5 = this.Function("Convert.ToInt32", arg2);
						num = i;
						break;
					}
				}
			}
			if (flag && text3 == "")
			{
				x_Debug.ShowMessage("Используется старая версия лицензии, необходимо установить новую.\nПо всем вопросам Вы всегда можите обратиться к разработчику [email]office@xplugins.com[/email]");
				return;
			}
			if (x_Const.Today != num3)
			{
				int num9 = this.Function("plus", x_Const.Today, num3);
				num9 = this.Function("abs", num9, num4);
				x_Const.WorkedDay = this.Function("minus", x_Const.WorkedDay, num9);
			}
			if (num5 == this.Function("Convert.ToInt32", "0"))
			{
				x_Const.WorkedDay = this.Function("shiftL", num4, num3);
			}
			if (num2 < x_Const.Today)
			{
				x_Const.WorkedDay = this.Function("shiftL", num4, x_Const.WorkedDay);
			}
			if (num2 < this.fld_pluginDate)
			{
				x_Const.WorkedDay = this.Function("shiftL", num4, x_Const.Today);
			}
			if (this.Function("Convert.ToInt32", "0") < x_Const.WorkedDay && x_Const.WorkedDay < num4)
			{
				x_Const.LicenseVerified = this.Function("Convert.ToInt32", "1");
			}
			else
			{
				x_Const.WorkedDay = this.Function("abs", num4, x_Const.Today);
				num5 = this.Function("Convert.ToInt32", "0");
			}
			text3 = x_ConstByte.LicenseVerify(text3);
			list[num] = string.Concat(new string[]
			{
				this.SubKey(x_Const.HDD_id),
				"#",
				this.Function("ToString", num2),
				"#",
				this.Function("ToString", x_Const.Today),
				"#",
				this.Function("ToString", x_Const.WorkedDay),
				"#",
				this.Function("ToString", num4),
				"#",
				text2,
				"#",
				this.Function("ToString", num5),
				"#"
			});
			list[num] = this.CheckSumm(list[num]) + "#" + list[num];
			list[num] = this.Crypt(list[num], x_Const.HDD_id, this.Function("Convert.ToInt32", "0"));
			if (!File.Exists(x_Const.LicenseFile))
			{
				RegistryKey registryKey2 = Registry.CurrentUser.CreateSubKey(this.fld_regDir);
				registryKey2.SetValue(this.fld_Key, list[num]);
			}
			else
			{
				StreamWriter streamWriter = new StreamWriter(x_Const.LicenseFile);
				List<string> list2;
				int index;
				(list2 = list)[index = num] = list2[index] + "+" + text3;
				foreach (string value2 in list)
				{
					streamWriter.WriteLine(value2);
				}
				streamWriter.Close();
			}
			x_Const.DaysLeft = this.Function("plus", num4, x_Const.WorkedDay);
			if (x_Const.DaysLeft < 0)
			{
				x_Const.DaysLeft = 0;
			}
		}


链接: https://pan.baidu.com/s/1h2zVK4pjvfE9QcqhnFRwjA 提取码: e3bv

吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
 楼主| 钢牙妹 发表于 2021-6-7 21:22 | 显示全部楼层

xia先生 发表于 2021-6-7 00:00
走RMB区吧。难度比你想的高

那就算了,不是不想花钱,发出来本就是想学习讨论,并不是为了逆向这个软件,
吾爱汇编论坛-学破解,防破解!知进攻,懂防守!逆向分析,软件安全!52HB.COM
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

警告:本站严惩灌水回复,尊重自己从尊重他人开始!

1层
2层

免责声明

吾爱汇编(www.52hb.com)所讨论的技术及相关工具仅限用于研究学习,皆在提高软件产品的安全性,严禁用于不良动机。任何个人、团体、组织不得将其用于非法目的,否则,一切后果自行承担。吾爱汇编不承担任何因为技术滥用所产生的连带责任。吾爱汇编内容源于网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除。如有侵权请邮件或微信与我们联系处理。

站长邮箱:SharkHeng@sina.com
站长QQ:1140549900


QQ|RSS|手机版|小黑屋|帮助|吾爱汇编 ( 京公网安备11011502005403号 , 京ICP备20003498号-6 )|网站地图

Powered by Discuz!

吾爱汇编 www.52hb.com

快速回复 返回顶部 返回列表