Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27
  1. #21
    Solarsonic is offline Senior Member
    Join Date
    Mar 2011
    Posts
    261
    Rep Power
    4

    Default

    Quote Originally Posted by Norm View Post
    Yes, you wouldn't have any control over the site sending Set-Cookie.

    No idea what causes the captcha to stay. Can there be other reasons?
    Can you show that your code sends Cookies?
    Yes, by reading the headers of the URL connection like so:

    Java Code:
    String headerName=null;
    for (int i=1; (headerName = urlConn.getHeaderFieldKey(i))!=null; i++) {
     	if (headerName.equals("Set-Cookie")) {                  
    	String cookie = urlConn.getHeaderField(i);
            System.out.println(cookie);
    }
    }
    I get many cookie names and values as a result.
    Last edited by Solarsonic; 05-22-2011 at 02:57 AM.

  2. #22
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    "Set-Cookie:" is what is sent by the server to the client.
    The client sends "cookie: fields when connecting to a server. Does your program send cookie fields in the request header it sends to the server?

    Here is a sample of what the Firefox browser sends to my server:
    GET / HTTP/1.1
    Host: 127.0.0.1:8080
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.17) Gecko/20110420 Firefox/3.6.17
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Cookie: wowbb=%7C%7C%7C%7C-360
    Last edited by Norm; 05-22-2011 at 03:12 AM.

  3. #23
    Solarsonic is offline Senior Member
    Join Date
    Mar 2011
    Posts
    261
    Rep Power
    4

    Default

    Quote Originally Posted by Norm View Post
    "Set-Cookie:" is what is sent by the server to the client.
    The client sends "cookie: fields when connecting to a server. Does your program send cookie fields in the request header it sends to the server?

    Here is a sample of what the Firefox browser sends to my server:
    No, my program does not send cookie fields in the request header.

    I figured this out by using getRequestProperties(). If it's not cookies, what else could be causing the captcha to stay?

  4. #24
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    what else could be causing the captcha to stay?
    You'll have to ask the server what criteria it uses to cause captcha to stay.

    Aren't captcha a technique to ensure that the server is talking to a person vs some program?
    It seems that it is working correctly then.

  5. #25
    Solarsonic is offline Senior Member
    Join Date
    Mar 2011
    Posts
    261
    Rep Power
    4

    Default

    Quote Originally Posted by Norm View Post
    You'll have to ask the server what criteria it uses to cause captcha to stay.

    Aren't captcha a technique to ensure that the server is talking to a person vs some program?
    It seems that it is working correctly then.
    Yes, but I proxy to try to bypass it. What else could be causing it to stay even when you proxy?

  6. #26
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,306
    Rep Power
    25

    Default

    Sorry, I have no idea.

  7. #27
    Solarsonic is offline Senior Member
    Join Date
    Mar 2011
    Posts
    261
    Rep Power
    4

    Default

    Quote Originally Posted by Norm View Post
    Sorry, I have no idea.
    Well, if there are no cookies and I proxy then the only thing left is that the proxy is detected.

    And I'm 99% sure this is the problem.
    Last edited by Solarsonic; 05-22-2011 at 04:12 AM.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 7
    Last Post: 02-10-2011, 07:37 PM
  2. Java: Handling cookies when logging in with POST
    By cloakbot in forum New To Java
    Replies: 1
    Last Post: 06-17-2010, 12:19 AM
  3. Logging in with Java (cookies)
    By Supamagier in forum Advanced Java
    Replies: 0
    Last Post: 05-15-2009, 10:22 AM
  4. Deleting and Adding Lists in Java Applets
    By Bomber_Will in forum Java Applets
    Replies: 4
    Last Post: 11-28-2008, 06:52 AM
  5. JSP cookies example
    By Java Tip in forum Java Tip
    Replies: 0
    Last Post: 01-15-2008, 03:11 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •