Skip to content

Commit

Permalink
same
Browse files Browse the repository at this point in the history
  • Loading branch information
SpookySec committed Mar 20, 2023
1 parent f64935d commit df83e6a
Show file tree
Hide file tree
Showing 8 changed files with 138 additions and 9 deletions.
8 changes: 6 additions & 2 deletions BSInternal/hdr/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@

namespace Config
{

inline bool spam = false; // Supposed to allow for chat spam, still in testing phase
inline bool full_auto = false; // Makes all guns shoot full auto
inline bool frog_mode = false; // Infinite jumps
inline bool no_damage = false; // Takes no damage
inline bool aim_assist = false; // Gives you aim assist (NOT AIMBOT BUT AIM ASSIST)
inline bool super_speed = false; // Makes you the Flash
inline bool dictatorship = false; // So you a fan of putin?
inline bool swear_bypass = false; // Bypasses the cursing check (aka I can freely say niggas in paris)
inline bool space_bullets = false; // Removes the gravity from all bullets
inline bool fast_firerate = false; // Makes the fire rate EXTRAAA FAST
Expand All @@ -19,12 +19,16 @@ namespace Config
inline bool armor_piercing = false; // Increases bullet wall penetration (seemingly allowing you to shoot through walls)
inline bool explosive_melees = false; // Supposed to spawn explosive bullets but currently not working
inline bool explosive_bullets = false; // My personal favorite, makes all your bullets explosive lol
inline bool* conf[] = {
&spam, &full_auto, &frog_mode, &no_damage, &aim_assist, &super_speed, &swear_bypass,
&space_bullets, &fast_firerate, &school_shooter, &disable_recoil, &instant_reload,
&armor_piercing, &explosive_melees, &explosive_bullets, &dictatorship
}; // PLEASE NEVER LISTEN TO VANY AGAIN (more emphasis on this btw)

namespace Values
{
inline float firerate = 10.f;
inline float speedfactor = 1.f;
inline float movespeed = 4500.f;

}
}
2 changes: 2 additions & 0 deletions BSInternal/hdr/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
#include "il2cpp.h"
#include "gui.h"
#include <vector>
#include <mutex>

namespace Globals
{
namespace Hax
{
inline uintptr_t gameAssembly{ NULL };
inline Multiplayer_Client_ClientPlayer_o* localPlayer{ NULL };
inline std::mutex playerListMutex{};
inline std::vector<Multiplayer_Client_ClientPlayer_o*> playerList{ NULL };

inline tCreateExplosiveBullet oCreateExplosiveBullet{ NULL };
Expand Down
3 changes: 2 additions & 1 deletion BSInternal/hdr/hax.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ void __stdcall hkClientPlayer_Update(Multiplayer_Client_ClientPlayer_o* __this,
inline void(__fastcall* oClientPlayer_TakeDamage)(Multiplayer_Client_ClientPlayer_o*, int32_t, UnityEngine_Vector3_o, UnityEngine_Vector3_o, uint16_t, bool, MethodInfo*);
void __stdcall hkClientPlayer_TakeDamage(Multiplayer_Client_ClientPlayer_o* __this, int32_t damage, UnityEngine_Vector3_o point, UnityEngine_Vector3_o normal, uint16_t fromClient, bool hitMarket, MethodInfo* method);


inline void(__fastcall* oPlayerMovement_Update)(PlayerMovement_o*, MethodInfo*);
void __stdcall hkPlayerMovement_Update(PlayerMovement_o* __this, MethodInfo* method);

inline void(__fastcall* oKickVote_Update)(KickVote_o*, MethodInfo*);
void __stdcall hkKickVote_Update(KickVote_o* __this, MethodInfo* method);

MH_STATUS InitHooks();
62 changes: 62 additions & 0 deletions BSInternal/hdr/il2cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -1150,6 +1150,68 @@ struct PlayerMovement_StaticFields {
struct PlayerMovement_o* Instance;
};

struct KickVote_Fields : UnityEngine_MonoBehaviour_Fields {
struct TMPro_TextMeshProUGUI_o* agreeCountText;
struct TMPro_TextMeshProUGUI_o* disAgreeCountText;
struct UnityEngine_Localization_Components_LocalizeStringEvent_o* kick;
struct UnityEngine_Localization_Components_LocalizeStringEvent_o* vote;
struct UnityEngine_Vector3_o desiredPos;
struct UnityEngine_Vector3_o showPos;
struct UnityEngine_Vector3_o defaultPos;
struct UnityEngine_RectTransform_o* kickMessage;
struct System_String_o* kickPlayerName;
struct System_String_o* votePlayerName;
struct UnityEngine_UI_Button_o* agreeBtn;
struct UnityEngine_UI_Button_o* disAgreeBtn;
};
struct KickVote_VTable {
VirtualInvokeData _0_Equals;
VirtualInvokeData _1_Finalize;
VirtualInvokeData _2_GetHashCode;
VirtualInvokeData _3_ToString;
};
struct KickVote_c {
Il2CppClass_1 _1;
struct KickVote_StaticFields* static_fields;
Il2CppRGCTXData* rgctx_data;
Il2CppClass_2 _2;
KickVote_VTable vtable;
};
struct KickVote_o {
KickVote_c* klass;
void* monitor;
KickVote_Fields fields;
};
struct KickVote_StaticFields {
struct KickVote_o* Instance;
struct VoteKicking_o* VoteKicking;
};

struct __declspec(align(8)) VoteKicking_Fields {
uint16_t PlayerId;
uint16_t FromClient;
uint16_t agreeCount;
uint16_t disAgreeCount;
struct System_Collections_Generic_Dictionary_ushort__bool__o* Players;
};
struct VoteKicking_VTable {
VirtualInvokeData _0_Equals;
VirtualInvokeData _1_Finalize;
VirtualInvokeData _2_GetHashCode;
VirtualInvokeData _3_ToString;
};
struct VoteKicking_c {
Il2CppClass_1 _1;
void* static_fields;
Il2CppRGCTXData* rgctx_data;
Il2CppClass_2 _2;
VoteKicking_VTable vtable;
};
struct VoteKicking_o {
VoteKicking_c* klass;
void* monitor;
VoteKicking_Fields fields;
};

namespace il2cpp {
inline std::string to_string(System_String_o* str)
Expand Down
5 changes: 5 additions & 0 deletions BSInternal/hdr/offsets.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,9 @@ namespace Offsets {
{
inline uintptr_t Update = 0x3a2a20;
}

namespace VoteKicking
{
inline uintptr_t Update = 0x36aed0;
}
}
21 changes: 15 additions & 6 deletions BSInternal/src/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#include "../hdr/config.h"
#include "../hdr/globals.h"

#pragma comment(lib, "d3d11.lib")

void HackThread(LPVOID hModule)
{
Globals::Hax::gameAssembly = (uintptr_t)GetModuleHandle("GameAssembly.dll");
Expand All @@ -25,7 +23,7 @@ void HackThread(LPVOID hModule)
MH_STATUS hax_status;
bool kiero_status = false;

fp = CreateConsole();
//fp = CreateConsole();

printf("[+] DLL injected!\n");

Expand All @@ -45,14 +43,22 @@ void HackThread(LPVOID hModule)
catch (...) {
printf("FAILED\n");
}


} while (!kiero_status);

printf("[+] Kiero hooks created successfully!\n");
InitHooks();
printf("[+] Cheat hooks created successfully!\n");

FreeConsole();
fclose(fp);
//FreeConsole();
//fclose(fp);
while (!GetAsyncKeyState(VK_END))
Sleep(200);

kiero::shutdown();
MH_DisableHook(MH_ALL_HOOKS);
FreeLibraryAndExitThread(static_cast<HMODULE>(hModule), EXIT_SUCCESS);
}

BOOL APIENTRY DllMain(HMODULE hModule,
Expand All @@ -63,7 +69,10 @@ BOOL APIENTRY DllMain(HMODULE hModule,
if (ul_reason_for_call == DLL_PROCESS_ATTACH)
{
DisableThreadLibraryCalls(hModule);
CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)HackThread, hModule, NULL, NULL);
const HANDLE hThread = CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)HackThread, hModule, NULL, NULL);

if (hThread)
CloseHandle(hThread); // so?
}

return TRUE;
Expand Down
10 changes: 10 additions & 0 deletions BSInternal/src/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ void Menu(bool render)
ImGui::Checkbox("Explosive bullets", &Config::explosive_bullets);
ImGui::Checkbox("Swearing bypass", &Config::swear_bypass);
ImGui::Checkbox("Space bullets", &Config::space_bullets);
ImGui::Checkbox("Dictatorship", &Config::dictatorship);
ImGui::Checkbox("Full auto (beta)", &Config::full_auto);
ImGui::Checkbox("Explosive melees (beta)", &Config::explosive_melees);
ImGui::Checkbox("School shooter (beta)", &Config::school_shooter);
Expand All @@ -120,5 +121,14 @@ void Menu(bool render)
Config::Values::movespeed = 4500.f;
}

// EXCLUSIVE LOADING ANIMATIONS NEVER SEEN BEFORE!!!
if (ImGui::Button("DISABLE ALL", ImVec2(ImGui::GetWindowContentRegionWidth()*.999, 20)))
{
for (bool* opt : Config::conf)
{
*opt = false;
}
}

ImGui::End();
}
36 changes: 36 additions & 0 deletions BSInternal/src/hax.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <MinHook.h>
#include <iostream>
#include <mutex>
#include "../hdr/offsets.h"
#include "../hdr/hax.h"
#include "../hdr/config.h"
Expand Down Expand Up @@ -156,6 +157,26 @@ void __stdcall hkClientPlayer_Update(Multiplayer_Client_ClientPlayer_o* __this,
#ifdef DEBUG
printf("[+] ClientPlayer.Update() called!\n");
#endif
if (!__this || !__this->fields.m_CachedPtr)
return oClientPlayer_Update(__this, method);

bool in_list = false;
for (auto client : Globals::Hax::playerList)
if (client == __this)
in_list = true;

if (!in_list)
{

if (__this->fields._IsLocal_k__BackingField)
Globals::Hax::localPlayer = __this;
else
{
Globals::Hax::playerListMutex.lock();
Globals::Hax::playerList.push_back(__this);
Globals::Hax::playerListMutex.unlock();
}
}

// Nothing here yet
return oClientPlayer_Update(__this, method);
Expand Down Expand Up @@ -205,6 +226,18 @@ void __stdcall hkClientPlayer_TakeDamage(Multiplayer_Client_ClientPlayer_o* __th
return oClientPlayer_TakeDamage(__this, damage, point, normal, fromClient, hitMarket, method);
}

void __stdcall hkKickVote_Update(KickVote_o* __this, MethodInfo* method)
{
if (Config::dictatorship)
{
if (__this->klass->static_fields->VoteKicking)
__this->klass->static_fields->VoteKicking->fields.disAgreeCount = 69;


//__this->klass->static_fields->VoteKicking = NULL;
}
}

MH_STATUS InitHooks()
{
std::vector<MH_STATUS> hooks_status{};
Expand Down Expand Up @@ -251,6 +284,9 @@ MH_STATUS InitHooks()
// TAKE DAMAGE
hooks_status.push_back(MH_CreateHook(reinterpret_cast<LPVOID*>(Globals::Hax::gameAssembly + Offsets::ClientPlayer::TakeDamage), &hkClientPlayer_TakeDamage, (LPVOID*)&oClientPlayer_TakeDamage));
hooks_status.push_back(MH_EnableHook(reinterpret_cast<LPVOID*>(Globals::Hax::gameAssembly + Offsets::ClientPlayer::TakeDamage)));

hooks_status.push_back(MH_CreateHook(reinterpret_cast<LPVOID*>(Globals::Hax::gameAssembly + Offsets::VoteKicking::Update), &hkKickVote_Update, (LPVOID*)&oKickVote_Update));
hooks_status.push_back(MH_EnableHook(reinterpret_cast<LPVOID*>(Globals::Hax::gameAssembly + Offsets::VoteKicking::Update)));

for (auto status : hooks_status)
{
Expand Down

0 comments on commit df83e6a

Please sign in to comment.