private void FinishOneResgister() { currentHaoZi.regStatus = DateTime.Now.ToString(); currentHaoZi.tbStatus = GlobalVar.phoneNum + "|" + GlobalVar.CurrentIp; HaoziHelper.UpdateLoadHaozi(ConfigHelper.GetValue("WebSite"), currentHaoZi, "add"); // Thread.Sleep(6000); int time = ConfigHelper.GetIntValue("停留时间(秒)"); LogManager.WriteLog("开始下一个,停留{0}秒".With(time)); Thread.Sleep(TimeSpan.FromSeconds(time)); ClearAndPrepareNext(); }
private void Init_tb_reg() { if (IsInit_tb_loaded) { return; } IsInit_tb_loaded = true; //填会员信息 Operation new_register = new Operation(MainCefFrame) { CurrentUrl = "http://reg.taobao.com/member/new_register.jhtml", index = 1, PerviousStatus = BusinessStatus.new_register, NextStatus = BusinessStatus.new_cellphone_reg_two, }; new_register.OperationHandler += (s, e) => { #region ==========填会员信息========== //获取ID=J_CheckCode 的data-imgurl属性的值url //识别url中的图片 new Thread(() => { string srcs = ""; for (int i = 0; i < 3; i++) { srcs = CefFrameHelper.GetUrlListByHapId(MainCefFrame, "J_CheckCode", "div", "data-imgurl").FirstOrDefault(); if (!string.IsNullOrEmpty(srcs)) { break; } } if (string.IsNullOrEmpty(srcs)) { LogManager.WriteLog("重复3次后仍然无法获取图片。"); return; } srcs = srcs.Replace("&", "&"); string returnMess; var isVCodeOk = Vcode.GetVcodeFormImageUrl(srcs, out returnMess); Console.WriteLine(isVCodeOk); // string js2run = "document.getElementById('J_Nick').value='{0}';".With(currentHaoZi.tbName) + "document.getElementById('J_Pwd').value='{0}';".With(currentHaoZi.tbPwd) + "document.getElementById('J_RePwd').value='{0}';".With(currentHaoZi.tbPwd) + "document.getElementById('J_Code').value='{0}';".With(returnMess) + "document.getElementById('J_BtnBasicInfoForm').click();"; CefFrameHelper.ExcuteJs(MainCefFrame, js2run); }).Start(); #endregion }; //验证账户信息-选择方式(手机或邮箱) Operation new_cellphone_reg_two = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.new_cellphone_reg_two, NextStatus = BusinessStatus.new_email_reg_two, CurrentUrl = "http://reg.taobao.com/member/new_cellphone_reg_two.jhtml", index = 2 }; new_cellphone_reg_two.OperationHandler += (s, e) => { // BeginInvoke(new Action(() => { FindTitleAndLoadHref("使用邮箱验证"); // })); }; //验证账户信息-选择方式(手机或邮箱)-输入邮箱手机打码 Operation new_email_reg_three = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.new_email_reg_two, NextStatus = BusinessStatus.new_email_reg_three, CurrentUrl = "http://reg.taobao.com/member/new_email_reg_two.jhtml", index = 3 }; new_email_reg_three.OperationHandler += (s, e) => { string js2runS1 = "document.getElementById('J_Email').value='{0}';".With(currentHaoZi.zfbEmail) + "document.getElementsByClassName('btn-b tsl')[0].click();"; CefFrameHelper.ExcuteJs(MainCefFrame, js2runS1); this.bfForms.BT_TB_ChangeTel_Click(s, e); }; //验证账户信息-选择方式(手机或邮箱)-获取激活链接 Operation register_confirm = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.new_email_reg_three, NextStatus = BusinessStatus.regitster_confirm, CurrentUrl = "http://reg.taobao.com/member/new_email_reg_three.jhtml", index = 4 }; register_confirm.OperationHandler += BT_FindActiveUrl_Click; //验证用户信息-完成 Operation account_management = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.regitster_confirm, NextStatus = BusinessStatus.account_management, CurrentUrl = "http://reg.taobao.com/member/register_confirm.jhtml", //https://lab.alipay.com/user/reg/complete/completeTaobao.htm index = 5 }; account_management.OperationHandler += (s, e) => { MainCefFrame.LoadUrl("http://member1.taobao.com/member/fresh/account_management.htm"); }; Operation completeTaobao = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.account_management, NextStatus = BusinessStatus.paymethod, CurrentUrl = "http://member1.taobao.com/member/fresh/account_management.htm", index = 6 }; completeTaobao.OperationHandler += (s, e) => { FindTitleAndLoadHref("立即补全"); }; Operation paymethod = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.paymethod, NextStatus = BusinessStatus.zfb_Reg_paymethod, index = 7, CurrentUrl = "https://memberprod.alipay.com/account/reg/complete/complete.htm?scene=havanaComplete" }; paymethod.OperationHandler += BT_TB_FILLZFB_Click; //===================支付宝注册流程 Operation Zfb_Fill_Account = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.zfb_reg_begin, NextStatus = BusinessStatus.emailCheck, CurrentUrl = GlobalVar.zfb_Reg_enter_1, index = 1, Deadline = 1000 * 60 * 5 }; Zfb_Fill_Account.OperationHandler += BT_Zfb_Fill_Account_Click; Operation emailCheck = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.emailCheck, NextStatus = BusinessStatus.zfb_reg_link_complete, CurrentUrl = "https://memberprod.alipay.com/account/reg/emailCheck.htm", index = 1.1 }; emailCheck.OperationHandler += (s, e) => { BT_Zfb_Reg_Sumbit_s1_Click(this, new EventArgs()); }; Operation zfb_reg_link_complete = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.zfb_reg_link_complete, NextStatus = BusinessStatus.zfb_Reg_paymethod, CurrentUrl = GlobalVar.zfb_Reg_linkcomplete, index = 2 }; zfb_reg_link_complete.OperationHandler += BT_Zfb_reg_fill_Click; Operation zfb_Reg_paymethod = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.zfb_Reg_paymethod, NextStatus = BusinessStatus.zfb_reg_account_reg_success, CurrentUrl = GlobalVar.zfb_Reg_paymethod, index = 3 }; zfb_Reg_paymethod.OperationHandler += BT_ZFB_TB_Reg_Click; Operation zfb_reg_account_reg_success = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.zfb_reg_account_reg_success, NextStatus = BusinessStatus.zfb_reg_account_reg_success, CurrentUrl = GlobalVar.zfb_reg_account_reg_success, index = 4, note = " 导航至添加密保,跳到 开通淘宝" }; //zfb_reg_account_reg_success.OperationHandler += BT_ZFB_REG_nav2addsq_Click; // BT_ZFB_REG_Account_Sucess_Click zfb_reg_account_reg_success.OperationHandler += BT_ZFB_REG_Account_Sucess_Click; Operation zfb_reg_skip_bindassetcard = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.zfb_reg_account_reg_success, //NextStatus = BusinessStatus.zfb_reg_taobao_open,//换 NextStatus = BusinessStatus.zfb_reg_nav2set_add_SecurityQuestion_before, CurrentUrl = GlobalVar.zfb_reg_skip_bindassetcard, index = 5 }; zfb_reg_skip_bindassetcard.OperationHandler += BT_ZFB_REG_TB_open_Click; Operation zfb_reg_taobao_new_alipay_q = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.zfb_reg_taobao_new_alipay_q, NextStatus = BusinessStatus.nav2deliver_address, CurrentUrl = GlobalVar.zfb_reg_taobao_new_alipay_q, index = 31, note = "开通tb", Deadline = int.Parse(ConfigHelper.GetValue("zfb_reg_taobao_new_alipay_RegDeadline")) * 60 * 1000 }; zfb_reg_taobao_new_alipay_q.OperationHandler += BT_ZFB_REG_TB_new_alipay_q_Click; Operation nav2deliver_address = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.nav2deliver_address, NextStatus = BusinessStatus.deliver_address, CurrentUrl = "http://reg.taobao.com/member/register_confirm.jhtml", index = 32, note = "注册完成-跳转->添加收货地址的页面" }; nav2deliver_address.OperationHandler += (s, e) => { MainCefFrame.LoadUrl( "http://member1.taobao.com/member/fresh/deliver_address.htm"); }; Operation add_deliver_address = new Operation(MainCefFrame) { PerviousStatus = BusinessStatus.deliver_address, NextStatus = BusinessStatus.ready, CurrentUrl = "http://member1.taobao.com/member/fresh/deliver_address.htm", index = 33, note = "添加收货地址", }; add_deliver_address.Deadline = GlobalVar.DeadLineOfChangeClearAndPrepareNext; add_deliver_address.OperationHandler += (s, e) => { var js2run = RandomAddressPlace(); CefFrameHelper.ExcuteJs(MainCefFrame, js2run); new Thread(() => { currentHaoZi.regStatus = DateTime.Now.ToString(); currentHaoZi.tbStatus = GlobalVar.CurrentIp; HaoziHelper.UpdateLoadHaozi(ConfigHelper.GetValue("WebSite"), currentHaoZi, "add"); // Thread.Sleep(6000); LogManager.WriteLog("开始下一个"); ClearAndPrepareNext(); }).Start(); }; this.opsList.Add(Zfb_Fill_Account); this.opsList.Add(emailCheck); this.opsList.Add(zfb_reg_link_complete); this.opsList.Add(zfb_Reg_paymethod); this.opsList.Add(zfb_reg_account_reg_success); this.opsList.Add(zfb_reg_skip_bindassetcard); this.opsList.Add(zfb_reg_taobao_new_alipay_q); this.opsList.Add(nav2deliver_address); this.opsList.Add(add_deliver_address); this.opsList.Add(new_register); this.opsList.Add(new_cellphone_reg_two); this.opsList.Add(new_email_reg_three); this.opsList.Add(register_confirm); this.opsList.Add(account_management); this.opsList.Add(completeTaobao); this.opsList.Add(paymethod); }
private void BT_InitAndUpload_Click(object sender, EventArgs e) { MainForm.currentHaoZi = HaoziHelper.InitXiaoHaoFromLine("宛圣豪阴南荣喻09wt|[email protected]|bmcbjkgjf7|umx87164|kucc1112|邓文丽|431003198108073241|12|1|要斌|5|1|锋惠|13|1|傲霜大"); HaoziHelper.UpdateLoadHaozi(ConfigHelper.GetValue("WebSite"), MainForm.currentHaoZi, "add"); ; }
//生成带email的账户密码 private void BT_produce_Click(object sender, EventArgs e) { if (TB_tb_pwd.Text.Trim() == TB_paypwd.Text.Trim()) { MessageBox.Show("傻×,你的C盘将被格式化,如果你继续将把2个密码设成一样的话?", "傻x", MessageBoxButtons.YesNoCancel); return; } List <string> bodyList = new List <string>(); List <string> headerList = new List <string>(); //淘宝名 List <string> tbnameList = new List <string>(); //添加数字 for (int i = 0; i < 10; i++) { bodyList.Add(i.ToString()); } //添加小写字母 for (int i = Convert.ToInt32('a'); i <= Convert.ToInt32('z'); i++) { bodyList.Add(((char)i).ToString()); headerList.Add(((char)i).ToString()); } //添加下划线 bodyList.Add("_"); // bodyList.Add("_"); //中文账户名 List <string> strTBnamelist = Common.FileHelper1.readstringAfterEqual("account//name.txt"); //ShenFenZheng var strIds = FileHelper1.readstringAfter("account//ids.txt", ','); //邮箱-2014年5月28日14时6分4秒[aqq] var emailList = File.ReadAllLines("account//" + TB_filePath.Text.Trim()).ToList(); emailList = emailList.Distinct().ToList(); //读取已经注册好的email List <string> lines = new List <string>(); for (int i = 0; i < emailList.Count; i++) { // string res1 = ProduceRandomStr(1, 1, headerList.ToArray()) + ProduceRandomStr(8, 17, bodyList.ToArray()); string tbname = RandomManager.ProduceRandomStr(2, 5, strTBnamelist.ToArray()) + RandomManager.ProduceRandomStr(4, 9, bodyList.ToArray()); string tbpwd = ""; //= RandomManager.getPwd(); string paypwd = ""; // RandomManager.getPwd(); if (CB_UseOnePwd.Checked) { tbpwd = RandomManager.getPwd(); paypwd = RandomManager.getPwd(); while (tbpwd == paypwd) { paypwd = RandomManager.getPwd(); } } else { tbpwd = TB_tb_pwd.Text.Trim(); paypwd = TB_paypwd.Text.Trim(); } List <string> sqsList = new List <string>(); while (sqsList.Count < 3) { var sq = RandomManager.GetSQ(); bool isTheSameQ = sqsList.Where(_ => _.Split('|')[0] == sq.Split('|')[0] || _.Split('|')[2] == sq.Split('|')[2]).Count() > 0; if (isTheSameQ) { continue; } sqsList.Add(sq); } string s1 = tbname + "|" // + emailList[i].Split('|')[0] + "|" //邮箱名 + emailList[i].Split('|')[1] + "|" //邮箱密码 + tbpwd + "|" //淘宝密码 + paypwd + "|" //支付密码 + RandomIdAndName(strIds) + "|" + sqsList[0] + sqsList[1] + sqsList[2] + Environment.NewLine; lines.Add(s1); Console.Write(s1); // 支付宝账户名(邮箱名)|邮箱密码|淘宝账户名| //淘宝名|支付宝账户名(邮箱名)|邮箱密码|支付宝登录密码|支付宝支付密码|身份证名|身份证号码 FileHelper1.log("account//待注册账号.txt", s1); } new Thread(() => { int i = 1; foreach (var line in lines) { try { var model = HaoziHelper.InitXiaoHaoFromLine(line); HaoziHelper.UpdateLoadHaozi(ConfigHelper.GetValue("WebSite"), model, "add2origin"); Thread.Sleep(300); LogManager.WriteLog("haozi", "oky|" + line); } catch (Exception e2) { LogManager.WriteLog(e2.ToString()); LogManager.WriteLog("haozi", "bad|" + line); LogManager.WriteLog("上传失败"); } Console.WriteLine(i++); } LogManager.WriteLog("上传结束"); }).Start(); }