void mainWhile(object q3Str) { DateTime hdStart = DateTime.Now; int hdnum = 0; string txt = q3Str + z4Str + "0000"; long hd = Convert.ToInt64(txt); for (int i = 0; i < 10000; i++) { string keyword = (hd + i).ToString(); int bl = CollectRule.MainWhile(search, keyword); if (bl == 1) { num++; hdnum++; } else if (bl == -1) { MessageBox.Show(DateTime.Now.ToString() + "执行到:" + keyword + "时,当前IP开始被" + search + "屏蔽,未启动VPN!\r\n"); } } DateTime hdEnd = DateTime.Now; StringHelp.Write(StringHelp.pathError, hdEnd.ToString() + " 号段:" + q3Str + "结束。" + "用时:" + DateHelp.DateDiff(hdEnd, hdStart) + "获取个数:" + hdnum + "\r\n"); }
//匹配当地所有号段 void mainWhile(object tel) { DateTime hdStart = DateTime.Now; int hdnum = 0; string telStr = tel.ToString(); string strSql = "select SUBSTRING(Number7,1,3) q3w from TelphoneData where SUBSTRING(Number7,4,4)=" + telStr.Substring(3, 4) + " and city='" + textBox2.Text + "'"; DataTable returnDt = SqlHelp.bangding(strSql); string telStr8 = telStr.Substring(3, 8); for (int i = 0; i < returnDt.Rows.Count; i++) { string keyword = returnDt.Rows[i][0].ToString() + telStr8; int bl = CollectRule.MainWhile(search, keyword); if (bl == 1) { num++; hdnum++; } else if (bl == -1) { MessageBox.Show(DateTime.Now.ToString() + "执行到:" + keyword + "时,当前IP开始被" + search + "屏蔽,未启动VPN!\r\n"); } } DateTime hdEnd = DateTime.Now; StringHelp.Write(StringHelp.pathError, hdEnd.ToString() + "号码:" + telStr + "执行结束。" + "用时:" + DateHelp.DateDiff(hdEnd, hdStart) + "获取个数:" + hdnum + "\r\n"); }
void SearchResult(object qh_hd) { string keyword = qh_hd.ToString(); int bl = CollectRule.MainWhile(search, keyword); if (bl == 1) { num++; } else if (bl == -1) { MessageBox.Show(DateTime.Now.ToString() + "执行到:" + keyword + "时,当前IP开始被" + search + "屏蔽,未启动VPN!\r\n"); } #region MyRegion //Regex r = new Regex("<div id=\"content_left\"[\\s\\S]*<div style=\"clear:both;height:0;\"></div>", RegexOptions.IgnoreCase); //string htmlStr = StringHelp.GetHtml2(url, keyword); //string input = r.Match(htmlStr).Value; ////HtmlResult hr = (HtmlResult)ht; //if (htmlStr.IndexOf("您的电脑或所在的局域网络有异常的访问") > 0) //{ // try // { // StringHelp.Write(StringHelp.pathError, DateTime.Now.ToString() + "——————当前IP开始被baidu屏蔽————————————" + keyword + "\r\n"); // do // { // StringHelp.getChangeIp(); // htmlStr = StringHelp.GetHtml2(url, keyword); // } while (hr.htmlStr.IndexOf("您的电脑或所在的局域网络有异常的访问") > 0); // if (hr.input != "") // { // MainProc(hr.keyword, hr.input); // } // } // catch (Exception ex) // { // StringHelp.Write(StringHelp.pathError, DateTime.Now.ToString() + ex + hr.keyword + "\r\n"); // MessageBox.Show("baidu开始屏蔽!当前执行到" + hr.keyword + "用时:" + DateHelp.DateDiff(DateTime.Now, dt) + ",未启动IP精灵", "信息提示", MessageBoxButtons.OK, MessageBoxIcon.Information); // } //} //else if (hr.input != "") //{ // if (MainProc(hr.keyword, hr.input)) // { // num++; // } //} #endregion }
void mainWhile(object tel) { string keyword = tel.ToString(); int bl = CollectRule.MainWhile(search, keyword); if (bl == 1) { num++; } else if (bl == -1) { MessageBox.Show(DateTime.Now.ToString() + "执行到:" + keyword + "时,当前IP开始被" + search + "屏蔽,未启动VPN!\r\n"); } }
void mainWhile(string qh, string q3) { string txt = q3 + "0000"; long hd = Convert.ToInt64(txt); for (int i = 0; i < 10000; i++) { string keyword = qh + (hd + i).ToString(); int bl = CollectRule.MainWhile(search, keyword); if (bl == 1) { num++; } else if (bl == -1) { MessageBox.Show(DateTime.Now.ToString() + "执行到:" + keyword + "时,当前IP开始被" + search + "屏蔽,未启动VPN!\r\n"); } } }
void mainWhile(object tel) { string telStr = tel.ToString(); string strSql = "select SUBSTRING(Number7,1,3) q3w from TelphoneData where SUBSTRING(Number7,4,4)=" + telStr.Substring(3, 4) + " and city='" + textBox2.Text + "'"; DataTable returnDt = SqlHelp.bangding(strSql); string telStr8 = telStr.Substring(3, 8); for (int i = 0; i < returnDt.Rows.Count; i++) { string keyword = returnDt.Rows[i][0].ToString() + telStr8; int bl = CollectRule.MainWhile(search, keyword); if (bl == 1) { num++; } else if (bl == -1) { MessageBox.Show(DateTime.Now.ToString() + "执行到:" + keyword + "时,当前IP开始被" + search + "屏蔽,未启动VPN!\r\n"); } } }
//本文件记录 void mainWhile0(object tel) { DateTime hdStart = DateTime.Now; int hdnum = 0; string keyword = tel.ToString(); int bl = CollectRule.MainWhile(search, keyword); if (bl == 1) { num++; hdnum++; } else if (bl == -1) { MessageBox.Show(DateTime.Now.ToString() + "执行到:" + keyword + "时,当前IP开始被" + search + "屏蔽,未启动VPN!\r\n"); } DateTime hdEnd = DateTime.Now; StringHelp.Write(StringHelp.pathError, hdEnd.ToString() + "号码:" + keyword + "执行结束。" + "用时:" + DateHelp.DateDiff(hdEnd, hdStart) + "获取个数:" + hdnum + "\r\n"); }