Skip to content

Instantly share code, notes, and snippets.

@cccaldas
Created April 2, 2013 02:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save cccaldas/5289488 to your computer and use it in GitHub Desktop.
Save cccaldas/5289488 to your computer and use it in GitHub Desktop.
<?php
require_once("deathbycaptcha.php");
require_once("request.php");
require_once("lib/curl.php");
require_once("lib/curl_response.php");
$captcha_link = 'http://www.telexfree.com/plugins/securimage/securimage_show.php?sid=0.6981127592734993';
$auth_link = 'http://www.telexfree.com/bo/app/config/Authentic.php';
$ref_link = 'http://www.telexfree.com/index.php';
$curl = new Curl();
$curl->cookie_file = "curl_cookie.txt";
$response = $curl->get($captcha_link);
file_put_contents('captcha.jpg', $response->body);
var_dump($response);
$client = new DeathByCaptcha_SocketClient('stewones', 'stw112358');
// Put the CAPTCHA file name or handler, and desired timeout (in seconds) here:
if ($captcha = $client->decode('captcha.jpg', 30))
$captcha_solved = strtoupper($captcha['text']);
$fields = array(
'pwd_usuario_sis' => urlencode('laila0100'),
'log_usuario_sis' => urlencode('lailamedeiros'),
'radio' => urlencode('D'),
'security_code' => urlencode($captcha_solved)
);
//$curl->header($response->headers);
$response = $curl->post($auth_link, $fields);
var_dump($response); exit();
//file_put_contents('captcha.jpg', file_get_contents($captcha_link));
//$captcha_return =
file_put_contents('captcha.jpg', request_post($captcha_link));
// Put your DBC credentials here.
// Use DeathByCaptcha_HttpClient class if you want to use HTTP API.
$client = new DeathByCaptcha_SocketClient('stewones', 'stw112358');
// Put the CAPTCHA file name or handler, and desired timeout (in seconds) here:
if ($captcha = $client->decode('captcha.jpg', 30))
$captcha_solved = strtoupper($captcha['text']);
//echo $captcha_solved; exit();
var_dump($fields);
$result = request_post($auth_link, $fields);
var_dump($result);
?>
@winkcler
Copy link

winkcler commented May 9, 2013

Eai cara tudo de boa, se possivel posta o codigo do arquivo ("request.php");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment