Trying to bypass captcha for a game

Discussion in 'PHP' started by ChrisF94, Aug 31, 2014.

  1. #1
    Hi folks, I'm trying to bypass captcha via CURL php, When I try and pass it in the url it isn't working. Any ideas ? The captcha goes 1 - 100 and I tried parsing every combination but it still doesn't work.

    This is the url It passes
    theft=&theft=1&key=aebbd9d1&captcha=12 but my curl doens't work....


    curl_setopt($ch, CURLOPT_URL, 'GAMEWEBSITE');
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
    curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    $answer = curl_exec($ch);
    $dom = str_get_html($answer);
    $tables = $dom->find('input[@name="key"]');
    foreach($tables as $tabless){
    $key = $tabless->getAttribute('value');
    curl_setopt($ch, CURLOPT_POSTFIELDS, "type=3&key=".$key."&captcha=20&train=Work+Out");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $answer = curl_exec($ch);
    if ($answer == true) {
    echo "Boxing done<br>Key ".$key."";
    } else {
    echo "No connection";
    }}


     
    Last edited: Aug 31, 2014
    ChrisF94, Aug 31, 2014 IP
  2. donjajo

    donjajo Active Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    51
    #2
    If you are passing these "theft=&theft=1&key=aebbd9d1&captcha=12" through CURLOPT_URL means you are using GET request type, but here "curl_setopt($ch, CURLOPT_POST, 1);" you are using POST.

    So just pass the URL without the queries like http://example.com/login.php then use these:
    <?php
    $queries = array (
        'theft' => '',
        'theft' => 1,
        'key' => 'aebbd9d1',
        'captcha' => 12
        );
    
    curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $queries ) )
    ?>
    PHP:
    Then add this before curl_exec() to know exactly whats your error:
    if ( isset ( curl_errno( $ch ) ) ) {
        die ( curl_error( $ch ) );
    }
    PHP:
     
    donjajo, Sep 1, 2014 IP
  3. ChrisF94

    ChrisF94 Member

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #3
    The captcha still doesn't work
     
    ChrisF94, Sep 1, 2014 IP
  4. donjajo

    donjajo Active Member

    Messages:
    14
    Likes Received:
    0
    Best Answers:
    1
    Trophy Points:
    51
    #4
    Well, maybe some security was included like when i code i do check if http_referer is same as my domain ;)
     
    donjajo, Sep 1, 2014 IP
  5. Alex2626

    Alex2626 Peon

    Messages:
    1
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #5
    Please try our new CAPTCHA Solving Service at www.hicaptcha.com
    If you register a HiCAPTCHA account right now, we will add 15000 free credits into your account for your testing.
    For further detail , please contact me at or skype: hicaptcha.
     
    Alex2626, Nov 26, 2014 IP