本帖最后由 missgold 于 2014-9-28 23:45 编辑
我最近自动注册vimeo.com, 只有三个字段,name, password, email 没有验证码,提交后就说未授权,后来发现js中有个隐藏字段 token 貌似是cookie中的,但是弄了还是出错。有人帮我看看不, 还有一个问题就是有没有一个软件能够监测点击提交后post了哪些数据,免得漏掉一些js中的字段。 以下是我的代码。
[C#] 纯文本查看 复制代码 HttpHelper http = new HttpHelper();
HttpItem item = new HttpItem();
item.URL = "https://vimeo.com/join";
item.Method = "get";
item.Cookie = this.Cookie;
item.ContentType = "application/x-www-form-urlencoded";
//ProxyIp = IPlist[0],
HttpResult result = http.GetHtml(item);
string retMsg = result.Html;
this.Cookie = result.Cookie;
Regex r = new Regex("(?<=xsrft: ')[\\s\\S]*?(?=')");
string token = r.Match(result.Html).Value;
item.URL = String.Format("https://vimeo.com/join{0}", "");
item.Method = "POST";
item.ContentType = "application/x-www-form-urlencoded";
item.Postdata = String.Format("name={0}&password={1}&email={2}&submit=Join&service=vimeo&token={3}", "jim green", password, email, token);
item.Cookie = this.Cookie;
//ProxyIp = IPlist[0]
result = http.GetHtml(item);
retMsg = result.Html;
|