protected virtual bool IsKeyValid(Type type_0, string string_0) { bool flag; string[] str = string_0.Split(new char[] { ',' }); object item = AELicenseProviderEx.m_hash[type_0.FullName]; if (item == null) { item = type_0.FullName; } string str1 = ""; if ((int)str.Length <= 1) { str1 = string.Concat(type_0.FullName, ","); } else { if (str[0].Trim().Length > 0 && str[0].Trim().ToLower() != "none") { try { DateTime dateTime = DateTime.Parse(str[0]); if (DateTime.Now <= dateTime) { str[0] = dateTime.ToString("yyyyddMM"); } else { MessageBox.Show(string.Concat(item.ToString(), "的使用许可过期,请更新使用许可文件!"), "许可", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); flag = false; return(flag); } } catch { MessageBox.Show(string.Concat("无法验证", item.ToString(), "的使用许可!"), "许可", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); flag = false; return(flag); } } str1 = string.Concat(type_0.FullName, ",", str[0].Trim().ToLower(), ","); } if ((Regedit.IsValid(str1, str[3], str[1]) ? false : !Regedit.IsValidEx(str1, str[1], str[3]))) { MessageBox.Show(string.Concat("无法验证", item.ToString(), "的使用许可!"), "许可", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); flag = false; } else { flag = true; } return(flag); }
protected virtual bool IsKeyValid(Type type_0, string string_0) { bool flag; string[] str = string_0.Split(new char[] { ',' }); string str1 = ""; if ((int)str.Length <= 1) { str1 = string.Concat(type_0.FullName, ","); } else { if (str[0].Trim().Length > 0 && str[0].Trim().ToLower() != "none") { try { DateTime dateTime = DateTime.Parse(str[0]); if (DateTime.Now <= dateTime) { str[0] = dateTime.ToString("yyyyddMM"); } else { MessageBox.Show("使用许可过期,请和软件供应商联系获取新的使用许可文件!", "许可", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); flag = false; return(flag); } } catch { MessageBox.Show("无法验证使用许可,请和软件供应商联系获取使用许可文件!", "许可", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); flag = false; return(flag); } } str1 = string.Concat(type_0.FullName, ",", str[0].Trim().ToLower(), ","); string_0 = str[1]; } if (!Regedit.IsValidEx(str1, str[1], str[3])) { MessageBox.Show("无法验证使用许可,请和软件供应商联系获取使用许可文件!", "许可", MessageBoxButtons.OK, MessageBoxIcon.Asterisk); flag = false; } else { flag = true; } return(flag); }
public static bool IsValid(string string_0, string string_1, string string_2) { bool flag; string str = ""; string str1 = Regedit.Is64or32System(); if (str1 == "64") { str = string.Concat(string_2, ",", Regedit.GetSysManagementSerialNumber64(string_2)); } else if (str1 == "32") { str = string.Concat(string_2, ",", Regedit.GetSysManagementSerialNumber(string_2)); } flag = (!string_1.Equals(Regedit.EncryptPassword(string.Concat(string_0, Regedit.EncryptTextNet(str)), "md5")) ? false : true); return(flag); }
public static bool IsValidEx(string string_0, string string_1, string string_2) { bool flag; ManagementObjectCollection instances = (new ManagementClass("Win32_NetworkAdapterConfiguration")).GetInstances(); bool flag1 = false; foreach (ManagementObject instance in instances) { if (!(bool)instance["IPEnabled"] || !string_2.Equals( Regedit.EncryptPassword(string.Concat(string_0, instance["MacAddress"].ToString().Trim()), "md5"))) { continue; } flag = true; return(flag); } flag = (string_1 == "http://www.linjon.cn" ? flag1 : false); return(flag); }
public static string EncryptTextNet(string string_0) { return(Regedit.EncryptNet(string_0, "&%#@?,:*")); }