static void Main(string[] args) { string orgStr = "jAeagYXxGbDe17U6TFFEomF3JnuB6V+wsjX+oU56NDjkbO8P3vxPdw=="; string key = "liudeng"; string org = MD5.Decrypt(orgStr, key); return; HtmlDocument htmlDoc = new HtmlDocument(); htmlDoc.Load("D:/1.html"); HtmlNode node = htmlDoc.DocumentNode.SelectSingleNode("//div[@class=\"notice\"]"); HtmlNodeCollection childCollect = node.ChildNodes; VPNInfo vpnInfo = new VPNInfo(); for (int i = 0; i < childCollect.Count; i++) { string innerText = childCollect[i].InnerText; if (string.IsNullOrEmpty(innerText)) { continue; } innerText = innerText.Trim(); if (innerText.Contains("Ip")) { vpnInfo.VPNAddr = processInnerText(innerText); } else if (innerText.Contains("Account")) { vpnInfo.UserName = processInnerText(innerText); } else if (innerText.Contains("Password") && !innerText.Contains("changes")) { vpnInfo.UserPassword = processInnerText(innerText); ; } } }
void Start() { string orgStr = "jAeagYXxGbDe17U6TFFEomF3JnuB6V+wsjX+oU56NDjkbO8P3vxPdw=="; string key = "liudeng"; string org = MD5.Decrypt(orgStr, key); WebClientExt mWebClient = new WebClientExt(); string cookieStr = ""; string config = mWebClient.Get(org, ref cookieStr); mWebClient.Get("http://www.freevpn.cc/account/", ref cookieStr); mWebClient.Post("http://www.freevpn.cc/account/php/Qaptcha.jquery.php", cookieStr, "action=qaptcha"); string result = mWebClient.Post("http://www.freevpn.cc/account/", cookieStr, "iQapTcha=&submit=Get+VPN+info"); result = result.Replace("\0",""); HtmlDocument htmlDoc = new HtmlDocument(); htmlDoc.LoadHtml(result); HtmlNode node = htmlDoc.DocumentNode.SelectSingleNode("//div[@class=\"notice\"]"); HtmlNodeCollection childCollect = node.ChildNodes; VPNInfo vpnInfo = new VPNInfo(); for (int i = 0; i < childCollect.Count; i++) { string innerText = childCollect[i].InnerText; if (string.IsNullOrEmpty(innerText)) { continue; } innerText = innerText.Trim(); if (innerText.Contains("Ip")) { vpnInfo.VPNAddr = processInnerText(innerText); } else if (innerText.Contains("Account")) { vpnInfo.UserName = processInnerText(innerText); } else if (innerText.Contains("Password") && !innerText.Contains("changes")) { vpnInfo.UserPassword = processInnerText(innerText); ; } } }