private bool Login(string uid, string pwd) { const string url = "http://www.jikesms.com/common/ajax.htm"; string postdata = string.Format("action={2}&event_name_login={3}&uid={0}&password={1}", uid, Md5Encrypt(pwd).ToUpper(), HeConToUe("user: UserEventAction"), HeConToUe("提交")); string html = _web.Post(url, postdata); if (!string.IsNullOrEmpty(html) && html.Contains("登录成功")) { return(true); } return(false); }
public string GetMobile(string type) { //type 40 新浪微博解锁 const string url = BaseUrl + "getMobilenum"; string postData = string.Format("uid={0}&pid={1}&token={2}&size=1", _uid, type, _token); string html = _web.Post(url, postData); if (!string.IsNullOrEmpty(html) && Regex.IsMatch(html, @"\d{11}")) { return(html); } return(null); }
public string GetMobile(string type = "48") { web.Reffer = null; string postData = string.Format("action=getMobilenum&pid={0}&uid={1}&token={2}", type, uid, token); string html = web.Post(url, postData); Regex reg = new Regex(@"^(?<mobile>\d{11})\|[0-9a-f]{32}$"); if (!string.IsNullOrEmpty(html) && reg.IsMatch(html)) { return(reg.Match(html).Groups["mobile"].Value); } else { return(null); } }
public Yunma(string username, string password) { _web = new WebAccessBase { TimeOut = 60000 }; const string url = BaseUrl + "loginIn"; string postData = string.Format("uid={0}&pwd={1}", username, password); string html = _web.Post(url, postData); if (string.IsNullOrEmpty(html) || !html.Contains("Token")) { throw new Exception("云码初始化失败"); } try { var json = DynamicJson.Parse(html); _uid = json.Uid; _token = json.Token; Balance = json.Balance; } catch (Exception) { throw new Exception("云码初始化失败"); } }
public Yzm1(string username, string password) { web = new WebAccessBase { TimeOut = 60000 }; string postData = string.Format("action=loginIn&name={0}&password={1}", username, password); string html = web.Post(url, postData); const string str = @"1\|[A-Fa-f0-9]{8}(-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}$"; Regex reg = new Regex(str); if (!string.IsNullOrEmpty(html) && reg.IsMatch(html)) { token = html.Split('|')[1]; } else throw new Exception("壹码初始化失败"); }
public F02(string uid, string pwd) { web = new WebAccessBase { TimeOut = 60000 }; string postData = string.Format("action=loginIn&uid={0}&pwd={1}", uid, pwd); string html = web.Post(url, postData); string str = @"^" + uid + @"\|[0-9a-f]{32}$"; Regex reg = new Regex(str); if (!string.IsNullOrEmpty(html) && reg.IsMatch(html)) { token = html.Split('|')[1]; this.uid = uid; } else throw new Exception("爱码初始化失败"); }
public string GetMobile(string type) { web.Reffer = null; string postData = string.Format("action=getPhone&sid={0}&token={1}", type, token); string html = web.Post(url, postData); Regex reg = new Regex(@"^1\|(?<mobile>\d{11})$"); if (!string.IsNullOrEmpty(html) && reg.IsMatch(html)) { return(reg.Match(html).Groups["mobile"].Value); } return(null); }
public Yzm1(string username, string password) { web = new WebAccessBase { TimeOut = 60000 }; string postData = string.Format("action=loginIn&name={0}&password={1}", username, password); string html = web.Post(url, postData); const string str = @"1\|[A-Fa-f0-9]{8}(-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}$"; Regex reg = new Regex(str); if (!string.IsNullOrEmpty(html) && reg.IsMatch(html)) { token = html.Split('|')[1]; } else { throw new Exception("壹码初始化失败"); } }
public string GetMobile(string type) { web.Reffer = null; string postData = string.Format("action=getMobilenum&pid={0}&uid={1}&token={2}", type, uid, token); string html = web.Post(url, postData); Regex reg = new Regex(@"^(?<mobile>\d{11})\|[0-9a-f]{32}$"); if (!string.IsNullOrEmpty(html) && reg.IsMatch(html)) { return(reg.Match(html).Groups["mobile"].Value); } //File.AppendAllText(System.Environment.CurrentDirectory + "/GetMobile_html.txt", DateTime.Now + "\t" + html + Environment.NewLine); return(null); }
public Xudan123(string uid, string pwd) { web = new WebAccessBase { TimeOut = 60000 }; string postData = string.Format("action=loginIn&uid={0}&pwd={1}", uid, pwd); string html = web.Post(url, postData); string str = @"^" + uid + @"\|[0-9a-f]{32}$"; Regex reg = new Regex(str); if (!string.IsNullOrEmpty(html) && reg.IsMatch(html)) { token = html.Split('|')[1]; this.uid = uid; } else { throw new Exception("飞Q平台初始化失败"); } }
/// <summary> /// /// </summary> /// <param name="web"></param> /// <returns></returns> /// <exception cref="ArgumentNullException"></exception> public static string UnfreezeByAvatar(WebAccessBase web) { if (web == null) throw new ArgumentNullException("web"); var home = web.GetHTML("http://m.weibo.cn/security?"); if (string.IsNullOrEmpty(home)) { return "访问安全页面失败"; } var st = StRegex.Match(home).Groups["st"].Value; if (string.IsNullOrEmpty(st)) { return "分析st失败"; } web.Reffer = new Uri("http://m.weibo.cn/security?"); string first = web.Post(UnfreezeByAvatarQuickNextPostUrl, string.Format("number=0&st={0}", st)); if (string.IsNullOrEmpty(first)) { return "第一次提交失败"; } int firstCode = AnalyseNextNumber(first); if (firstCode == -1) { return "分析第一次用户失败"; } web.Reffer = new Uri("http://m.weibo.cn/security?"); string second = web.Post(UnfreezeByAvatarQuickNextPostUrl, string.Format("number={1}&st={0}", st, firstCode)); if (string.IsNullOrEmpty(second)) { return "第二次提交失败"; } int secondCode = AnalyseNextNumber(second); if (secondCode == -1) { return "分析第二次用户失败"; } web.Reffer = new Uri("http://m.weibo.cn/security?"); string third = web.Post(UnfreezeByAvatarQuickNextPostUrl, string.Format("number={1}&st={0}", st, secondCode)); if (string.IsNullOrEmpty(third)) { return "第二次提交失败"; } int thirdCode = AnalyseNextNumber(third); if (thirdCode == -1) { return "分析第二次用户失败"; } string end = web.Post(UnfreezeByAvatarQuickUnfreezePostUrl, string.Format("number={1}&st={0}", st, thirdCode)); if (end == "{\"code\":\"1000\",\"msg\":\"check success\"}") { return "解封成功"; } return "解封失败"; }