public void Reg() { string status = string.Empty; Email163 email = new Email163(); email.getImgCode = GetImgCode; //bool s=email.Login163("yqmacyuqiang","aa13655312932bb"); //email.setProxy("121.69.24.22:8118");//121.69.24.22:8118 int n = 20; int regcount = 0; int numforip = int.Parse(txtBox_pppoe_num.Text); while (n-- > 0) { if (regcount >= numforip) { string ip = changeIP(); regcount = 0; waitforIp(ip); email = new Email163(); email.getImgCode = GetImgCode; } string name = CreateName(); string pwd = CreatePwd(); if (!email.RegUserPass(name, pwd, ref status)) { bool s = email.Login163(name, pwd); MessageBox.Show((s ? "登录成功" : "登录失败") + "\n" + status); if (status.Contains("gray") || status.Contains("SLOW_DOWN")) { string ip = changeIP(); regcount = 0; waitforIp(ip); email = new Email163(); email.getImgCode = GetImgCode; } else { string a = ""; } } else { bool s = email.Login163(name, pwd); MessageBox.Show((s ? "登录成功" : "登录失败") + "\n" + status); regcount++; } } }
public void Reg() { string status = string.Empty; Email163 email = new Email163(); email.getImgCode = GetImgCode; //bool s=email.Login163("yqmacyuqiang","aa13655312932bb"); //email.setProxy("121.69.24.22:8118");//121.69.24.22:8118 int n = 20; int regcount = 0; int numforip = int.Parse(txtBox_pppoe_num.Text ); while (n-->0) { if (regcount >= numforip) { string ip = changeIP(); regcount = 0; waitforIp(ip); email = new Email163(); email.getImgCode = GetImgCode; } string name = CreateName(); string pwd = CreatePwd(); if (!email.RegUserPass(name, pwd , ref status)) { bool s = email.Login163(name, pwd); MessageBox.Show((s ? "登录成功" : "登录失败") + "\n" + status); if(status .Contains("gray")||status .Contains ("SLOW_DOWN")) { string ip= changeIP(); regcount = 0; waitforIp(ip ); email = new Email163(); email.getImgCode = GetImgCode; } else { string a = ""; } } else { bool s = email.Login163(name, pwd); MessageBox.Show((s ? "登录成功" : "登录失败") + "\n" + status); regcount++; } } }