⊗ppPsCpBy 64 of 84 menu

Bypassing CAPTCHA When Parsing in PHP

So, now you know how CAPTCHA works. Let's now talk about how to bypass it. To do this, you need to make several requests using CURL.

The first request should be sent to the file with the CAPTCHA. Where to send it - can be seen in the HTML code of the form or you can track it in the debugger, where the requests are sent.

The result of this operation will be an image. It can be saved to a file using file_put_contents. After that, the CAPTCHA can be parsed in some way (manually to start with).

The request to the CAPTCHA must be sent via CURL, not file_get_contents, because we must receive and send cookies, since CAPTCHA works on PHP sessions.

So, we get the CAPTCHA, save it to a file, parse this CAPTCHA manually and send a second request to the page with the form along with the POST data for the form (and with the parsed CAPTCHA).

Do not make a mistake and do not make an extra request to the CAPTCHA!

Download the site from the link targ.zip and deploy it locally. Write a parser that will fill out the form, passing two numbers, then get the site's response and parse the sum of the passed numbers.

swtruzitms