-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathgeetest_v4.cpp
More file actions
43 lines (34 loc) · 1.02 KB
/
geetest_v4.cpp
File metadata and controls
43 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <cstdio>
#include <filesystem>
#include <iostream>
#include "curl_http.hpp"
#include "api2captcha.hpp"
using namespace std;
int main (int ac, char ** av)
{
if (ac < 2)
{
printf ("Usage: ./geetest_v4 \"API KEY\"\n");
return 0;
}
api2captcha::curl_http_t http;
http.set_verbose (true);
api2captcha::client_t client;
client.set_http_client (&http);
client.set_api_key (av[1]);
std::string method = "geetest_v4";
const char * c_strMethod = method.c_str();
api2captcha::geetest_v4_t cap (c_strMethod);
cap.set_captcha_id("2d9c743cf7d63dbc9db578a608196bcd");
cap.set_pageurl("https://m.avito.ru/all/avtomobili?context=H4sIAAAAAAAA_0q0MrKqLraysFJKK8rPDUhMT1WyLrYyNLVSKs7ILypJLi0pDs9MSU8tAQubWCllJBa7VpQUJQYkFiXmFitZJ1kZWtcCAgAA__-ChIjFRgAAAA&radius=0&presentationType=serp");
try
{
client.solve (cap);
printf ("code '%s'\n", cap.code ().c_str ());
}
catch (std::exception & e)
{
fprintf (stderr, "Failed: %s\n", e.what ());
}
return 0;
}