NMan1 / warzone-internal

internal modern warfare warzone cheat (aimbot, esp, no recoil, menu)
50 stars 28 forks source link

Not Injected #1

Closed EvNr closed 2 years ago

EvNr commented 2 years ago

Hi thanks for your contributions i've learned alot of things from you , i tried to compile this cheat , and injected it throw many injectors , but in game nothing happenes

NMan1 commented 2 years ago

How are you hooking, did you create an entry point or are you using exported function, did you set original_present variable? Need more information

lol12345-6 commented 2 years ago

Would you be able to make it simpler for us to use ?

EvNr commented 2 years ago

`

include "imports/lazy_importer.h"

include "utils/globals.h"

include "renderer/renderer.h"

include "utils/utils.h"

include "game/game.h"

include "game/offsets.h"

include "game/features/features.h"

include

include

define VERSION "1.3"

uintptr_t moduleBase = 0; extern "C" { unsigned int _fltused = 1; }

struct __declspec(uuid("189819f1-1db6-4b57-be54-1821339b85f7")) ID3D12Device;

__declspec(dllexport) uintptr_t present_orignal_address = 0xffffffffffff;

bool init = false; ULONG WINAPI hook_main(IDXGISwapChain3* swapchain, UINT sync, UINT flags) { while (moduleBase == 0) { moduleBase = (uintptr_t)GetModuleHandle(NULL); Sleep(30); }

//hook_main(IDXGISwapChain3 * swapchain, UINT sync, UINT flags) {
if (!init) {
    utils::log_init("D:\\overflow.log");
    utils::log("starting");

    globals::window = game::get_window();
    if (!globals::window) {
        utils::log("invalid window");
    }

    if (!SUCCEEDED((globals::swapchain = swapchain)->GetDevice(__uuidof(ID3D12Device), (void**)&globals::d3d_device))) {
        utils::log("failed to get d3d device");
    }

    renderer::init();
    renderer::original_wndproc = reinterpret_cast<WNDPROC>(SetWindowLongPtrW((HWND)globals::window, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(renderer::wndproc)));
    globals::base = (uintptr_t)GetModuleHandleA(NULL);
    decryption::update();

    utils::log("intialzied");
    init = true;
}

renderer::begin();
renderer::draw_text("overflow", { 15, 25 }, 18, { 255, 255, 255, 255 });
renderer::draw_text("    ver " + std::string(VERSION), { 15, 42 }, 15, { 255, 7, 58, 255 });

static bool new_game = true;
auto ref_def_ptr = decryption::get_ref_def();
if (ref_def_ptr && game::in_game()) {
    if (new_game) {
        decryption::update();
        new_game = false;
    }

    game::ref_def = *(game::ref_def_t*)ref_def_ptr;

    if (globals::settings::esp) {
        features::esp();
    }

    if (globals::settings::aimbot && globals::settings::aimbot_key_toggle) {
        features::aimbot();
    }

    if (globals::settings::no_recoil && globals::settings::no_recoil_key_toggle) {
        features::no_recoil();
    }
}
else {
    new_game = true;
}

renderer::end();

if (globals::settings::end_cheat) {
    SetWindowLongPtrW((HWND)globals::window, GWLP_WNDPROC, reinterpret_cast<LONG_PTR>(renderer::wndproc));
    uintptr_t relative_address{};
    auto intruction_address = utils::pattern_scan((uintptr_t)LI_MODULE("DiscordHook64.dll").safe_cached(), "FF 15 ?? ?? ?? ?? 89 C6 48 8D ?? ?? ?? E8 ?? ?? ?? ?? 48 8B ?? ?? ?? 48 31 ?? E8 ?? ?? ?? ?? 89 F0 48 83 C4 ?? 5B 5F 5E C3");
    memcpy(&relative_address, (void*)(intruction_address + 0x2), 0x4);
    *(uintptr_t*)(intruction_address + 0x6 + relative_address) = present_orignal_address;
}

using original = long(*)(IDXGISwapChain3* swapchain, UINT sync, UINT flags);
return ((original)present_orignal_address)(swapchain, sync, flags);

}

BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved) { switch (reason) { case DLL_PROCESS_ATTACH: _beginthreadex(0, 0, (_beginthreadex_proc_type)hook_main, 0, 0, 0); break; } return true; } `

thats what im doing + sorry if i did something wrong , im new to PC Game hacking , i used to be console game hacking since PS3 , so point me if i did something wrong , thanks , again i appreciate your contribution i've learned a lot from you

NMan1 commented 2 years ago

You cannot just create a thread for the hook function. That function is supposed to intercept the games present function within their rendering thread through a hook. Please research what a hook is, hopefully that will help your understanding.

https://www.unknowncheats.me/forum/general-programming-and-reversing/154643-different-ways-hooking.html https://github.com/DrNseven/D3D12-Hook-ImGui https://www.unknowncheats.me/forum/c-and-c-/480056-discord-d3d12-hook.html https://www.unknowncheats.me/forum/anti-cheat-bypass/424014-hook-discord-overlay.html

P.S you don’t need to hijack the games present, rather you have other options such as overlays like discord, steam, overwolf etc (they all have their own present function or they hook one themselves)

EvNr commented 2 years ago

thanks for helping , tbh im that guy who learn by seeing codes , for example your cheat if its complete with a hook and everything maybe i can learn , otherwise i can learn but i will take time because i love to learn and apply at the same time and i reading a learning from the links you gave me that one of them idk what it is , https://www.unknowncheats.me/forum/c-and-c-/480056-discord-d3d12-hook.html someone asking and no replies

so if by any chance you can update the dllmain , i can see and learn , because that how i learned from your previous sources like the external wz cheat that i was able to add an aimbot and improve the ESP and so on , again i appreciate your hard work , your work never goes useless , it helped a lot of people just like me

NMan1 commented 2 years ago

The best way to learn in my opinion is by doing it yourself. This won’t be easy if you don’t have any programming or game hacking experince but it is by no means hard.

EvNr commented 2 years ago

yeah , you are right + i have programming and game hacking experience , i used to do PS3 tools and menus for GTA V and BO2 C# + C++ and SPRX , thanks for your time boss