Jump to content
Tuts 4 You

help with .net


buganxin

Recommended Posts

Please help me find the true serial:

private void button1_Click(object sender, EventArgs e)

{

if (this.regist_code.Text.ToString() == this.Encrypt(this.cpu_id.Text.ToString()))

{

if (this.RegCDRomSn(this.regist_code.Text.ToString()))

{

MessageBox.Show("Good Boy");

}

else

{

MessageBox.Show("Bad Boy Registry potected");

}

}

else

{

MessageBox.Show("Wrong serial");

}

}

=======================================================================

Encrypt:

protected string Encrypt(string pToEncrypt)

{

string str;

byte[] buffer = new byte[] { 0x19, 0x17, 0x18, 0x19, 0x17, 0x11, 0x15, 0x18 };

byte[] buffer2 = new byte[] { 0x17, 0x19, 0x18, 0x16, 0x17, 0x11, 0x15, 0x18 };

DESCryptoServiceProvider provider = new DESCryptoServiceProvider();

try

{

byte[] bytes = Encoding.Unicode.GetBytes(pToEncrypt);

provider.Key = buffer;

provider.IV = buffer2;

MemoryStream stream = new MemoryStream();

CryptoStream stream2 = new CryptoStream(stream, provider.CreateEncryptor(), CryptoStreamMode.Write);

stream2.Write(bytes, 0, bytes.Length);

stream2.FlushFinalBlock();

StringBuilder builder = new StringBuilder();

foreach (byte num in stream.ToArray())

{

builder.AppendFormat("{0:X2}", num);

}

builder.ToString();

str = builder.ToString();

}

catch

{

str = pToEncrypt;

}

finally

{

provider = null;

}

return str;

}

==============================================================

RegCDRomSn:

public bool RegCDRomSn(string sn)

{

try

{

Registry.LocalMachine.OpenSubKey("Software", true).CreateSubKey("jokemaster").SetValue("jokemaster", sn);

return true;

}

catch

{

return false;

}

}

=================================================================

cpu id:BFEBFBFF00000F29

i don't know what it gona do please give me the serial thanks!!

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...