Разгадывание капчи

LEXAlForpostl

Мой дом здесь!
Регистрация
21 Май 2008
Сообщения
766
Реакции
228
Здравствуйте.
Помогите, пожалуйста, написать скрипт авторизации для сайта
Для работы можно использовать сервис anitcaptcha или rucaptcha.
Сам POST запрос не проблема отправить. С капчей загвоздка.

Буду Вам безмерно благодарен.
 
Класс антигейт:
Для просмотра ссылки Войди или Зарегистрируйся

Так же надо Для просмотра ссылки Войди или Зарегистрируйся

PHP:
$request = new Request('https://isocks.pro');
$request->session('isocks');
$request->send();

// получаем адрес картинки из $request->response в $image_src

$data = array(
    'username' => 'логин',
    'pass' => 'пароль',
    'captcha' => Antigate::read($image_src)
);

$request = new Request('https://isocks.pro/ajax/signin');
$request->session('isocks');
$request->post($data);
$request->send();

echo $request->dump();

Настрой функцию session! На гитхабе в описании класса есть это
 
Класс антигейт:
Для просмотра ссылки Войди или Зарегистрируйся

Так же надо Для просмотра ссылки Войди или Зарегистрируйся

PHP:
$request = new Request('https://isocks.pro');
$request->session('isocks');
$request->send();

// получаем адрес картинки из $request->response в $image_src

$data = array(
    'username' => 'логин',
    'pass' => 'пароль',
    'captcha' => Antigate::read($image_src)
);

$request = new Request('https://isocks.pro/ajax/signin');
$request->session('isocks');
$request->post($data);
$request->send();

echo $request->dump();

Настрой функцию session! На гитхабе в описании класса есть это
К сожалению, вот такой еррор:
Response:
{"errorId":22,"errorCode":"ERROR_TASK_ABSENT","errorDescription":"Task property is empty or not set. Please refer to API v2 documentation."}

URL: Для просмотра ссылки Войди или Зарегистрируйся
Options:
Option CURLOPT_URL setted to Для просмотра ссылки Войди или Зарегистрируйся
Option CURLOPT_RETURNTRANSFER setted to 1
Option CURLOPT_FOLLOWLOCATION setted to 1
Option CURLOPT_USERAGENT setted to Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36
Option CURLOPT_HEADERFUNCTION setted to (callback) this::set_headers()
Option CURLOPT_POSTFIELDS setted to {"clientKey":"здесь указан мой кей","task":{"type":"ImageToTextTask","body":"\/9j\/4AAQSkZJRgABAQAAAQABAAD\/\/gA7Q1JFQVRPUjogZ2QtanBlZyB2MS4wICh1c2luZyBJSkcgSlBFRyB2ODApLCBxdWFsaXR5ID0gODAK\/9sAQwAGBAUGBQQGBgUGBwcGCAoQCgoJCQoUDg8MEBcUGBgXFBYWGh0lHxobIxwWFiAsICMmJykqKRkfLTAtKDAlKCko\/9sAQwEHBwcKCAoTCgoTKBoWGigoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgo\/8AAEQgASAEsAwEiAAIRAQMRAf\/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC\/\/EALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29\/j5+v\/EAB8BAAMBAQEBAQEBAQEAAAAAAAABAgMEBQYHCAkKC\/\/EALURAAIBAgQEAwQHBQQEAAECdwABAgMRBAUhMQYSQVEHYXETIjKBCBRCkaGxwQkjM1LwFWJy0QoWJDThJfEXGBkaJicoKSo1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoKDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uLj5OXm5+jp6vLz9PX29\/j5+v\/aAAwDAQACEQMRAD8A+qaKKKACiiigAooJABJIAHJJrlk+IHheTXYdHh1eCa+lfy1WIF13HgLvA25z2zVwpznflTdiZSjHdnU0UUVBQUUUUAFFFFABRRUNtd2115n2W4hm8ttr+W4bafQ46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NK0U7JXe7tv6rYzeEg7XvZHhmjfBPVtPupbqHxN9hu8Zjmso2XHPIIBXg+x\/A1s+H\/g3bLfajd+LL8azNeIVzsMZViQTJuzndx+pznNetUVE8yxM73lv2ST+\/cqOFpLoeT6v8GYL2xuLWHxLrKxySLKiXL+cisBjJX5dxxwDwRgdaoaR8Djp4cp4qv42Zg2bWLyenTPznJr2eiksxxKjy82nov8geFpN3t+f+ZFaRNBbRRPNJOyKFMsuNz47nAAz9AKloorhep0BRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAFFFFABRRRQAUUUUAf\/Z","phrase":false,"case":false,"numeric":false,"math":"0","minLength":"0","maxLength":"0"}}
 
Последнее редактирование:
К сожалению, вот такой еррор:
Response:
{"errorId":22,"errorCode":"ERROR_TASK_ABSENT","errorDescription":"Task property is empty or not set. Please refer to API v2 documentation."}

Не знаю, что у тебя не так. У меня почему то курл не получал саму картинку, хотя я CURLOPT_BINARYTRANSFER ставил. Теперь там file_get_contents просто. Ошибка была, но в другом месте, так как я не тестил раньше класс :)

Обнови: Для просмотра ссылки Войди или Зарегистрируйся
+ чуть чуть изменил Для просмотра ссылки Войди или Зарегистрируйся

URL: Для просмотра ссылки Войди или Зарегистрируйся
Options:
Option CURLOPT_URL setted to Для просмотра ссылки Войди или Зарегистрируйся
Option CURLOPT_RETURNTRANSFER setted to 1
Option CURLOPT_FOLLOWLOCATION setted to (bool)true
Option CURLOPT_USERAGENT setted to Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36
Option CURLOPT_HEADERFUNCTION setted to (callback) this::set_headers()
Option CURLOPT_POST setted to (bool)true
Option CURLOPT_POSTFIELDS setted to {"clientKey":"","task":{"type":"ImageToTextTask","body":"\/9j\/4AAQSkZ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JBwC2rcMH+PaOxSTlIIORFLaT\/p529JziJ2dvCruzqV9p2zaUoVvznOck5zFj7M0mYsuyalbUlXqrNrnt+6oTL299vckJwk92MEjzJiOs7uVMf8AUmlqYm4LKmWnGv6uuVfQ8gKG8MhQKSR1xkqx+4upodVnq7o\/ZFQm3g\/MP0aWLrgVuyrYAef6iEJzgE07qMwuYqNTrk2+s5U47NlSj+yYlXRjh+tvRD+p\/wC2Jmfmfj0oSRNvlYaCc\/SM4GcjP\/iIjSWYIIIAggggCCCCAIIIIAjBfdGcYL7os9S+GqvqPrBAr6j6wRtyMkdR6w8hklQHeIz7Y\/d\/MenlMrLg6ghr2x+7+YO2P3RnSrmHUENe2P3fzB2x+6GlMw6ghr2x+7+YO2P3Q0pmHUENe2P3fzB2x+6GlMw6ghr2x+7+YUb3K5qVgesS8cF5SFgMnAhRLRPXlGIUE9CI+9p+UYuXK\/r8KpQlPQRlCHaflB2n5RnWs7l4IQ7T8oO0\/KJrTeF4Ib9p+UHaflDU3hxBDftPyg7T8oam8OkjvjKEAsYHzD3j7vH3D3jOHolkhaCEd4+4e8G8fcPeGF2LQQjvH3D3g3jxHvDBsWghHtPMR97T8h7xMU2hWCEu0\/Ie8HafkPeGKbQrBCXafkPeDtPyHvDFNoVjByMe0\/Ie8fCsHvEWQthBX1H1ggV9R9YI05v\/2Q=="}}
Option CURLOPT_HTTPHEADER setted to
Array
(
[0] => Content-Type: application/json; charset=utf-8
[1] => Accept: application/json
)




Info:
Array
(
=> Для просмотра ссылки Войди или Зарегистрируйся [content_type] => application/json; charset=utf-8 [http_code] => 200 [header_size] => 425 [request_size] => 288 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.459045 [namelookup_time] => 0.00066 [connect_time] => 0.14639 [pretransfer_time] => 0.146447 [size_upload] => 6255 [size_download] => 32 [speed_download] => 69 [speed_upload] => 13626 [download_content_length] => -1 [upload_content_length] => 6255 [starttransfer_time] => 0.29208 [redirect_time] => 0 [redirect_url] => [primary_ip] => 209.212.146.167 [certinfo] => Array ( ) [primary_port] => 80 [local_ip] => 87.236.20.117 [local_port] => 47172 ) Headers: HTTP/1.1 100 Continue HTTP/1.1 200 OK Server: nginx/1.12.1 Date: Sun, 01 Oct 2017 18:06:10 GMT Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: PHP/5.4.45 Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control Response: {"errorId":0,"taskId":135705043}
 
Последнее редактирование:
Если хочешь - можно сделать локально, через XEvil

RMkA4g3aS9mlyJXybbO2eg.png


Видео как сделать


XEvil DEMO - Для просмотра ссылки Войди или Зарегистрируйся

P.S.Я правда на полной проверял.
 
Не знаю, что у тебя не так. У меня почему то курл не получал саму картинку, хотя я CURLOPT_BINARYTRANSFER ставил. Теперь там file_get_contents просто. Ошибка была, но в другом месте, так как я не тестил раньше класс :)

Обнови: Для просмотра ссылки Войди или Зарегистрируйся
+ чуть чуть изменил Для просмотра ссылки Войди или Зарегистрируйся

URL: Для просмотра ссылки Войди или Зарегистрируйся
Options:
Option CURLOPT_URL setted to Для просмотра ссылки Войди или Зарегистрируйся
Option CURLOPT_RETURNTRANSFER setted to 1
Option CURLOPT_FOLLOWLOCATION setted to (bool)true
Option CURLOPT_USERAGENT setted to Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36
Option CURLOPT_HEADERFUNCTION setted to (callback) this::set_headers()
Option CURLOPT_POST setted to (bool)true
Option CURLOPT_POSTFIELDS setted to {"clientKey":"","task":{"type":"ImageToTextTask","body":"\/9j\/4AAQSkZJRgABAQEASABIAAD\/2wBDAAQDAwQDAwQEAwQFBAQFBgoHBgYGBg0JCggKDw0QEA8NDw4RExgUERIXEg4PFRwVFxkZGxsbEBQdHx0aHxgaGxr\/2wBDAQ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mWnGv6uuVfQ8gKG8MhQKSR1xkqx+4upodVnq7o\/ZFQm3g\/MP0aWLrgVuyrYAef6iEJzgE07qMwuYqNTrk2+s5U47NlSj+yYlXRjh+tvRD+p\/wC2Jmfmfj0oSRNvlYaCc\/SM4GcjP\/iIjSWYIIIAggggCCCCAIIIIAjBfdGcYL7os9S+GqvqPrBAr6j6wRtyMkdR6w8hklQHeIz7Y\/d\/MenlMrLg6ghr2x+7+YO2P3RnSrmHUENe2P3fzB2x+6GlMw6ghr2x+7+YO2P3Q0pmHUENe2P3fzB2x+6GlMw6ghr2x+7+YUb3K5qVgesS8cF5SFgMnAhRLRPXlGIUE9CI+9p+UYuXK\/r8KpQlPQRlCHaflB2n5RnWs7l4IQ7T8oO0\/KJrTeF4Ib9p+UHaflDU3hxBDftPyg7T8oam8OkjvjKEAsYHzD3j7vH3D3jOHolkhaCEd4+4e8G8fcPeGF2LQQjvH3D3g3jxHvDBsWghHtPMR97T8h7xMU2hWCEu0\/Ie8HafkPeGKbQrBCXafkPeDtPyHvDFNoVjByMe0\/Ie8fCsHvEWQthBX1H1ggV9R9YI05v\/2Q=="}}
Option CURLOPT_HTTPHEADER setted to
Array
(
[0] => Content-Type: application/json; charset=utf-8
[1] => Accept: application/json
)




Info:
Array
(
=> Для просмотра ссылки Войди или Зарегистрируйся [content_type] => application/json; charset=utf-8 [http_code] => 200 [header_size] => 425 [request_size] => 288 [filetime] => -1 [ssl_verify_result] => 0 [redirect_count] => 0 [total_time] => 0.459045 [namelookup_time] => 0.00066 [connect_time] => 0.14639 [pretransfer_time] => 0.146447 [size_upload] => 6255 [size_download] => 32 [speed_download] => 69 [speed_upload] => 13626 [download_content_length] => -1 [upload_content_length] => 6255 [starttransfer_time] => 0.29208 [redirect_time] => 0 [redirect_url] => [primary_ip] => 209.212.146.167 [certinfo] => Array ( ) [primary_port] => 80 [local_ip] => 87.236.20.117 [local_port] => 47172 ) Headers: HTTP/1.1 100 Continue HTTP/1.1 200 OK Server: nginx/1.12.1 Date: Sun, 01 Oct 2017 18:06:10 GMT Content-Type: application/json; charset=utf-8 Transfer-Encoding: chunked Connection: keep-alive X-Powered-By: PHP/5.4.45 Access-Control-Allow-Origin: * Access-Control-Allow-Headers: Overwrite, Destination, Content-Type, Depth, User-Agent, X-File-Size, X-Requested-With, If-Modified-Since, X-File-Name, Cache-Control Response: {"errorId":0,"taskId":135705043}
Можно Ваш код для теста. Спасибо.
 
Назад
Сверху