本帖最后由 wtujoxk 于 2019-8-5 14:13 编辑
[C#] 纯文本查看 复制代码 private void cmdOK_Click(object sender, EventArgs e)
{
string text = this.txtReg.Text;
bool flag = false;
bool flag2 = false;
bool flag3 = false;
bool flag4 = false;
for (int i = 1; i < this.txtReg.Text.Length; i++)
{
bool flag5 = this.txtReg.Text.Substring(i, 1) == "W";
if (flag5)
{
flag = true;
}
bool flag6 = this.txtReg.Text.Substring(i, 1) == "A";
if (flag6)
{
flag2 = true;
}
bool flag7 = this.txtReg.Text.Substring(i, 1) == "N";
if (flag7)
{
flag3 = true;
}
bool flag8 = this.txtReg.Text.Substring(i, 1) == "G";
if (flag8)
{
flag4 = true;
}
}
bool flag9 = flag && flag2 && flag3 && flag4;
if (flag9)
{
MessageBox.Show("注册成功,请重新启动程序", "成功", MessageBoxButtons.OK);
FileStream fileStream = new FileStream(Application.StartupPath + "\\codec.dll", FileMode.Create);
StreamWriter streamWriter = new StreamWriter(fileStream);
string value = "20130303";
streamWriter.Write(value);
streamWriter.Flush();
streamWriter.Close();
fileStream.Close();
}
else
{
MessageBox.Show("无效的注册码", "失败", MessageBoxButtons.OK);
}
base.Close();
}
从这里的代码可以直接看出注册码,第一位任意,后面只要注册码里包含WANG这四个字符就行了,比如:1WANG、2ANGW、3GANW、0GGANNNW等等类型的注册码
装逼一点的注册码:CIEKCKFLAAOEILC154WDES32N354WDKOG132CDEG |