1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Decaptcher new POST url trouble

Discussion in 'General Programming Chat' started by mline, Feb 3, 2010.

  1. mline

    mline Newbie

    Joined:
    Jan 30, 2010
    Messages:
    49
    Likes Received:
    18
    Are there any other programmers that use a direct http request (multipart/form post) to the decaptcher server (formerly http://decaptcher.com/poster; now http://poster.decaptcher.com)? I'm getting the connection immediately reset by their server as soon as the packet is submitted. I've never had any trouble with it with the old url (other than decaptcher's just general semi-incompetence). Just wondering if there is something other than the URL change that i'm missing or whether their server for http posting pictures is down. I'd really, really, really like to avoid having to use their lame dll for my captcha submits (especially since the luck with them doesn't seem to be all that great at the moment either).
     
  2. divinci

    divinci Junior Member

    Joined:
    Sep 25, 2007
    Messages:
    111
    Likes Received:
    15
    their DLL is rather lame - what's your language?
     
  3. mline

    mline Newbie

    Joined:
    Jan 30, 2010
    Messages:
    49
    Likes Received:
    18
    VB.Net generally. Though really most any .Net platform. I know my way around classic, com-based vb as well. Then obviously little bits of c and whatever else i pick up along my travels through time and spam.
     
    Last edited: Feb 14, 2010
  4. divinci

    divinci Junior Member

    Joined:
    Sep 25, 2007
    Messages:
    111
    Likes Received:
    15
    Time & spam eh! How much traffic are you putting decaptchas way?

    Well let me digg out some .net c# source that I use for decaptcher. Give me a day or so- might speed things up!?!
    Posted via Mobile Device
     
  5. mline

    mline Newbie

    Joined:
    Jan 30, 2010
    Messages:
    49
    Likes Received:
    18
    Oh, much appreciated. But really, i just created a class around the shared dll method signatures and am kind of haxing at least some of the shittiness out of it. The fact that it does its own threading that you have no control over is just ridiculous. Really my HTTP implementation was fine until they changed the domain. I'm honestly just sick of their incompetence, but every other captcha solving place is either even shittier, or way more expensive. My colleagues and I (3 of us) were using roughly 80-100k solves per day or so, combined, for a previous project. On the new project, substantially less.
     
  6. mline

    mline Newbie

    Joined:
    Jan 30, 2010
    Messages:
    49
    Likes Received:
    18
    Seems that decaptcher has gotten everything working with the poster.decaptcher.com domain now. No problems for the http submit any longer.

    When I bitch I like to at least point out when someone's fixed whatever I was complaining about lol
     
    • Thanks Thanks x 1
  7. divinci

    divinci Junior Member

    Joined:
    Sep 25, 2007
    Messages:
    111
    Likes Received:
    15
    weird - i powered up their java API last night - didnt work a toot!

    was waiting to have a look tonight before posting some my c# wrapper.
     
  8. dacash

    dacash Registered Member

    Joined:
    Jan 28, 2008
    Messages:
    51
    Likes Received:
    15
    Location:
    on the dark side.
    I always get server overloaded or image timed out on their server. Maybe we need a better service...
     
  9. mline

    mline Newbie

    Joined:
    Jan 30, 2010
    Messages:
    49
    Likes Received:
    18
    @dacash

    I agree, they totally suck. But what may help with the problem you're having, or may not lol, are you setting the "pict_to" variable? You'd have to check the documentation but i believe it is:

    0 - Default
    1 - 30 seconds
    2 - 60 seconds
    3 - 90 seconds
    4 - infinite

    0, the default, is basiclly their server side default for timeout (which i think is seriously like 5 minutes lol). Their documentation kind of sucks so I didnt realize this for a while. But generally 2 (60 seconds) gives you good balance of getting captchas solved but not waiting too long. This is kind of lazy code, but essentially an easy way to submit via http, avoid their shit dll, and has the pict_to set to 60 seconds. (excuse the custom http class)

    Code:
                Dim http As New HTTPsession(SessionType.Standard)
          Dim resp As HttpResponse
          Dim bound As String = rndNum(15, False)
          Dim postData As String = ""
          Dim sreq As New SearchRequisites
          Dim dRet As New DecaptcherReturn
    
          With http
             .ConnectionTimeout = 15
             .TransferTimeout = 90
             .ContentType = "multipart/form-data; boundary=---------------------------" & bound
          End With
    
          With sreq
             .AddAND("<table><tr>")
             .AddAND("</tr></table>")
          End With
    
          bound = "-----------------------------" & bound
          postData = bound & vbNewLine & _
             "Content-Disposition: form-data; name=""function""" & vbNewLine & vbNewLine & _
             "picture2" & vbNewLine & bound & vbNewLine & _
             "Content-Disposition: form-data; name=""username""" & vbNewLine & vbNewLine & _
             name & vbNewLine & bound & vbNewLine & _
             "Content-Disposition: form-data; name=""password""" & vbNewLine & vbNewLine & _
             pw & vbNewLine & bound & vbNewLine & _
             "Content-Disposition: form-data; name=""pict""; filename=""" & rndStr(10, True) & "." & fileExt & """" & vbNewLine & _
             "Content-Type: " & fileType & vbNewLine & vbNewLine & _
             img & vbNewLine & bound & vbNewLine & _
             "Content-Disposition: form-data; name=""pict_to""" & vbNewLine & vbNewLine & _
             "2" & vbNewLine & bound & vbNewLine & _
             "Content-Disposition: form-data; name=""pict_type""" & vbNewLine & vbNewLine & _
             PictType & vbNewLine & bound & "--"
    
    
          Try
             resp = http.Request("http://poster.decaptcher.com", sreq, "", postData)
             If resp.GetSearchRequisiteStatus = ReqResult.andPositive Then
                dRet = New DecaptcherReturn(resp.GetResponseString)
    
             End If
    
             resp.Dispose()
          Catch ex As Exception
             Debug.WriteLine(ex.ToString)
          End Try
     
  10. mline

    mline Newbie

    Joined:
    Jan 30, 2010
    Messages:
    49
    Likes Received:
    18
    I wasn't planning on it. Asses can be very unsanitary