好友
阅读权限20
听众
最后登录1970-1-1
|
本帖最后由 vipcrack 于 2013-12-13 23:35 编辑
private void Form1_Load(object sender, EventArgs e)
{
if ((this.FileExist(@"c:\windows\system32\52pojie.dll") && this.FileExist(@"c:\windows\system32\key.key")) && (this.FileExist(@"c:\windows\system32\key1.key") && this.FileIsEqual(@"c:\windows\system32\key.key", @"c:\windows\system32\key1.key")))
{
this.po52jie.Text = "Success";
this.TextBox1.Enabled = false;
this.Button1.Enabled = false;
this.Button1.Text = "Success"; //52pojie.dll key.key key1.key都存在,并且key.key和key1.key文件相同,则注册成功, 直接去复制key.key保存为key1.key即可.
}
if (!this.FileExist(@"c:\windows\system32\52pojie.dll"))
{
string path = @"c:\windows\system32\52pojie.dll";
StreamWriter writer = new StreamWriter(path, false);
string str2 = this.GetDiskModel() + this.GetCpuID();
writer.WriteLine(str2);
writer.Flush();
writer.Close();
writer = null;
}
}
52pojie.dll是获取的硬盘和CPU的信息
///////////////////////
private void Button1_Click(object sender, EventArgs e)
{
int num2;
try
{
int num3;
Label_0000:
ProjectData.ClearProjectError();
int num = -2;
Label_0009:
num3 = 2;
string str2 = "";
Label_0012:
num3 = 3;
StreamReader reader = new StreamReader(@"c:\windows\system32\52pojie.dll", Encoding.Default);
Label_0025:
num3 = 4;
if (reader == null)
{
goto Label_004C;
}
goto Label_0037;
Label_002D:
num3 = 7;
str2 = reader.ReadLine(); //读取数据
Label_0037:
num3 = 6;
if (!reader.EndOfStream)
{
goto Label_002D;
}
Label_0042:
num3 = 9;
reader.Close();
Label_004C:
num3 = 11;
string str = this.reg(str2); //这里看看是什么处理.
============================================
正确key.key的处理
public string reg(string Str_code)
{
string str = "";
int num2 = Strings.Len(Str_code);
for (int i = 1; i <= num2; i++)
{
string left = Strings.Mid(Str_code, i, 1);
if (((Operators.CompareString(left, "a", false) >= 0) & (Operators.CompareString(left, "z", false) <= 0)) | ((Operators.CompareString(left, "A", false) >= 0) & (Operators.CompareString(left, "Z", false) <= 0)))
{
left = Conversions.ToString(Strings.Chr(Strings.Asc(left) + 4));
if (((Operators.CompareString(left, "Z", false) > 0) & (Strings.Asc(left) <= 0x5e)) | (Operators.CompareString(left, "z", false) < 0))
{
left = Conversions.ToString(Strings.Chr(Strings.Asc(left) - 0x1a));
}
}
if ((Operators.CompareString(left, "0", false) >= 0) & (Operators.CompareString(left, "9", false) <= 0))
{
left = left;
}
str = str + left;
}
str = Strings.Left(str, 4) + "52pojie" + Strings.Right(str, Strings.Len(str) - 4);
this.FileExist(@"c:\windows\system32\key.key");
if (!this.FileExist(@"c:\windows\system32\key.key"))
{
string path = @"c:\windows\system32\key.key";
StreamWriter writer = new StreamWriter(path, false);
string str5 = str;
writer.WriteLine(str5);
writer.Flush();
writer.Close();
writer = null;
}
return str;
}
注册方法, 就是复制C:\windows\system32下面的key.key保存为key1.key. |
|