Skip to content

Commit e5e1ccb

Browse files
committed
debugger IFEO, delete/accept friend requests, friend folders
1 parent 26bf960 commit e5e1ccb

13 files changed

Lines changed: 385 additions & 142 deletions

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ Release/
44
KBotExt/x64/
55
KBotExt/Debug/
66
KBotExt/Release/
7-
KBotExt/settings.JSON
7+
KBotExt/config.JSON

KBotExt/Auth.cpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@
55

66
bool Auth::GetRiotClientInfo()
77
{
8-
std::string auth = utils->WstringToString(GetProcessCommandLine("RiotClientUx.exe"));
9-
if (auth.empty())
8+
std::string sAuth = utils->WstringToString(GetProcessCommandLine("RiotClientUx.exe"));
9+
if (sAuth.empty())
1010
{
1111
//MessageBoxA(0, "Client not found", 0, 0);
1212
return 0;
1313
}
1414

1515
std::string appPort = "--app-port=";
16-
size_t nPos = auth.find(appPort);
16+
size_t nPos = sAuth.find(appPort);
1717
if (nPos != std::string::npos)
18-
riotPort = std::stoi(auth.substr(nPos + appPort.size(), 5)); // port is always 5 numbers long
18+
riotPort = std::stoi(sAuth.substr(nPos + appPort.size(), 5)); // port is always 5 numbers long
1919

2020
std::string remotingAuth = "--remoting-auth-token=";
21-
nPos = auth.find(remotingAuth) + strlen(remotingAuth.c_str());
21+
nPos = sAuth.find(remotingAuth) + strlen(remotingAuth.c_str());
2222
if (nPos != std::string::npos)
2323
{
24-
std::string token = "riot:" + auth.substr(nPos, 22); // token is always 22 chars long
24+
std::string token = "riot:" + sAuth.substr(nPos, 22); // token is always 22 chars long
2525
unsigned char m_Test[50];
2626
strncpy((char*)m_Test, token.c_str(), sizeof(m_Test));
2727
riotToken = base64_encode(m_Test, token.size()).c_str();
@@ -44,34 +44,36 @@ void Auth::MakeRiotHeader()
4444
"Connection: keep-alive" + "\n" +
4545
"Authorization: Basic " + riotToken + "\n" +
4646
"Accept: application/json" + "\n" +
47+
"Access-Control-Allow-Credentials: true" + "\n" +
48+
"Access-Control-Allow-Origin: 127.0.0.1" + "\n" +
4749
"Content-Type: application/json" + "\n" +
4850
"Origin: https://127.0.0.1:" + std::to_string(riotPort) + "\n" +
4951
"User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) LeagueOfLegendsClient/11.3.356.7268 (CEF 74) Safari/537.36" + "\n" +
5052
"Referer: https://127.0.0.1:" + std::to_string(riotPort) + "/index.html" + "\n" +
5153
"Accept-Encoding: gzip, deflate, br" + "\n" +
52-
"Accept-Language: en-US,en;q=0.8";
54+
"Accept-Language: en-US,en;q=0.9";
5355
}
5456

5557
bool Auth::GetLeagueClientInfo()
5658
{
5759
// Get client port and auth code from it's command line
58-
std::string auth = utils->WstringToString(GetProcessCommandLine("LeagueClientUx.exe"));
59-
if (auth.empty())
60+
std::string sAuth = utils->WstringToString(GetProcessCommandLine("LeagueClientUx.exe"));
61+
if (sAuth.empty())
6062
{
6163
//MessageBoxA(0, "Client not found", 0, 0);
6264
return 0;
6365
}
6466

6567
std::string appPort = "\"--app-port=";
66-
size_t nPos = auth.find(appPort);
68+
size_t nPos = sAuth.find(appPort);
6769
if (nPos != std::string::npos)
68-
leaguePort = std::stoi(auth.substr(nPos + appPort.size(), 5));
70+
leaguePort = std::stoi(sAuth.substr(nPos + appPort.size(), 5));
6971

7072
std::string remotingAuth = "--remoting-auth-token=";
71-
nPos = auth.find(remotingAuth) + strlen(remotingAuth.c_str());
73+
nPos = sAuth.find(remotingAuth) + strlen(remotingAuth.c_str());
7274
if (nPos != std::string::npos)
7375
{
74-
std::string token = "riot:" + auth.substr(nPos, 22);
76+
std::string token = "riot:" + sAuth.substr(nPos, 22);
7577
unsigned char m_Test[50];
7678
strncpy((char*)m_Test, token.c_str(), sizeof(m_Test));
7779
leagueToken = base64_encode(m_Test, token.size()).c_str();

KBotExt/ChampsTab.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,9 +141,8 @@ class ChampsTab
141141
ImGui::Text("formattedChampionPoints: %s", man.formattedChampionPoints.c_str());
142142
ImGui::Text("formattedMasteryGoal: %s", man.formattedMasteryGoal.c_str());
143143
ImGui::Text("highestGrade: %s", man.highestGrade.c_str());
144-
int64_t t = std::stoll(man.lastPlayTime);
144+
t = std::stoll(man.lastPlayTime);
145145
t /= 1000;
146-
char buffer[50];
147146
strftime(buffer, 100, "%Y-%m-%d %H:%M:%S", localtime(&t));
148147
ImGui::Text("lastPlayTime: %s", buffer);
149148
ImGui::Text("playerId: %s", man.playerId.c_str());

KBotExt/Definitions.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ enum QueueID : const int
6464
TFTRanked = 1100,
6565
TFTTutorial = 1110,
6666
TFTHyperRoll = 1130,
67+
NexusBlitz = 1300,
6768
Tutorial1 = 2000,
6869
Tutorial2 = 2010,
6970
Tutorial3 = 2020,

KBotExt/GameTab.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ class GameTab
4848
if (ImGui::Button("ARURF"))
4949
gameID = ARURF;
5050

51+
if (ImGui::Button("Nexus Blitz"))
52+
gameID = NexusBlitz;
53+
5154
/*if (ImGui::Button("URF"))
5255
gameID = 318;*/
5356

@@ -228,6 +231,7 @@ class GameTab
228231
}
229232
}
230233
ShellExecuteW(0, 0, url.c_str(), 0, 0, SW_SHOW);
234+
result = utils->WstringToString(url);
231235
}
232236
}
233237
}
@@ -352,7 +356,7 @@ class GameTab
352356
}
353357
}
354358
}
355-
359+
std::sort(temp.begin(), temp.end(), [](std::pair<int, std::string > a, std::pair<int, std::string >b) {return a.second < b.second; });
356360
return temp;
357361
}
358362
};

0 commit comments

Comments
 (0)