How to submit the captcha in twitter captcha? used to work now they changed it

Joined
Oct 9, 2019
Messages
48
Reaction score
7
I was stuck on this for days and not making progress. The problem I am having is the submission part. I used to have it working but they changed the code on the page somehow and I can't figure out where I need to or how I need to insert the recaptcha answer in order to get the result back as ok to go ahead. Currently I have imitated as far as I could see by injecting the result into the element where it goes when I did it manually. I then force the continue button to come visible but when I click it the page just snaps back to the start of the captcha again rather than letting me into to account.

Look here (https://postimg.cc/PLx68FTm) at the current inspect element data for it when I did it manual.

I am firing the js in python via the webdriver. The old solve was done like so

Code:
      self.client.execute_script("window.wrappedJSObject.onDataCallback('{}')".format(recaptcha_answer))

But now that code has changed as you can see in the image above but I don't know how to inject it correctly now.

I am doing it like so

Code:
      self.client.execute_script("""
      var paragraph = document.getElementById("verification_string");
      var text = document.createTextNode("{}</input>");

      paragraph.appendChild(text);

      """.format(recaptcha_answer))

but it is producing the said result above of just restarting recaptcha from the beginning. When I checked the element after inserting it it looked just like when done manually with the recaptcha result added but still doesn't work so I don't know what is missing.

Any clues on how to get around this shit? I try to make all my new projects in requests only these days but I had this one for years working in twitter and when I tried in requests there was a load of bullshit with handshakes or suchlike I gave up. I heard from someone else not to bother as well as they said it has security like instagram in that sense so not to try with requests. Besides all these bots have been working well besides this one part so no need to reinvent the wheel but I wanna get it going again as this is causing a roadblock.
 
I was stuck on this for days and not making progress. The problem I am having is the submission part. I used to have it working but they changed the code on the page somehow and I can't figure out where I need to or how I need to insert the recaptcha answer in order to get the result back as ok to go ahead. Currently I have imitated as far as I could see by injecting the result into the element where it goes when I did it manually. I then force the continue button to come visible but when I click it the page just snaps back to the start of the captcha again rather than letting me into to account.

Look here (https://postimg.cc/PLx68FTm) at the current inspect element data for it when I did it manual.

I am firing the js in python via the webdriver. The old solve was done like so

Code:
      self.client.execute_script("window.wrappedJSObject.onDataCallback('{}')".format(recaptcha_answer))

But now that code has changed as you can see in the image above but I don't know how to inject it correctly now.

I am doing it like so

Code:
      self.client.execute_script("""
      var paragraph = document.getElementById("verification_string");
      var text = document.createTextNode("{}</input>");

      paragraph.appendChild(text);

      """.format(recaptcha_answer))

but it is producing the said result above of just restarting recaptcha from the beginning. When I checked the element after inserting it it looked just like when done manually with the recaptcha result added but still doesn't work so I don't know what is missing.

Any clues on how to get around this shit? I try to make all my new projects in requests only these days but I had this one for years working in twitter and when I tried in requests there was a load of bullshit with handshakes or suchlike I gave up. I heard from someone else not to bother as well as they said it has security like instagram in that sense so not to try with requests. Besides all these bots have been working well besides this one part so no need to reinvent the wheel but I wanna get it going again as this is causing a roadblock.

why are you using doc strings?
what is the value of recaptcha_answer

i have reason to suspect, given your code so far, your last attempt at string format to provide a value dynamically, fails.
 
why are you using doc strings?
what is the value of recaptcha_answer

i have reason to suspect, given your code so far, your last attempt at string format to provide a value dynamically, fails.

Hi, thanks for reply.

On further inspection I saw that I was using the wrong submit field.

I found the standard one 'g-recaptcha-response' and make it show itself and add the value to the text box however now a new issue is there is no submit button and cannot yet figure out how to fire the callback.

The callback code on page is https://pastebin.com/egpY3CTe (bhw would not allow me to paste it here for some reason).

Now I know shit about js (just started watching some tutorials now to try and make sense of the basics). So can you advise how I can call the callback given that information? The recaptcha response lies there in the field but don't yet know how to send it off.
 
you would have your browser or some man in the middle proxy to observe the request/response chain. this is where you will find the correct request to duplicate
 
Back
Top