Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- Please watch my YouTube video and don't just paste!
- If you just paste you won't learn important things and I go over how to configure VS so you don't get errors...
- Cyborg Elf 2019
- youtube.com/c/cyborgelf
- https://youtu.be/wrIPVBXXisc
- Join my Discord for help: https://discord.gg/nYSBcnf
- Heres a download for the mem.h and mem.cpp files if you didn't already get it: https://www.mediafire.com/folder/7nqusawac5isu2l,o2aelg811exiyho
- */
- #include <iostream>
- #include "mem.h"
- using namespace std;
- DWORD WINAPI HackThread(HMODULE hModule)
- {
- AllocConsole();
- FILE *f;
- freopen_s(&f, "CONOUT$", "w", stdout);
- cout << "Whats up noobs" << endl;
- uintptr_t moduleBase = (uintptr_t)GetModuleHandle(NULL);
- while (true)
- {
- if (GetAsyncKeyState(VK_END) & 1)
- {
- break;
- }
- uintptr_t looking = mem::FindDMAAddy(moduleBase + 0x4E97030, { 0x48, 0x70, 0x58, 0x418, 0x304 });
- int* look = (int*)looking;
- if (*look == 1)
- {
- mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
- mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
- }
- }
- fclose(f);
- FreeConsole();
- FreeLibraryAndExitThread(hModule, 0);
- return 0;
- }
- BOOL APIENTRY DllMain(HMODULE hModule,
- DWORD ul_reason_for_call,
- LPVOID lpReserved
- )
- {
- switch (ul_reason_for_call)
- {
- case DLL_PROCESS_ATTACH:
- CloseHandle(CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)HackThread, hModule, 0, nullptr));
- case DLL_THREAD_ATTACH:
- case DLL_THREAD_DETACH:
- case DLL_PROCESS_DETACH:
- break;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment