public void ModifyStr(string str1, string str2) { if (InvokeRequired) { Modifystr stcb = new Modifystr(ModifyStr); Invoke(stcb, new object[] { str1, str2 }); } else { txt_ts.Text = str1 + "》正在尝试:" + str2; //显示点啥 File.AppendAllText(StaticClass.file + "/logs.ini", txt_ts.Text + "\r\n"); //输出日志 if (str1.Contains("\"errno\":0")) //密码正常 { StaticClass.status = true; MessageBox.Show("密码是:" + str2); } else if (str1.Contains("\"errno\":-9"))//密码错误 { } else if (str1.Contains("\"errno\":-62"))//要输入验证码 { } else if (str1.Contains("404"))//拒绝访问 { StaticClass.status = true; MessageBox.Show("你的IP被拒绝访问,请稍后重试"); } else { } //未知错误 } }
public void ModifyStr(string html, string password) { if (InvokeRequired) { Modifystr stcb = new Modifystr(ModifyStr); Invoke(stcb, new object[] { html, password }); } else { txt_ts.Text = html + "》正在尝试:" + password; //显示点啥 File.AppendAllText(StaticClass.file + "/logs.ini", txt_ts.Text + "\r\n"); //输出日志 if (html.Contains("\"errno\":0")) //密码正常 { StaticClass.status = true; btn_status.Text = "启动"; MessageBox.Show("密码是:" + password); } else if (html.Contains("\"errno\":-9"))//密码错误 { } else if (html.Contains("\"errno\":-62"))//要输入验证码 { } else//拒绝访问、未知错误 { if (!StaticClass.status && !cB_proxy.Checked) { btn_status.PerformClick(); MessageBox.Show("你的IP被拒绝访问,请稍后重试"); } } } }
public void ModifyStr(string str1, string str2) { if (InvokeRequired) { Modifystr stcb = new Modifystr(ModifyStr); Invoke(stcb, new object[] { str1, str2 }); } else { txt_ts.Text = str1 + "》正在尝试:" + str2; //显示点啥 File.AppendAllText(StaticClass.file + "/logs.ini", txt_ts.Text + "\r\n"); //输出日志 if (str1.Contains("\"errno\":0")) //密码正常 { StaticClass.status = true; btn_status.Text = "启动"; MessageBox.Show("密码是:" + str2); } else if (str1.Contains("\"errno\":-9"))//密码错误 { } else if (str1.Contains("\"errno\":-62"))//要输入验证码 { } else//拒绝访问、未知错误 { if (!StaticClass.status) { StaticClass.status = true; btn_status.Text = "启动"; if (cB_ktwo.Checked) { #region 利用代理服务重新跑 try { HttpProxy httpProxy = new HttpProxy(); if (httpProxy.startUp(0)) { btn_status.PerformClick(); } else { MessageBox.Show("代理服务无法启动"); } } catch { } #endregion 利用代理服务重新跑 } else { MessageBox.Show("你的IP被拒绝访问,请稍后重试"); } } } } }