-
Notifications
You must be signed in to change notification settings - Fork 0
/
Method 1.cpp
54 lines (39 loc) · 1.16 KB
/
Method 1.cpp
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
44
45
46
47
48
49
50
51
52
53
// Note: This code is intended for developers. Please remember to give credit when using.
// Discord: dsc.gg/powerproxy
// Discord developer:
// Note: Created on 24/08/2023
// Feel free to use with proper credits :)
// Made with httplib
#include <iostream>
#include <string>
#include <regex>
#include <httplib.h>
#include <jsoncpp/json/json.h>
std::string getHtml(std::string url) {
httplib::Client client(url);
httplib::Response res = client.Get("/");
if (res) {
return res->body;
}
return "";
}
std::string getSiteKey(std::string html) {
return matches[1];
}
std::string solveCaptcha(std::string apiKey, std::string siteKey, std::string url) {
// Captcha
return response;
}
int main() {
std::string html = getHtml("https://www.growtopiagame.com");
std::string siteKey = getSiteKey(html);
std::string response = solveCaptcha("API_KEY", siteKey, "URL");
// Extract tokens make post
httplib::Client client("www.growtopiagame.com");
httplib::Request req("POST", "/player/validate");
auto res = client.send(req);
if (res->status == 200) {
// Handle response
}
return 0;
}