What is KeyCaptcha? And how to bypass it using 2captcha?

CAPTCHAFORUM

Administrator
1637660203395.png


KeyCaptcha is a type of captcha where you have to solve a simple puzzle.


To solve KeyCaptcha with our service you have to:
  1. Find the following KeyCaptcha parameters in page's source code:
    Code:
    s_s_c_user_id
    s_s_c_session_id
    s_s_c_web_server_sign
    s_s_c_web_server_sign2

  2. Submit a HTTP GET or POST request to our API URL: https://2captcha.com/in.php with method set to keycaptcha and provide values found on previous step in your request as values for corresponding request parameters and also full page URL as value for pageurl.
    You can find the full list of parameters in the table below.

    Request URL example:
    Code:
    https://2captcha.com/in.php?key=1abc234de56fab7c89012d34e56fa7b8&s_s_c_user_id=10&s_s_c_session_id=493e52c37c10c2bcdf4a00cbc9ccd1e8&s_s_c_web_server_sign=9006dc725760858e4c0715b835472f22-pz-&s_s_c_web_server_sign2=2ca3abe86d90c6142d5571db98af6714&method=keycaptcha&pageurl=https://www.keycaptcha.ru/demo-magnetic/

  3. If everything is fine server will return the ID of your captcha as plain text, like: OK|2122988149 or as JSON {"status":1,"request":"2122988149"} if json parameter was used.

    Otherwise server will return an error code.

  4. Make a 15-20 seconds timeout then submit a HTTP GET request to our API URL: https://2captcha.com/res.php to get the result.
    The full list of parameters is in the table below.

    If captcha is already solved server will respond in plain text or JSON and return the answer that looks like:
    Code:
    ebdb5a6bf76da6887db60ef2041ab946|9006dc725760858e4c0715b835472f22|http://back10.keycaptcha.com/swfs/ckc/5bded85426de3c57a7529a84bd0d4d08-|493e52c37c10c2bcdf4a00cbc9ccd1e8|1

    If captcha is not solved yet server will return CAPCHA_NOT_READY result. Repeat your request in 5 seconds.
    If something went wrong server will return an error code.

  5. Locate and delete the following block which inclides keycaptcha JavaScript file:
    Code:
    <script language="JavaScript" src="http://backs.keycaptcha.com/swfs/cap.js"></script>
    Locate and delete the div with id="div_for_keycaptcha":
    <div id="div_for_keycaptcha"...>...</div>

    Please note: sometimes content on the page is generated dynamically and you will not see these elements in HTML source or they can differ a little bit.

    In such cases you have to explore the source of the page and find JavaScript code that generates the content. "Inspect" option in Google Chrome can help in that.

  6. Locate the element with id="capcode" and change it's value to the response received from our server.
    Code:
    <input name="capcode" id="capcode" value="1|2|3|4|5" type="hidden">

  7. Click on submit button.

  8. Congratulations, you've passed KeyCaptcha
    All these tasks can be easily automated. Check the example of JavaScript code that can do that right in browser's console.

    Multipart sample form for KeyCaptcha
    Code:
    <form method="post" action="https://2captcha.com/in.php" enctype="multipart/form-data">
    Your API-KEY from 2captcha.com:
    <input  name="key" value="YOUR_APIKEY"><br>
    s_s_c_user_id:<br>
    <input  name="s_s_c_user_id" value=""><br>
    s_s_c_session_id:<br>
    <input  name="s_s_c_session_id" value=""><br>
    s_s_c_web_server_sign:<br>
    <input  name="s_s_c_web_server_sign" value=""><br>
    s_s_c_web_server_sign2:<br>
    <input  name="s_s_c_web_server_sign2" value=""><br>
    pageurl:<br>
    <input  name="pageurl" value=""><br>
    It's keycaptcha:<br>
    <input type="text" value="keycaptcha" name="method"><br>
    <input type="submit" value="UPLOAD AND GET ID">
    </form>

    List of GET/POST request parameters you can find here.
 
Last edited: