Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
scuff update for game mode base 👍
Browse files Browse the repository at this point in the history
  • Loading branch information
kem0x committed Apr 30, 2021
1 parent 500cd78 commit 9f81087
Show file tree
Hide file tree
Showing 18 changed files with 443 additions and 364 deletions.
7 changes: 2 additions & 5 deletions Chronite/Frontend/GUI/GUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ void ImGui::ShowLoader(bool* p_open)
{
try
{
TerminateProcess(hEAC, 1);
TerminateProcess(hFortniteLauncher, 1);
TerminateProcess(hClient, 1);
}
catch (...)
{
Expand Down Expand Up @@ -239,8 +238,6 @@ void ImGui::ShowLoader(bool* p_open)

if (EACisTermed && LauncherisTermed)
{
TerminateProcess(hFortniteLauncher, 0);
TerminateProcess(hEAC, 0);
TerminateProcess(hClient, 0);
TerminateThread(hLauncher, 0);
TerminateThread(hServer, 0);
Expand Down Expand Up @@ -304,7 +301,7 @@ void ImGui::ShowLoader(bool* p_open)
style->Colors[ImGuiCol_SeparatorActive] = ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
style->Colors[ImGuiCol_ResizeGrip] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f);
style->Colors[ImGuiCol_ResizeGripHovered] =
ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
ImVec4(0.56f, 0.56f, 0.58f, 1.00f);
style->Colors[ImGuiCol_ResizeGripActive] = ImVec4(0.06f, 0.05f, 0.07f, 1.00f);
style->Colors[ImGuiCol_PlotLines] = ImVec4(0.40f, 0.39f, 0.38f, 0.63f);
style->Colors[ImGuiCol_PlotLinesHovered] = ImVec4(0.25f, 1.00f, 0.00f, 1.00f);
Expand Down
39 changes: 9 additions & 30 deletions Chronite/Frontend/launcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@


inline HANDLE hLauncher = INVALID_HANDLE_VALUE;
inline HANDLE hFortniteLauncher = INVALID_HANDLE_VALUE;
inline HANDLE hEAC = INVALID_HANDLE_VALUE;
inline HANDLE hClient = INVALID_HANDLE_VALUE;

namespace launcher
Expand Down Expand Up @@ -58,7 +56,7 @@ namespace launcher
console.AddLog("[x] Couldn't find Fortnite directory.");
return;
}

strncpy(path, fnPath.c_str(), fnPath.size() + 1);
settings::config(true);
}
Expand All @@ -68,40 +66,27 @@ namespace launcher
}

std::string szClientFile =
fnPath +
"\\FortniteGame\\Binaries\\Win64\\FortniteClient-Win64-Shipping.exe";
std::string szEACFile =
fnPath +
"\\FortniteGame\\Binaries\\Win64\\FortniteClient-Win64-Shipping_EAC.exe";

std::string szLauncherFile =
fnPath +
"\\FortniteGame\\Binaries\\Win64\\FortniteLauncher.exe";
"\\FortniteGame\\Binaries\\Win64\\FortniteClient-Win64-Shipping.exe";

std::ostringstream oss;
if (exchange.empty())
{
oss <<
" -epicapp=Fortnite -epicenv=Prod -epiclocale=en-us -epicportal -noeac -fromfl=be -fltoken=7ce411021b27b4343a44fdg8 -AUTH_LOGIN="
<< name
<< "@unused.com -AUTH_PASSWORD=unused -AUTH_TYPE=epic";
" -epicapp=Fortnite -epicenv=Prod -epiclocale=en-us -epicportal -noeac -nobe -fromfl=non -AUTH_LOGIN="
<< name
<< "@unused.com -AUTH_PASSWORD=unused -AUTH_TYPE=epic";
}
else
{
oss <<
" -AUTH_LOGIN=unused AUTH_TYPE=exchangecode -epicapp=Fortnite -epicenv=Prod -noeac -fromfl=be -fltoken=7ce411021b27b4343a44fdg8 -epicportal -epiclocale=en-us -AUTH_PASSWORD="
<< exchange;
" -AUTH_LOGIN=unused AUTH_TYPE=exchangecode -epicapp=Fortnite -epicenv=Prod -noeac -nobe -fromfl=non -epicportal -epiclocale=en-us -AUTH_PASSWORD="
<< exchange;
}
std::string s = oss.str();
char* args = new char[s.length() + 1];
std::copy(s.c_str(), s.c_str() + s.length() + 1, args);

hEAC = util::startup(szEACFile.c_str(), args);
util::suspend(hEAC);

hFortniteLauncher = util::startup(szLauncherFile.c_str(), args);
util::suspend(hFortniteLauncher);

hClient = util::startup(szClientFile.c_str(), args);

if (hClient && hClient != INVALID_HANDLE_VALUE)
Expand All @@ -116,26 +101,20 @@ namespace launcher

std::string dllPath = util::GetEXEPath() + "\\Cranium.dll";

if (!ManualMap(hClient, dllPath.c_str()))
/*if (!ManualMap(hClient, dllPath.c_str()))
{
CloseHandle(hClient);
console.AddLog("[x] Injection failed!.");
system("PAUSE");
return;
}
}*/

while (true)
{
if (WaitForSingleObject(hClient, 10) != WAIT_TIMEOUT) break;
}
util::resume(hEAC);
util::resume(hFortniteLauncher);
TerminateProcess(hEAC, 1);
TerminateProcess(hFortniteLauncher, 1);
TerminateProcess(hLauncher, 1);
hEAC = INVALID_HANDLE_VALUE;
hLauncher = INVALID_HANDLE_VALUE;
hFortniteLauncher = INVALID_HANDLE_VALUE;
hClient = INVALID_HANDLE_VALUE;
}
}
Expand Down
1 change: 1 addition & 0 deletions Cranium/Cranium.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
<ClCompile Include="gui\ImGui\imgui_widgets.cpp" />
<ClCompile Include="gui\kiero.cpp" />
<ClCompile Include="pch.cpp" />
<ClCompile Include="veh.cpp" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Resource.rc" />
Expand Down
3 changes: 3 additions & 0 deletions Cranium/Cranium.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
<ClCompile Include="gui\ImGui\imgui.cpp">
<Filter>Rendering\ImGui</Filter>
</ClCompile>
<ClCompile Include="veh.cpp">
<Filter>Hooks</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="framework.h" />
Expand Down
Loading

0 comments on commit 9f81087

Please sign in to comment.