-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathexample.Siara.cpp
More file actions
38 lines (33 loc) Β· 1.29 KB
/
example.Siara.cpp
File metadata and controls
38 lines (33 loc) Β· 1.29 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
// example.Siara.cpp β type 17: Siara CAPTCHA
#include <iostream>
#include "deathbycaptcha/deathbycaptcha.hpp"
int main() {
const std::string username = "your_username";
const std::string password = "your_password";
dbc::HttpClient client(username, password);
const std::string siara_params = R"({
"proxy": "http://user:password@127.0.0.1:1234",
"proxytype": "HTTP",
"slideurlid": "OXR2LVNvCuXykkZbB8KZIfh162sNT8S2",
"pageurl": "https://www.cybersiara.com/book-a-demo",
"useragent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36"
})";
try {
std::cout << "Balance: " << client.get_balance() << '\n';
dbc::Params params = {
{"type", "17"},
{"siara_params", siara_params}
};
auto result = client.decode(std::nullopt, 120, params);
if (result) {
std::cout << "CAPTCHA " << result->captcha
<< " solved: " << result->text.value_or("") << '\n';
} else {
std::cout << "Failed to solve (timeout)\n";
}
} catch (const dbc::AccessDeniedException& e) {
std::cerr << "Access denied: " << e.what() << '\n';
return 1;
}
return 0;
}