-
Notifications
You must be signed in to change notification settings - Fork 28
Functions
in this page, i will give you information about functions in GTProxy
char** strsplit(const char* s, const char* delim, size_t* nb)
char* CatchMessage(const char *message, ...)
int findArray(char** array, char* val)
char* arrayJoin(char** array, char* joinVal, char autoRemove)
char* generateHex(int len)
char* generateGID()
char* generateKlv(char* gameVersion, char* hash, char* rid, char* protocol, char isAndroid)
int findStr(char* str, char* toFind)
char isStr(unsigned char* str, unsigned char* toFind, char isEndLine)
char includeStr(const unsigned char* str, const unsigned char* toFind, int len)
int32_t protonHash(const char* data)
function = char** strsplit(const char* s, const char* delim, size_t* nb)
what is this for? this is for split the string
Example
char** split = strsplit("Hello World", " ", 0);
int a = 0;
while(split[a]) printf("%s ", split[a++]);
free(split) // if you are using strsplit, dont forget to free()
Output
Hello World
- Back to Utils Function List
function = char* CatchMessage(const char *message, ...)
What is it for? this is for format to string
so, if you want to join the string using format, and you want to return it to string, you can use CatchMessage()
Example
printf("%s\n", CatchMessage("%s%s", "Hello ", "World"));
Output
Hello World
- Back to Utils Function List
function = int findArray(char** array, char* val)
what is it for? this is for find the array
So, if you want to find find the array with string "blabla" (for example), and it will return integer
Example
char* split = strsplit("Hello World", " ", 0);
printf("%s\n", split[findArray(split, "World")]);
free(split) // if you are using strsplit, dont forget to free()
Output
World
- Back to Utils Function List
function = char* arrayJoin(char** array, char* joinVal, char autoRemove)
What is it for? this is for join the array, into string
if you set autoRemove to 1, if the array is empty, the arrayJoin will not put empty array to the result
Example (autoRemove = 0)
char** split = strsplit("Hello Hi World", " ", 0);
char* result = arrayJoin(split, " ", 0);
printf("%s\n", result);
free(split);
free(result);
Output
Hello Hi World
Example (autoRemove = 1)
char** split = strsplit("Hello Hi World", " ", 0);
split[1] = ""; // "Hi" -> empty
char* result = arrayJoin(split, " ", 1);
printf("%s\n", result);
free(split);
free(result);
Output
Hello World
- Back to Utils Function List
function = char* generateHex(int len)
What is it for? this is for generating hex (2 character 1 len)
Example
char* hex = generateHex(16);
printf("%s\n", hex);
free(hex);
- Back to Utils Function List
Wiki
Introduction
Building the Project
- Codeblocks (Windows Version)
- Manual Build (GCC Windows Version)
- Manual Build (Linux Version)
- Manual Build (Android Version)
Connecting to GTProxy
Configuration File
- Default Configuration File
- usingServerData
- serverDataIP
- manualIP
- manualPort
- manualMeta
- usingNewPacket
- httpsPort
- skipGazette
- isSpoofed
GTProxy Tutorial