求助求助!如何能跳过登陆直接打开软件
如题求助!有大神帮忙看看如何能跳过登陆直接打开软件private void btn_login_Click(object sender, EventArgs e)
{
this.SecretCode = this.tbSecret.Text.Trim();
string accountCode = this.AccountCode;
if ((accountCode == null) || (accountCode.Length == 0))
{
MessageBox.Show("请输入账号");
}
else if ((this.SecretCode == null) || (this.SecretCode.Length == 0))
{
MessageBox.Show("请输入密码");
}
else
{
this.btn_login.Enabled = false;
this.btn_cancel.Enabled = false;
string str2 = MD5Stream(this.SecretCode);
this.tipBox.Show();
string str4 = MD5Stream(accountCode + ComputerInfo.GetRequestCode());
string url = "http://cad.pi.com/cad/member/encryption";
IDictionary<string, string> parameters = new Dictionary<string, string> {
{
"userAccount",
accountCode
},
{
"password",
str2
},
{
"requestCount",
str4
}
};
HttpWebResponse webresponse = CreatePostHttpResponse(url, parameters, 0x1770, null, null);
if (webresponse == null)
{
MessageBox.Show("请求出错, 请检查网络");
}
else
{
ResModel model = JsonHelper.ParseFromJson<ResModel>(GetResponseString(webresponse));
if (model.code == "0")
{
this.IsValibleCode = "OK";
MessageBox.Show("登录成功!");
try
{
XElement rootNode = UserConfig.RootNode;
if (rootNode == null)
{
return;
}
rootNode.ChildElement("Settings").SetNodeValue("UserName", accountCode);
rootNode.Save(UserConfig.ConfigFile);
}
catch
{
}
base.DialogResult = DialogResult.OK;
}
else
{
MessageBox.Show(model.msg);
}
}
this.tipBox.Hide();
this.btn_login.Enabled = true;
this.btn_cancel.Enabled = true;
}
}
0 0x0private void btn_login_Click(object sender, EventArgs e)
{
this.SecretCode = this.tbSecret.Text.Trim();
string accountCode = this.AccountCode;
if ((accountCode == null) || (accountCode.Length == 0))
{
MessageBox.Show("请输入账号");
}
else if ((this.SecretCode == null) || (this.SecretCode.Length == 0))
{
MessageBox.Show("请输入密码");
}
else
{
this.btn_login.Enabled = false;
this.btn_cancel.Enabled = false;
string str2 = MD5Stream(this.SecretCode);
this.tipBox.Show();
string str4 = MD5Stream(accountCode + ComputerInfo.GetRequestCode());
string url = "http://cad.smartmrop.com/cad/member/encryption";
IDictionary<string, string> parameters = new Dictionary<string, string> {
{
"userAccount",
accountCode
},
{
"password",
str2
},
{
"requestCount",
str4
}
};
HttpWebResponse webresponse = CreatePostHttpResponse(url, parameters, 0x1770, null, null);
if (webresponse == null)
{
MessageBox.Show("请求出错, 请检查网络");
}
else
{
ResModel model = JsonHelper.ParseFromJson<ResModel>(GetResponseString(webresponse));
if (model.code == "0")
{
this.IsValibleCode = "OK";
MessageBox.Show("登录成功!");
try
{
XElement rootNode = UserConfig.RootNode;
if (rootNode == null)
{
return;
}
rootNode.ChildElement("Settings").SetNodeValue("UserName", accountCode);
rootNode.Save(UserConfig.ConfigFile);
}
catch
{
}
base.DialogResult = DialogResult.OK;
}
else
{
MessageBox.Show(model.msg);
}
}
this.tipBox.Hide();
this.btn_login.Enabled = true;
this.btn_cancel.Enabled = true;
}
}
这是逆向出来的代码吗? 直接把登陆成功的代码复制到登陆失败那里,就可以实现登陆成功的效果吧 ResModel model = JsonHelper.ParseFromJson<ResModel>(GetResponseString(webresponse));
if (model.code == "0")//把这个判断去掉,(去掉的话,跟着的ELSE也去掉就都会提示成功,或者把==0改成==1,就是错误的也成功,正确的反而不会
{
this.IsValibleCode = "OK";
MessageBox.Show("登录成功!");
}
你这是网络验证,你这么改了,也不一定就有用,后面的很多操做,不一定能用 路过学习,谢谢分享 都有源码了..通过源码就能分析出各种跳过的办法. 网络验证?输入用户和密码登录,抓包返回内容,然后注入伪造一个返回信息model.code == "0"
页:
[1]