CybEl

DLL Internal Triggerbot Code

Mar 23rd, 2019
12,035
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.49 KB | None | 0 0
  1. /*
  2. Please watch my YouTube video and don't just paste!
  3. If you just paste you won't learn important things and I go over how to configure VS so you don't get errors...
  4. Cyborg Elf 2019
  5. youtube.com/c/cyborgelf
  6. https://youtu.be/wrIPVBXXisc
  7. Join my Discord for help: https://discord.gg/nYSBcnf
  8. 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
  9. */
  10.  
  11. #include <iostream>
  12. #include "mem.h"
  13.  
  14. using namespace std;
  15.  
  16. DWORD WINAPI HackThread(HMODULE hModule)
  17. {
  18. AllocConsole();
  19. FILE *f;
  20. freopen_s(&f, "CONOUT$", "w", stdout);
  21.  
  22. cout << "Whats up noobs" << endl;
  23.  
  24. uintptr_t moduleBase = (uintptr_t)GetModuleHandle(NULL);
  25.  
  26. while (true)
  27. {
  28. if (GetAsyncKeyState(VK_END) & 1)
  29. {
  30. break;
  31. }
  32.  
  33. uintptr_t looking = mem::FindDMAAddy(moduleBase + 0x4E97030, { 0x48, 0x70, 0x58, 0x418, 0x304 });
  34. int* look = (int*)looking;
  35. if (*look == 1)
  36. {
  37. mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
  38. mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
  39. }
  40. }
  41. fclose(f);
  42. FreeConsole();
  43. FreeLibraryAndExitThread(hModule, 0);
  44. return 0;
  45. }
  46.  
  47. BOOL APIENTRY DllMain(HMODULE hModule,
  48. DWORD ul_reason_for_call,
  49. LPVOID lpReserved
  50. )
  51. {
  52. switch (ul_reason_for_call)
  53. {
  54. case DLL_PROCESS_ATTACH:
  55. CloseHandle(CreateThread(nullptr, 0, (LPTHREAD_START_ROUTINE)HackThread, hModule, 0, nullptr));
  56. case DLL_THREAD_ATTACH:
  57. case DLL_THREAD_DETACH:
  58. case DLL_PROCESS_DETACH:
  59. break;
  60. }
  61. return TRUE;
  62. }
Advertisement
Add Comment
Please, Sign In to add comment