DO NOT DEAL WITH THIS MEMBER
Jun 28, 2023 04:05 PM
(This post was last modified: Jun 28, 2023 05:17 PM by Panda™.)
I am trying to figure out a way to submit the captcha on Omegle.
I have coded the function to send the captcha key to 2Captcha and receive their reply, I've gotten all this to work, but submitting the response is melting my brain because I cant figure out how I can submit the response. I found the element that's hidden to show where to type the response, which is where I will be entering the response, but there's no button to submit the response, this is what I'm missing.
If someone could help me plzzzzz :)
I read that after entering the response in the textarea; g-recaptcha-response that it should automatically pass if the response is correct, but nothing happens, i enter the response and doesn't seem to be doing anything. I'm confused, would appricate some help
DO NOT DEAL WITH THIS MEMBER
You need to put the captcha in an HTML form and submit to a route where backend code (like PHP or anything) can receive the forms post parameter. You could also use JS to get the elements current value (captcha verify token basically) and use JS to submit wherever.
I tried someting similar, and i got this respons from a friend, Maybe it can help you?
Code // Find the textarea element to enter the captcha response
var textarea = document.querySelector('textarea#g-recaptcha-response');
// Set the value of the textarea to your captcha response
textarea.value = 'captcha_response';
// Trigger the change event on the textarea to simulate user input
var event = new Event('input', { bubbles: true });
textarea.dispatchEvent(event);
In the above code, replace 'captcha_response' with the actual captcha response that you received from 2Captcha.
By setting the value of the textarea and triggering the 'input' event, you simulate user input, which should trigger any necessary validation or submission processes associated with the captcha.
DO NOT DEAL WITH THIS MEMBER
(Jun 29, 2023 12:42 PM)Colioo Wrote: I tried someting similar, and i got this respons from a friend, Maybe it can help you?
Code // Find the textarea element to enter the captcha response
var textarea = document.querySelector('textarea#g-recaptcha-response');
// Set the value of the textarea to your captcha response
textarea.value = 'captcha_response';
// Trigger the change event on the textarea to simulate user input
var event = new Event('input', { bubbles: true });
textarea.dispatchEvent(event);
In the above code, replace 'captcha_response' with the actual captcha response that you received from 2Captcha.
By setting the value of the textarea and triggering the 'input' event, you simulate user input, which should trigger any necessary validation or submission processes associated with the captcha.
Was this for Omegle or another website? Just curious.
I will give this a try, only stuck on that last part, although instead of doing the bot in Selenium I decided to finish the API version, which doesn't really need recaptcha.
(Jun 29, 2023 12:48 PM)Panda™ Wrote: Was this for Omegle or another website? Just curious.
I will give this a try, only stuck on that last part, although instead of doing the bot in Selenium I decided to finish the API version, which doesn't really need recaptcha.
Another website.
The code was a general example to simulate the submission of a captcha response using JavaScript.
DO NOT DEAL WITH THIS MEMBER
(Jun 29, 2023 12:50 PM)Colioo Wrote: Another website.
The code was a general example to simulate the submission of a captcha response using JavaScript.
Gotcha! Will give it a try later on
the easiest way is to simulate the http POST request with the solved key in the response. Simulating a button click often reset the captcha
|