最初由 hermit 发布
tankaiha 老大,你的blog里面好像每篇文章的查看都需要密码,怎么回事?
汗,数据库出问题了,全部删除,换到csdn写。
附件是解码程序,不过是一个个解的,没写成全自动。这种代码没有进行强力混淆的,可以直接使用原代码。
注册算法应该是下面的代码:
public static bool Register(string val, System.Collections.ArrayList regData, bool addToReg)
{
bool flag2;
string s1;
if ((CADImport.Protection.lncType == 2) && addToReg)
{
if (addToReg)
CADImport.Protection.AddDataToRegistry(val, regData);
return false;
}
if (regData == null)
return CADImport.Protection.Method_8();
if (regData.Count < 2)
return CADImport.Protection.Method_8();
uint[] uiArr1 = new uint[0x40];
uint[] uiArr2 = new uint[0x40];
uiArr1 = CADImport.Protection.encoder.Method174_16(Namespace1.Class180.Method180_1737());
uiArr2 = CADImport.Protection.encoder.Method174_16(Namespace1.Class180.Method180_1738());
try
{
s1 = CADImport.Protection.encoder.Method174_20(val, uiArr1, uiArr2, true);
}
catch
{
return CADImport.Protection.Method_8();
}
string s2 = System.Convert.ToString(regData[0]) + CADImport.Protection.sep + System.Convert.ToString(regData[1]) + CADImport.Protection.sep;
string s3 = s1;
int i1 = s3.IndexOf(CADImport.Protection.sep);
if (i1 == 0xFFFFFFFF)
return CADImport.Protection.Method_8();
string s4 = s3.Substring(0, i1 + 2);
s3 = s3.Remove(0, i1 + 2);
i1 = s3.IndexOf(CADImport.Protection.sep);
if (i1 == 0xFFFFFFFF)
return CADImport.Protection.Method_8();
string s5 = s3.Substring(0, i1 + 2);
string s6 = s4 + s5;
if (s2.ToLower() != s6.ToLower())
return CADImport.Protection.Method_8();
System.Collections.ArrayList arrayList = new System.Collections.ArrayList();
while (s3 != Namespace1.Class180.Method180_5())
{
s3 = s3.Remove(0, i1 + 2);
i1 = s3.IndexOf(CADImport.Protection.sep);
if (i1 != 0xFFFFFFFF)
arrayList.Add(s3.Substring(0, i1));
}
CADImport.Protection.resval = 1;
CADImport.Protection.count = 1;
CADImport.Protection.date = new System.DateTime((long)0);
CADImport.Protection.keyType = Namespace1.Class180.Method180_657();
try
{
if (arrayList.Count > 0)
{
for (int i2 = 0; i2 < arrayList.Count; i2++)
{
string s7 = (string)arrayList[i2];
if (s7.Trim() != Namespace1.Class180.Method180_5())
{
bool flag1 = true;
for (int i3 = 0; i3 < s7.Length; i3++)
{
if (!System.Char.IsNumber(s7, i3))
{
flag1 = false;
break;
}
}
if (s7.IndexOf('/') != 0xFFFFFFFF)
CADImport.Protection.date = System.Convert.ToDateTime(s7, new System.Globalization.CultureInfo(Namespace1.Class180.Method180_1739()));
if (flag1)
CADImport.Protection.count = System.Convert.ToInt32(s7);
if (s7 == Namespace1.Class180.Method180_1740())
CADImport.Protection.keyType = Namespace1.Class180.Method180_5();
if (s7 == Namespace1.Class180.Method180_1741())
CADImport.Protection.lncType = 2;
}
}
}
}
catch
{
return CADImport.Protection.Method_8();
}
if (CADImport.Protection.date != (new System.DateTime((long)0)))
{
System.DateTime dateTime = System.DateTime.Now;
if (dateTime.Year > CADImport.Protection.date.Year)
return CADImport.Protection.Method_8();
if (dateTime.Year == CADImport.Protection.date.Year)
{
if (dateTime.Month > CADImport.Protection.date.Month)
return CADImport.Protection.Method_8();
if ((dateTime.Month == CADImport.Protection.date.Month) && (dateTime.Day >= CADImport.Protection.date.Day))
return CADImport.Protection.Method_7(Namespace1.Class180.Method180_1742());
}
}
CADImport.Protection.regInfo = (string)regData[0] + 0xD + 0xA + (string)regData[1];
if (addToReg)
CADImport.Protection.AddDataToRegistry(val, regData);
if ((CADImport.Protection.lncType == 1) && (CADImport.Protection.count != 0x7FFFFFFF))
{
CADImport.Protection.cur_count = CADImport.Protection.count;
CADImport.Protection.msgBrd = Namespace1.Class180.Method180_1743();
CADImport.Protection.msgRes = Namespace1.Class180.Method180_1744();
CADImport.Protection.msgBrd = s2 + Namespace1.Class180.Method180_640() + CADImport.Protection.msgBrd;
CADImport.Protection.msgRes = s2 + Namespace1.Class180.Method180_640() + CADImport.Protection.msgRes;
CADImport.Protection.timerSlots.Interval = 0x3A98;
CADImport.Protection.timerSlots.Tick += new System.EventHandler(CADImport.Protection.Method_6);
CADImport.Protection.timerSlots.Start();
CADImport.Protection.Method_4();
}
return true;
}