http://club.eebbk.com/login弄了大半天也没成功 HttpClient httpClient = new HttpClient();
httpClient.getHostConfiguration().setHost("club.eebbk.com", 80);
PostMethod postMethod = new PostMethod(/login); NameValuePair username = new NameValuePair("userName", "yhqloveliuyifei");
NameValuePair userpassword = new NameValuePair("userPassword", "5083291");
NameValuePair code = new NameValuePair("code", CheckCode);
postMethod.setRequestBody(new NameValuePair[] { username,userpassword,code});
int statusCode = httpClient.executeMethod(postMethod); 验证码的获取:
JLabel lb1 = new JLabel(new ImageIcon(new URL("http://club.eebbk.com/checkcode")));
如果不输入验证码的话,会提示验证码不能为空,返回的状态码为302,如果输入验证码,不管输错输对,返回的状态码都是200,这里应该返回302,提示成功或者错误信息,不应该是200,在这里求大神们指导下该怎么弄?
httpClient.getHostConfiguration().setHost("club.eebbk.com", 80);
PostMethod postMethod = new PostMethod(/login); NameValuePair username = new NameValuePair("userName", "yhqloveliuyifei");
NameValuePair userpassword = new NameValuePair("userPassword", "5083291");
NameValuePair code = new NameValuePair("code", CheckCode);
postMethod.setRequestBody(new NameValuePair[] { username,userpassword,code});
int statusCode = httpClient.executeMethod(postMethod); 验证码的获取:
JLabel lb1 = new JLabel(new ImageIcon(new URL("http://club.eebbk.com/checkcode")));
如果不输入验证码的话,会提示验证码不能为空,返回的状态码为302,如果输入验证码,不管输错输对,返回的状态码都是200,这里应该返回302,提示成功或者错误信息,不应该是200,在这里求大神们指导下该怎么弄?
GET /code?code=89934&d=1342950249754&jsoncallback=jQuery1640006495118715272474_1342950234980&_=1342950249755 HTTP/1.1服务器端返回了一个很有意思的内容:
jQuery1640006495118715272474_1342950234980({rs:'1'})然后表单才正式提交。建议你要完整跟踪所有的页面流情况,尤其是很可能有某些Cookie信息和隐藏域的信息。
我也装了GET /code?code=89934&d=1342950249754&jsoncallback=jQuery1640006495118715272474_1342950234980&_=1342950249755这个验证码检测,我看不懂。code后面那个是你填的验证码,后面那一串每次都不一样,我不知道是怎么验证的,难道是随机的么?jQuery1640006495118715272474_1342950234980({rs:'1'})
这个是返回了1,也就是验证码正确,如果rs后面不是跟的1,说明验证码错误。。现在关键的问题是怎么去模拟验证码的验证。。