Начинающий
- Статус
- Оффлайн
- Регистрация
- 6 Мар 2023
- Сообщения
- 18
- Реакции
- 0
Всем привет, меня зовут Артём и я собираюсь сделать свой чит на кс2. Но проблема в том что я новичёк в C++ я сделал меню и пару кнопок
У меня есть вроде рабочая функция бхоп, но когда я пытаюсь протестить её ничего не происходит может кто то поможет с разроботкой или подчкажет что можно сделать?
У меня есть догадки почему не работает чит (возможно я незнаю как сделать так что бы он функционировал с игрой) но не точно.
Буду блогадарен если поможете!
меню делал на ImGui DirectX 11 Kiero Hook
У меня есть вроде рабочая функция бхоп, но когда я пытаюсь протестить её ничего не происходит может кто то поможет с разроботкой или подчкажет что можно сделать?
У меня есть догадки почему не работает чит (возможно я незнаю как сделать так что бы он функционировал с игрой) но не точно.
Буду блогадарен если поможете!
main.cpp:
#include "includes.h"
#include "bytes.hpp"
#include "hashes.hpp"
#include "gui.hpp"
#include "bhop.h"
#include <thread>
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
Present oPresent;
HWND window = NULL;
WNDPROC oWndProc;
ID3D11Device* pDevice = NULL;
ID3D11DeviceContext* pContext = NULL;
ID3D11RenderTargetView* mainRenderTargetView;
// ���������� ��� BHop
static bool bhopEnabled = false;
void InitImGui()
{
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.Fonts->AddFontFromMemoryTTF(museo500_binary, sizeof museo500_binary, 14);
static const ImWchar icon_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
ImFontConfig icons_config;
icons_config.MergeMode = true;
icons_config.PixelSnapH = true;
io.Fonts->AddFontFromMemoryTTF(&font_awesome_binary, sizeof font_awesome_binary, 13, &icons_config, icon_ranges);
io.Fonts->AddFontFromMemoryTTF(museo900_binary, sizeof museo900_binary, 28);
io.ConfigFlags = ImGuiConfigFlags_NoMouseCursorChange;
ImGui_ImplWin32_Init(window);
ImGui_ImplDX11_Init(pDevice, pContext);
}
LRESULT __stdcall WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
if (true && ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam))
return true;
return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
}
bool init = false;
HRESULT __stdcall hkPresent(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags)
{
if (!init)
{
if (SUCCEEDED(pSwapChain->GetDevice(__uuidof(ID3D11Device), (void**)&pDevice)))
{
pDevice->GetImmediateContext(&pContext);
DXGI_SWAP_CHAIN_DESC sd;
pSwapChain->GetDesc(&sd);
window = sd.OutputWindow;
ID3D11Texture2D* pBackBuffer;
pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&pBackBuffer);
pDevice->CreateRenderTargetView(pBackBuffer, NULL, &mainRenderTargetView);
pBackBuffer->Release();
oWndProc = (WNDPROC)SetWindowLongPtr(window, GWLP_WNDPROC, (LONG_PTR)WndProc);
InitImGui();
init = true;
}
else
return oPresent(pSwapChain, SyncInterval, Flags);
}
static bool menu = true;
ImGui_ImplDX11_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::StyleColorsDark();
ImGui::NewFrame();
// ��������������� ����
static bool showDiagnostics = true;
if (showDiagnostics) {
ImGui::Begin("BHop Diagnostics", &showDiagnostics, ImGuiWindowFlags_AlwaysAutoResize);
bool gameConnected = BHop::IsGameConnected();
ImGui::TextColored(gameConnected ? ImVec4(0, 1, 0, 1) : ImVec4(1, 0, 0, 1),
"Game Connected: %s", gameConnected ? "YES" : "NO");
ImGui::Text("BHop Status: %s", BHop::IsEnabled() ? "ENABLED" : "DISABLED");
uintptr_t client = Memory::GetClient();
ImGui::Text("Client.dll: 0x%p", (void*)client);
if (client) {
uintptr_t localPlayer = Memory::Read<uintptr_t>(client + Offsets::dwLocalPlayerPawn);
ImGui::Text("Local Player: 0x%p", (void*)localPlayer);
if (localPlayer) {
int health = Memory::Read<int>(localPlayer + Offsets::m_iHealth);
int flags = Memory::Read<int>(localPlayer + Offsets::m_fFlags);
ImGui::Text("Health: %d", health);
ImGui::Text("Flags: %d (0x%X)", flags, flags);
// ��������� ������ ������
ImGui::Text("On Ground: %s", (flags == 257 || flags == 261 || flags == 263) ? "YES" : "NO");
ImGui::Text("In Air: %s", (flags == 256 || flags == 260 || flags == 262) ? "YES" : "NO");
ImGui::Text("Bit Check: %s", (flags & (1 << 0)) ? "YES" : "NO");
ImGui::Text("Space Pressed: %s", (GetAsyncKeyState(VK_SPACE) & 0x8000) ? "YES" : "NO");
// ���������� ��� ��������� ���������
ImGui::Separator();
ImGui::Text("Flag Analysis:");
ImGui::Text("256 (0x100) = In Air");
ImGui::Text("257 (0x101) = On Ground");
ImGui::Text("260 (0x104) = In Air + Ducking");
ImGui::Text("261 (0x105) = On Ground + Ducking");
ImGui::Text("262 (0x106) = In Air + Moving");
ImGui::Text("263 (0x107) = On Ground + Moving");
}
}
ImGui::End();
}
ImGui::SetNextWindowSize(ImVec2(700, 500));
// ������� ������� ��� ����
if (GetAsyncKeyState(VK_INSERT) & 1)
{
menu = !menu;
}
// ������� ������� ��� BHop
if (GetAsyncKeyState(VK_F2) & 1)
{
bhopEnabled = !bhopEnabled;
BHop::SetEnabled(bhopEnabled);
}
if (menu)
{
ImGui::Begin("ImGui Window", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
ImGuiIO& io = ImGui::GetIO();
auto window = GetCurrentWindow();
auto draw = window->DrawList;
auto pos = window->Pos;
auto size = window->Size;
auto style = GetStyle();
gui.m_anim = 1.0f;
ImVec2 adjusted_pos = ImVec2(
pos.x + (170 / 2 - io.Fonts->Fonts[1]->CalcTextSizeA(io.Fonts->Fonts[1]->FontSize, FLT_MAX, 0, "Sciver").x / 2 + 1),
pos.y + 20
);
draw->AddText(io.Fonts->Fonts[1], io.Fonts->Fonts[1]->FontSize, adjusted_pos, gui.accent_color.to_im_color(), "Sciver");
adjusted_pos = ImVec2(
pos.x + (170 / 2 - io.Fonts->Fonts[1]->CalcTextSizeA(io.Fonts->Fonts[1]->FontSize, FLT_MAX, 0, "Sciver").x / 2),
pos.y + 20
);
draw->AddText(io.Fonts->Fonts[1], io.Fonts->Fonts[1]->FontSize, adjusted_pos, GetColorU32(ImGuiCol_Text), "Sciver");
SetCursorPos(ImVec2(10, 70));
ImGui::BeginChild("##tabs", ImVec2(150, size.y - 120));
gui.group_title("TapTap");
if (gui.tab(ICON_FA_CROSSHAIRS, "Rage", gui.m_tab == 0) && gui.m_tab != 0)
gui.m_tab = 0, gui.m_anim = 1.f;
if (gui.tab(ICON_FA_MOUSE, "Legit", gui.m_tab == 1) && gui.m_tab != 1)
gui.m_tab = 1, gui.m_anim = 1.f;
Spacing(), Spacing(), Spacing();
gui.group_title("Anti-Aim");
if (gui.tab(ICON_FA_USER_ALT, "Nepopadayki", gui.m_tab == 2) && gui.m_tab != 2)
gui.m_tab = 2, gui.m_anim = 1.f;
Spacing(), Spacing(), Spacing();
gui.group_title("Common");
if (gui.tab(ICON_FA_SUN, "Visuals", gui.m_tab == 3) && gui.m_tab != 3)
gui.m_tab = 3, gui.m_anim = 1.f;
if (gui.tab(ICON_FA_PALLET, "Skinchanger", gui.m_tab == 4) && gui.m_tab != 4)
gui.m_tab = 4, gui.m_anim = 1.f;
if (gui.tab(ICON_FA_HAMMER, "Miscellaneous", gui.m_tab == 5) && gui.m_tab != 5)
gui.m_tab = 5, gui.m_anim = 1.f;
Spacing(), Spacing(), Spacing();
gui.group_title("Presets");
if (gui.tab(ICON_FA_SUNSET, "Configs", gui.m_tab == 6) && gui.m_tab != 6)
gui.m_tab = 6, gui.m_anim = 1.f;
ImGui::EndChild();
static bool test = false;
static bool esp = true;
static bool bools[50]{};
static bool silent[50]{};
static bool afire[50]{};
static bool dshot[50]{};
static bool dpeek[50]{};
static bool qpeek[50]{};
static bool pwall[50]{};
static bool mdmgov[50]{};
static int ints[50]{};
static int ht[50]{};
static int ps[50]{};
static int dmg[50]{};
static int mindmg[50]{};
static bool dt[50]{};
static bool hs[50]{};
static int combo = 0;
static int weaponsss = 0;
static char buf[64];
SetCursorPos(ImVec2(190, 20));
PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
SetCursorPos(ImVec2(175, 20));
ImGui::BeginChild("##subtabs", ImVec2(500, 500));
// ������� Miscellaneous (��� ����� BHop)
if (gui.m_tab == 5)
{
gui.group_box("MOVEMENT", ImVec2(245, 200));
{
// ������ ��� ���������/���������� BHop
if (Checkbox("Bunny Hop", &bhopEnabled))
{
BHop::SetEnabled(bhopEnabled);
}
Separator();
TextColored(ImVec4(1, 1, 0, 1), "Hotkey: F2");
Separator();
TextColored(ImVec4(0, 1, 1, 1), "Status: %s", BHop::IsEnabled() ? "ENABLED" : "DISABLED");
Separator();
TextColored(ImVec4(1, 0.5f, 0, 1), "Hold SPACE in game");
Separator();
// ������ ����� ��������
Checkbox("Auto Strafe", &bools[10]);
Separator();
Checkbox("Speed Boost", &bools[11]);
}
gui.end_group_box();
ImGui::SameLine(0.0f, 10.0f);
gui.group_box("OTHER", ImVec2(245, 200));
{
Checkbox("Third Person", &bools[12]);
Separator();
Checkbox("Fake Lag", &bools[13]);
Separator();
Checkbox("Clantag Changer", &bools[14]);
}
gui.end_group_box();
}
else if (gui.m_tab == 0) // Rage tab
{
gui.group_box("MAIN", ImVec2(245, 200));
{
Checkbox("Enabled", &bools[0]);
Separator();
Checkbox("Silent Aim", &silent[0]);
Separator();
Checkbox("Automatic Fire", &afire[0]);
Separator();
Checkbox("Penetrate Walls", &pwall[0]);
}
gui.end_group_box();
ImGui::SameLine(0.0f, 10.0f);
gui.group_box("Other", ImVec2(245, 200));
{
Checkbox("Delay Shot", &dshot[0]);
Separator();
Checkbox("Duck Peek Assist", &dpeek[0]);
Separator();
Checkbox("Quick Peek Assist", &qpeek[0]);
Separator();
Checkbox("DoubleTap", &dt[0]);
}
gui.end_group_box();
}
else if (gui.m_tab == 1) // Legit tab
{
gui.group_box("Aim", ImVec2(245, 200));
{
Checkbox("Aim-bot", &bools[0]);
Separator();
Checkbox("Silent", &silent[0]);
Separator();
Checkbox("", &afire[0]);
Separator();
Checkbox("", &pwall[0]);
}
gui.end_group_box();
ImGui::SameLine(0.0f, 10.0f);
gui.group_box("Other", ImVec2(245, 200));
{
Checkbox("Delay Shot", &dshot[0]);
Separator();
Checkbox("Duck Peek Assist", &dpeek[0]);
Separator();
Checkbox("Quick Peek Assist", &qpeek[0]);
Separator();
Checkbox("DoubleTap", &dt[0]);
}
gui.end_group_box();
}
ImGui::EndChild();
ImGui::PopStyleVar();
ImGui::End();
}
ImGui::Render();
pContext->OMSetRenderTargets(1, &mainRenderTargetView, NULL);
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
return oPresent(pSwapChain, SyncInterval, Flags);
}
DWORD WINAPI MainThread(LPVOID lpReserved)
{
bool init_hook = false;
do
{
if (kiero::init(kiero::RenderType::D3D11) == kiero::Status::Success)
{
kiero::bind(8, (void**)&oPresent, hkPresent);
init_hook = true;
}
} while (!init_hook);
return TRUE;
}
BOOL WINAPI DllMain(HMODULE hMod, DWORD dwReason, LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hMod);
CreateThread(nullptr, 0, MainThread, hMod, 0, nullptr);
break;
case DLL_PROCESS_DETACH:
kiero::shutdown();
BHop::Stop(); // ������������� BHop ��� ��������
break;
}
return TRUE;
}
gui.cpp:
#include "includes.h"
#include "bytes.hpp"
#include "hashes.hpp"
#include "gui.hpp"
#include "bhop.h"
#include <thread>
extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
Present oPresent;
HWND window = NULL;
WNDPROC oWndProc;
ID3D11Device* pDevice = NULL;
ID3D11DeviceContext* pContext = NULL;
ID3D11RenderTargetView* mainRenderTargetView;
// ���������� ��� BHop
static bool bhopEnabled = false;
void InitImGui()
{
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
io.Fonts->AddFontFromMemoryTTF(museo500_binary, sizeof museo500_binary, 14);
static const ImWchar icon_ranges[] = { ICON_MIN_FA, ICON_MAX_FA, 0 };
ImFontConfig icons_config;
icons_config.MergeMode = true;
icons_config.PixelSnapH = true;
io.Fonts->AddFontFromMemoryTTF(&font_awesome_binary, sizeof font_awesome_binary, 13, &icons_config, icon_ranges);
io.Fonts->AddFontFromMemoryTTF(museo900_binary, sizeof museo900_binary, 28);
io.ConfigFlags = ImGuiConfigFlags_NoMouseCursorChange;
ImGui_ImplWin32_Init(window);
ImGui_ImplDX11_Init(pDevice, pContext);
}
LRESULT __stdcall WndProc(const HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
if (true && ImGui_ImplWin32_WndProcHandler(hWnd, uMsg, wParam, lParam))
return true;
return CallWindowProc(oWndProc, hWnd, uMsg, wParam, lParam);
}
bool init = false;
HRESULT __stdcall hkPresent(IDXGISwapChain* pSwapChain, UINT SyncInterval, UINT Flags)
{
if (!init)
{
if (SUCCEEDED(pSwapChain->GetDevice(__uuidof(ID3D11Device), (void**)&pDevice)))
{
pDevice->GetImmediateContext(&pContext);
DXGI_SWAP_CHAIN_DESC sd;
pSwapChain->GetDesc(&sd);
window = sd.OutputWindow;
ID3D11Texture2D* pBackBuffer;
pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&pBackBuffer);
pDevice->CreateRenderTargetView(pBackBuffer, NULL, &mainRenderTargetView);
pBackBuffer->Release();
oWndProc = (WNDPROC)SetWindowLongPtr(window, GWLP_WNDPROC, (LONG_PTR)WndProc);
InitImGui();
init = true;
}
else
return oPresent(pSwapChain, SyncInterval, Flags);
}
static bool menu = true;
ImGui_ImplDX11_NewFrame();
ImGui_ImplWin32_NewFrame();
ImGui::StyleColorsDark();
ImGui::NewFrame();
// ��������������� ����
static bool showDiagnostics = true;
if (showDiagnostics) {
ImGui::Begin("BHop Diagnostics", &showDiagnostics, ImGuiWindowFlags_AlwaysAutoResize);
bool gameConnected = BHop::IsGameConnected();
ImGui::TextColored(gameConnected ? ImVec4(0, 1, 0, 1) : ImVec4(1, 0, 0, 1),
"Game Connected: %s", gameConnected ? "YES" : "NO");
ImGui::Text("BHop Status: %s", BHop::IsEnabled() ? "ENABLED" : "DISABLED");
uintptr_t client = Memory::GetClient();
ImGui::Text("Client.dll: 0x%p", (void*)client);
if (client) {
uintptr_t localPlayer = Memory::Read<uintptr_t>(client + Offsets::dwLocalPlayerPawn);
ImGui::Text("Local Player: 0x%p", (void*)localPlayer);
if (localPlayer) {
int health = Memory::Read<int>(localPlayer + Offsets::m_iHealth);
int flags = Memory::Read<int>(localPlayer + Offsets::m_fFlags);
ImGui::Text("Health: %d", health);
ImGui::Text("Flags: %d (0x%X)", flags, flags);
// ��������� ������ ������
ImGui::Text("On Ground: %s", (flags == 257 || flags == 261 || flags == 263) ? "YES" : "NO");
ImGui::Text("In Air: %s", (flags == 256 || flags == 260 || flags == 262) ? "YES" : "NO");
ImGui::Text("Bit Check: %s", (flags & (1 << 0)) ? "YES" : "NO");
ImGui::Text("Space Pressed: %s", (GetAsyncKeyState(VK_SPACE) & 0x8000) ? "YES" : "NO");
// ���������� ��� ��������� ���������
ImGui::Separator();
ImGui::Text("Flag Analysis:");
ImGui::Text("256 (0x100) = In Air");
ImGui::Text("257 (0x101) = On Ground");
ImGui::Text("260 (0x104) = In Air + Ducking");
ImGui::Text("261 (0x105) = On Ground + Ducking");
ImGui::Text("262 (0x106) = In Air + Moving");
ImGui::Text("263 (0x107) = On Ground + Moving");
}
}
ImGui::End();
}
ImGui::SetNextWindowSize(ImVec2(700, 500));
// ������� ������� ��� ����
if (GetAsyncKeyState(VK_INSERT) & 1)
{
menu = !menu;
}
// ������� ������� ��� BHop
if (GetAsyncKeyState(VK_F2) & 1)
{
bhopEnabled = !bhopEnabled;
BHop::SetEnabled(bhopEnabled);
}
if (menu)
{
ImGui::Begin("ImGui Window", nullptr, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse);
ImGuiIO& io = ImGui::GetIO();
auto window = GetCurrentWindow();
auto draw = window->DrawList;
auto pos = window->Pos;
auto size = window->Size;
auto style = GetStyle();
gui.m_anim = 1.0f;
ImVec2 adjusted_pos = ImVec2(
pos.x + (170 / 2 - io.Fonts->Fonts[1]->CalcTextSizeA(io.Fonts->Fonts[1]->FontSize, FLT_MAX, 0, "Sciver").x / 2 + 1),
pos.y + 20
);
draw->AddText(io.Fonts->Fonts[1], io.Fonts->Fonts[1]->FontSize, adjusted_pos, gui.accent_color.to_im_color(), "Sciver");
adjusted_pos = ImVec2(
pos.x + (170 / 2 - io.Fonts->Fonts[1]->CalcTextSizeA(io.Fonts->Fonts[1]->FontSize, FLT_MAX, 0, "Sciver").x / 2),
pos.y + 20
);
draw->AddText(io.Fonts->Fonts[1], io.Fonts->Fonts[1]->FontSize, adjusted_pos, GetColorU32(ImGuiCol_Text), "Sciver");
SetCursorPos(ImVec2(10, 70));
ImGui::BeginChild("##tabs", ImVec2(150, size.y - 120));
gui.group_title("TapTap");
if (gui.tab(ICON_FA_CROSSHAIRS, "Rage", gui.m_tab == 0) && gui.m_tab != 0)
gui.m_tab = 0, gui.m_anim = 1.f;
if (gui.tab(ICON_FA_MOUSE, "Legit", gui.m_tab == 1) && gui.m_tab != 1)
gui.m_tab = 1, gui.m_anim = 1.f;
Spacing(), Spacing(), Spacing();
gui.group_title("Anti-Aim");
if (gui.tab(ICON_FA_USER_ALT, "Nepopadayki", gui.m_tab == 2) && gui.m_tab != 2)
gui.m_tab = 2, gui.m_anim = 1.f;
Spacing(), Spacing(), Spacing();
gui.group_title("Common");
if (gui.tab(ICON_FA_SUN, "Visuals", gui.m_tab == 3) && gui.m_tab != 3)
gui.m_tab = 3, gui.m_anim = 1.f;
if (gui.tab(ICON_FA_PALLET, "Skinchanger", gui.m_tab == 4) && gui.m_tab != 4)
gui.m_tab = 4, gui.m_anim = 1.f;
if (gui.tab(ICON_FA_HAMMER, "Miscellaneous", gui.m_tab == 5) && gui.m_tab != 5)
gui.m_tab = 5, gui.m_anim = 1.f;
Spacing(), Spacing(), Spacing();
gui.group_title("Presets");
if (gui.tab(ICON_FA_SUNSET, "Configs", gui.m_tab == 6) && gui.m_tab != 6)
gui.m_tab = 6, gui.m_anim = 1.f;
ImGui::EndChild();
static bool test = false;
static bool esp = true;
static bool bools[50]{};
static bool silent[50]{};
static bool afire[50]{};
static bool dshot[50]{};
static bool dpeek[50]{};
static bool qpeek[50]{};
static bool pwall[50]{};
static bool mdmgov[50]{};
static int ints[50]{};
static int ht[50]{};
static int ps[50]{};
static int dmg[50]{};
static int mindmg[50]{};
static bool dt[50]{};
static bool hs[50]{};
static int combo = 0;
static int weaponsss = 0;
static char buf[64];
SetCursorPos(ImVec2(190, 20));
PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0, 0));
SetCursorPos(ImVec2(175, 20));
ImGui::BeginChild("##subtabs", ImVec2(500, 500));
// ������� Miscellaneous (��� ����� BHop)
if (gui.m_tab == 5)
{
gui.group_box("MOVEMENT", ImVec2(245, 200));
{
// ������ ��� ���������/���������� BHop
if (Checkbox("Bunny Hop", &bhopEnabled))
{
BHop::SetEnabled(bhopEnabled);
}
Separator();
TextColored(ImVec4(1, 1, 0, 1), "Hotkey: F2");
Separator();
TextColored(ImVec4(0, 1, 1, 1), "Status: %s", BHop::IsEnabled() ? "ENABLED" : "DISABLED");
Separator();
TextColored(ImVec4(1, 0.5f, 0, 1), "Hold SPACE in game");
Separator();
// ������ ����� ��������
Checkbox("Auto Strafe", &bools[10]);
Separator();
Checkbox("Speed Boost", &bools[11]);
}
gui.end_group_box();
ImGui::SameLine(0.0f, 10.0f);
gui.group_box("OTHER", ImVec2(245, 200));
{
Checkbox("Third Person", &bools[12]);
Separator();
Checkbox("Fake Lag", &bools[13]);
Separator();
Checkbox("Clantag Changer", &bools[14]);
}
gui.end_group_box();
}
else if (gui.m_tab == 0) // Rage tab
{
gui.group_box("MAIN", ImVec2(245, 200));
{
Checkbox("Enabled", &bools[0]);
Separator();
Checkbox("Silent Aim", &silent[0]);
Separator();
Checkbox("Automatic Fire", &afire[0]);
Separator();
Checkbox("Penetrate Walls", &pwall[0]);
}
gui.end_group_box();
ImGui::SameLine(0.0f, 10.0f);
gui.group_box("Other", ImVec2(245, 200));
{
Checkbox("Delay Shot", &dshot[0]);
Separator();
Checkbox("Duck Peek Assist", &dpeek[0]);
Separator();
Checkbox("Quick Peek Assist", &qpeek[0]);
Separator();
Checkbox("DoubleTap", &dt[0]);
}
gui.end_group_box();
}
else if (gui.m_tab == 1) // Legit tab
{
gui.group_box("Aim", ImVec2(245, 200));
{
Checkbox("Aim-bot", &bools[0]);
Separator();
Checkbox("Silent", &silent[0]);
Separator();
Checkbox("", &afire[0]);
Separator();
Checkbox("", &pwall[0]);
}
gui.end_group_box();
ImGui::SameLine(0.0f, 10.0f);
gui.group_box("Other", ImVec2(245, 200));
{
Checkbox("Delay Shot", &dshot[0]);
Separator();
Checkbox("Duck Peek Assist", &dpeek[0]);
Separator();
Checkbox("Quick Peek Assist", &qpeek[0]);
Separator();
Checkbox("DoubleTap", &dt[0]);
}
gui.end_group_box();
}
ImGui::EndChild();
ImGui::PopStyleVar();
ImGui::End();
}
ImGui::Render();
pContext->OMSetRenderTargets(1, &mainRenderTargetView, NULL);
ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
return oPresent(pSwapChain, SyncInterval, Flags);
}
DWORD WINAPI MainThread(LPVOID lpReserved)
{
bool init_hook = false;
do
{
if (kiero::init(kiero::RenderType::D3D11) == kiero::Status::Success)
{
kiero::bind(8, (void**)&oPresent, hkPresent);
init_hook = true;
}
} while (!init_hook);
return TRUE;
}
BOOL WINAPI DllMain(HMODULE hMod, DWORD dwReason, LPVOID lpReserved)
{
switch (dwReason)
{
case DLL_PROCESS_ATTACH:
DisableThreadLibraryCalls(hMod);
CreateThread(nullptr, 0, MainThread, hMod, 0, nullptr);
break;
case DLL_PROCESS_DETACH:
kiero::shutdown();
BHop::Stop(); // ������������� BHop ��� ��������
break;
}
return TRUE;
}
bhop.cpp:
#define _CRT_SECURE_NO_WARNINGS
#include "bhop.h"
#include <chrono>
#include <iostream>
#include <string>
// Реализации методов Memory class
uintptr_t Memory::GetClient()
{
static uintptr_t client = reinterpret_cast<uintptr_t>(GetModuleHandleA("client.dll"));
return client;
}
bool Memory::IsValidPtr(uintptr_t ptr)
{
if (!ptr || ptr < 0x10000 || ptr > 0x7FFFFFFFFFFF)
return false;
MEMORY_BASIC_INFORMATION mbi;
if (!VirtualQuery(reinterpret_cast<LPCVOID>(ptr), &mbi, sizeof(mbi)))
return false;
return (mbi.Protect & (PAGE_READWRITE | PAGE_READONLY | PAGE_EXECUTE_READ | PAGE_EXECUTE_READWRITE));
}
bool Memory::IsGameAvailable()
{
uintptr_t client = GetClient();
if (!client) return false;
uintptr_t localPlayer = Memory::Read<uintptr_t>(client + Offsets::dwLocalPlayerPawn);
return localPlayer != 0;
}
// Определения для BHop namespace
std::atomic<bool> BHop::bhopRunning{ false };
std::thread BHop::bhopThread;
void BHop::BHopThread()
{
printf("[BHop] Modern BHop started with updated offsets\n");
printf("[BHop] ForceJump offset: 0x%X\n", Offsets::dwForceJump);
// Ждем загрузки игры
int attempts = 0;
while (!Memory::GetClient() && attempts < 50 && bhopRunning) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
attempts++;
}
uintptr_t client = Memory::GetClient();
if (!client) {
printf("[BHop] FAILED: client.dll not found\n");
return;
}
printf("[BHop] Game connected successfully!\n");
printf("[BHop] Client: 0x%p\n", (void*)client);
printf("[BHop] LocalPlayer: 0x%p\n", (void*)(client + Offsets::dwLocalPlayerPawn));
printf("[BHop] ForceJump: 0x%p\n", (void*)(client + Offsets::dwForceJump));
// Основной цикл BHop
uint32_t jumpCount = 0;
uint32_t frameCount = 0;
while (bhopRunning)
{
std::this_thread::sleep_for(std::chrono::milliseconds(1));
frameCount++;
// Проверка активного окна
HWND foreground = GetForegroundWindow();
if (!foreground) continue;
char title[256];
GetWindowTextA(foreground, title, sizeof(title));
if (!strstr(title, "Counter-Strike")) continue;
// Получаем локального игрока
uintptr_t localPlayer = Memory::Read<uintptr_t>(client + Offsets::dwLocalPlayerPawn);
if (!localPlayer) continue;
// Проверяем здоровье
int health = Memory::Read<int>(localPlayer + Offsets::m_iHealth);
if (health <= 0) continue;
// Читаем флаги состояния
int flags = Memory::Read<int>(localPlayer + Offsets::m_fFlags);
// Логируем изменение флагов для отладки (только первые несколько раз)
static int lastFlags = -1;
if (flags != lastFlags && jumpCount < 10) {
printf("[BHop] Flags changed: %d (0x%X)\n", flags, flags);
lastFlags = flags;
}
// Логика BHop
if (GetAsyncKeyState(VK_SPACE) & 0x8000)
{
// Современная проверка состояния для CS2
bool onGround = false;
// Основные состояния "на земле" в CS2
if (flags == 257 || flags == 261 || flags == 263) {
onGround = true;
}
// Дополнительные проверки через биты
else if (flags & (1 << 0)) { // FL_ONGROUND
onGround = true;
}
// Альтернативные значения
else if (flags == 65665 || flags == 65667) {
onGround = true;
}
if (onGround)
{
// Прыжок с актуальными значениями для CS2
Memory::Write<int>(client + Offsets::dwForceJump, 65537); // Прыжок
std::this_thread::sleep_for(std::chrono::milliseconds(8));
Memory::Write<int>(client + Offsets::dwForceJump, 256); // Отпускаем
jumpCount++;
// Логируем первые 10 прыжков для отладки
if (jumpCount <= 10) {
printf("[BHop] Jump #%d successful! Flags: %d\n", jumpCount, flags);
}
else if (jumpCount % 20 == 0) {
printf("[BHop] Jump #%d | Flags: %d\n", jumpCount, flags);
}
// Оптимальная задержка между прыжками
std::this_thread::sleep_for(std::chrono::milliseconds(3));
}
}
else
{
// Сбрасываем состояние прыжка
Memory::Write<int>(client + Offsets::dwForceJump, 256);
}
}
// Финальный сброс при выходе
if (client) {
Memory::Write<int>(client + Offsets::dwForceJump, 256);
}
printf("[BHop] Stopped - Total jumps: %d\n", jumpCount);
}
void BHop::Start()
{
if (!bhopRunning) {
bhopRunning = true;
bhopThread = std::thread(BHopThread);
printf("[BHop] BHop ACTIVATED\n");
}
}
void BHop::Stop()
{
if (bhopRunning) {
bhopRunning = false;
if (bhopThread.joinable()) {
bhopThread.join();
}
printf("[BHop] BHop DEACTIVATED\n");
}
}
bool BHop::IsEnabled()
{
return bhopRunning;
}
void BHop::SetEnabled(bool enabled)
{
if (enabled) {
Start();
}
else {
Stop();
}
}
bool BHop::IsGameConnected()
{
return Memory::IsGameAvailable();
}
bhop.h:
#pragma once
#include <Windows.h>
#include <cstdint>
#include <thread>
#include <atomic>
namespace Offsets
{
// Актуальные offsets для CS2 (проверьте на https://github.com/a2x/cs2-dumper)
constexpr std::ptrdiff_t dwLocalPlayerPawn = 0x173D5A8;
constexpr std::ptrdiff_t dwForceJump = 0x1738C70;
constexpr std::ptrdiff_t m_fFlags = 0x3D4;
constexpr std::ptrdiff_t m_iHealth = 0x334;
}
class Memory
{
public:
static uintptr_t GetClient();
template<typename T>
static T Read(uintptr_t address)
{
if (!IsValidPtr(address)) return T();
return *reinterpret_cast<T*>(address);
}
template<typename T>
static void Write(uintptr_t address, T value)
{
if (!IsValidPtr(address)) return;
DWORD oldProtect;
if (VirtualProtect(reinterpret_cast<LPVOID>(address), sizeof(T), PAGE_READWRITE, &oldProtect)) {
*reinterpret_cast<T*>(address) = value;
VirtualProtect(reinterpret_cast<LPVOID>(address), sizeof(T), oldProtect, &oldProtect);
}
}
static bool IsGameAvailable();
private:
static bool IsValidPtr(uintptr_t ptr);
};
namespace BHop {
extern std::atomic<bool> bhopRunning;
extern std::thread bhopThread;
void BHopThread();
void Start();
void Stop();
bool IsEnabled();
void SetEnabled(bool enabled);
bool IsGameConnected();
}
Последнее редактирование:
