Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOM hint element when extension is solving or finished solving a captcha #47

Open
StigP1337 opened this issue May 24, 2024 · 4 comments

Comments

@StigP1337
Copy link

Do you have plans to add some kind of (optional) hint to the DOM of a website which indicates if the extension is currently solving a captcha and/or finished solving a captcha?

I am using the "automation build" version of the extension with a Python Selenium script and it would be easier in some cases to know when solving of the captcha is finished or still in progress.

A (hidden) element in the DOM with a unique id and a status value would be nice.

@j-w-yun
Copy link
Collaborator

j-w-yun commented May 24, 2024

@StigP1337

We have received similar requests from other users and have seriously considered implementing this feature. However, our primary concern has been maintaining stealth. Introducing changes to the DOM or dispatching Javascript events/messages could potentially be detected by captcha providers, which would compromise the functionality of our extension.

Due to these security implications, we have not implemented such features to date. If you, or anyone in the community, knows of a method to achieve this functionality that remains undetectable by captcha systems, we would be very interested in exploring it further. Please feel free to share your ideas.

@j-w-yun
Copy link
Collaborator

j-w-yun commented May 24, 2024

For now, can navigate into the iframe (for which the methods of doing so vary depending on how you're automating; for injected Javascript, you can just contentWindow.document into the iframe element. For Selenium and other browser automation tools, you can switch to the iframe, IIRC via switch_to?), and detect for the appropriate selectors of a checkmark.

@Le0Developer
Copy link
Collaborator

Most CAPTCHAs also already natively expose such events.

DOM

Turnstile, hCaptcha and Text CAPTCHA will all put their token into a hidden<input> element you can check for updates (reCAPTCHA uses a hidden textarea element).

Events

Additionally, since all CAPTCHAs (except text captcha) use iframes, you can listen in on their communication by just listening to message events. They will all dispatch a "done" event from the iframe to your main javascript context with the CAPTCHA token.

@StigP1337
Copy link
Author

Thank you for the reply. I will try your suggestions. I didn't thought about checking for the token or the message events.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants