OldSchoolHack

Register / Login English

external triggerbot

icon Thread: external triggerbot

Join Date: Jul 2012

Posts: 16

Quote from k1u
Und ich weiß immer noch nicht was er möchte..  
huhu mein triggerbot braucht noch ne function mit der er weiss wann er ein model vorm fadenkreuz hat etc.. so das habe ich leider nicht und möchte euch fragen ob ihr mir helfen könnt.
TEXT Code:
  1. // guter code.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.
  2. // OFFSETS EXTRA RAUSGENOMMEN!!!!
  3.  
  4. #include "stdafx.h"
  5.  
  6. #include <windows.h>
  7. #include <iostream>
  8. #include <tlhelp32.h>
  9. #include <Windows.h>
  10.  
  11. #define DIKEYBOARD_L 0x0426
  12.  
  13. HWND hwnd = NULL;
  14. DWORD pid = NULL;
  15. HANDLE hProcess = NULL;
  16.  
  17. DWORD enginebase = NULL;
  18. DWORD clientbase = NULL;
  19. DWORD dwOverlayBase = NULL;
  20. DWORD dwVGui = NULL;
  21.  
  22. DWORD tempadd = NULL;
  23.  
  24. const DWORD drawrendermodelsOffset =
  25. const DWORD drawParticleOffset =
  26. const DWORD drawOtherModelsOffset =
  27. const DWORD cheatBypassOffset =
  28.  
  29. const DWORD triggerbotOffset =
  30. const DWORD triggerbotOffsetB =
  31.  
  32. const DWORD BhopOffsetA =
  33.  
  34. const DWORD ChatOffsetA = //client.dll //[1=sayall, 2=sayteam]
  35. const DWORD ChatOffsetB =
  36. const DWORD OverlayOffset = // GameOverlayRenderer.dll+77D8C // Overlay 4byte
  37. const DWORD MenuOffset = // vguimatsurface.dll
  38.  
  39. int cheatBypassAn = 1;
  40. int cheatBypassAus = 0;
  41.  
  42. int wireframeAn = 2;
  43. int wireframeAus = 1;
  44.  
  45. int smokeAn = 0;
  46. int smokeAus = 1;
  47.  
  48. int boxesAn = 1;
  49. int boxesAus = 0;
  50.  
  51. int triggerbotAn = 1;
  52. int triggerbotAus = 0 ;
  53.  
  54. int inair = 0;
  55.  
  56. int iChat = 0;
  57. bool bMenu = false;
  58. bool bOverlay = true;
  59.  
  60. DWORD GetModuleBaseExtern(const DWORD dwProcessId, const char *szModuleName)
  61. {
  62. #ifdef _GMBE_CHECK_PARAMS_
  63. if (!dwProcessID) || (!szModuleName) return 0;
  64. #endif
  65.  
  66. HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
  67. if (!hSnap) return 0;
  68.  
  69. MODULEENTRY32 me;
  70. me.dwSize = sizeof(MODULEENTRY32);
  71.  
  72. DWORD dwReturn = 0;
  73.  
  74. if (Module32First(hSnap, &me)) {
  75. while (Module32Next(hSnap, &me)) {
  76. if (lstrcmpi(me.szModule, szModuleName) == 0) {
  77. dwReturn = (DWORD)me.modBaseAddr;
  78. break;
  79. }
  80. }
  81. }
  82.  
  83. CloseHandle(hSnap);
  84.  
  85. return dwReturn;
  86. }
  87.  
  88.  
  89. void m_jump()
  90. {
  91. INPUT inp;
  92. memset(&inp,0,sizeof(inp));
  93. inp.type=INPUT_KEYBOARD;
  94. inp.ki.wVk = 76;
  95. inp.ki.wScan = DIKEYBOARD_L; //L Taste drücken
  96. inp.ki.time = 0;
  97. inp.ki.dwExtraInfo = 0;
  98. inp.ki.dwFlags=KEYEVENTF_SCANCODE;
  99. SendInput(1,&inp,sizeof(inp));
  100.  
  101. inp.type=INPUT_KEYBOARD;
  102. inp.ki.wVk = 76;
  103. inp.ki.time = 0;
  104. inp.ki.dwExtraInfo = 0;
  105. inp.ki.wScan = DIKEYBOARD_L; // L Taste loslassen
  106. inp.ki.dwFlags=KEYEVENTF_SCANCODE|KEYEVENTF_KEYUP;
  107. SendInput(1,&inp,sizeof(inp));
  108. }
  109.  
  110. ///// Wichtig: ingame bind L +jump, da der cheat L spammt zum Springen und das nur, wenn du leertaste gedrückt hältst
  111.  
  112.  
  113.  
  114. int main(int argc, char *argv[])
  115. {
  116.  
  117. SetConsoleTitle( "blabla" );
  118.  
  119. std::cout << " Starte jetzt CS:S du Lappen." << std::endl;
  120. std::cout << std::endl;
  121.  
  122. hwnd = FindWindow (NULL, "Counter-Strike Source");
  123. while(hwnd==NULL)
  124. {
  125. hwnd = FindWindow (NULL, "Counter-Strike Source");
  126. std::cout << " Es ist ja immer noch nicht an ! " << std::endl;
  127. Sleep(3000);
  128. }
  129.  
  130. GetWindowThreadProcessId (hwnd, &pid);
  131. hProcess = OpenProcess (PROCESS_ALL_ACCESS, 0, pid);
  132.  
  133.  
  134. enginebase = GetModuleBaseExtern(pid, "engine.dll");
  135. clientbase = GetModuleBaseExtern(pid, "client.dll");
  136. dwOverlayBase = GetModuleBaseExtern(pid, "GameOverlayRenderer.dll");
  137. dwVGui = GetModuleBaseExtern(pid, "vguimatsurface.dll");
  138.  
  139. /////////////-------------Debug Kontrolle--------------//////////////////////////
  140. std::cout << " hwnd : " << hwnd << std::endl;
  141. std::cout << " Prozess-ID : " << pid << std::endl;
  142. std::cout << " Prozess-Handle : " << hProcess << std::endl;
  143. std::cout << std::endl;
  144. std::cout << " Client Module Entry : " << clientbase << std::endl;
  145. std::cout << " Engine Module Entry : " << enginebase << std::endl;
  146. std::cout << " Overlay Module Entry : " << dwOverlayBase << std::endl;
  147. std::cout << " VGui Module Entry : " << dwVGui << std::endl;
  148.  
  149. std::cout << std::endl;
  150.  
  151. std::cout << " Drücke einfügen um die Befehle zu bypassen " << std::endl;
  152. std::cout << " Drücke entfernen um die Bypasses rückgängig zu machen " << std::endl;
  153. std::cout << " Drücke F1 um NoSmoke anzumachen " << std::endl;
  154. std::cout << " Drücke F2 um NoSmoke Auszumachen " << std::endl;
  155. std::cout << " Drücke F3 um Boxes Anzumachen " << std::endl;
  156. std::cout << " Drücke F4 um Boxes Auszumachen " << std::endl;
  157. //////////--------------------------------------------/////////////////////////
  158.  
  159. while (true)
  160. {
  161.  
  162.  
  163. if (GetAsyncKeyState(VK_INSERT))
  164. {
  165. WriteProcessMemory (hProcess, (LPVOID)(enginebase + cheatBypassOffset), &cheatBypassAn, 4, NULL);
  166. Sleep(10);
  167. WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawOtherModelsOffset), &wireframeAn, 2, NULL);
  168. Sleep(10);
  169. std::cout << " sv_cheats Bypass On | Wireframe Wh On " << std::endl;
  170. }
  171.  
  172. if (GetAsyncKeyState(VK_DELETE))
  173. {
  174. WriteProcessMemory (hProcess, (LPVOID)(enginebase + cheatBypassOffset), &cheatBypassAus, 4, NULL);
  175. Sleep(10);
  176. WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawOtherModelsOffset), &wireframeAus, 2, NULL);
  177. Sleep(10);
  178. std::cout << " Bypasses Off " << std::endl;
  179. }
  180.  
  181. if (GetAsyncKeyState(VK_F1))
  182. {
  183. WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawParticleOffset), &smokeAn, 4, NULL);
  184. Sleep(10);
  185. std::cout << " Smoke ON " << std::endl;
  186. }
  187.  
  188. if (GetAsyncKeyState(VK_F2))
  189. {
  190. WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawParticleOffset), &smokeAus, 4, NULL);
  191. Sleep(10);
  192. std::cout << " Smoke OFF " << std::endl;
  193. }
  194.  
  195. if (GetAsyncKeyState(VK_F3))
  196. {
  197. WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawrendermodelsOffset), &boxesAn, 4, NULL);
  198. Sleep(10);
  199. std::cout << " Boxes On " << std::endl;
  200. }
  201.  
  202. if (GetAsyncKeyState(VK_F4))
  203. {
  204. WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawrendermodelsOffset), &boxesAus, 4, NULL);
  205. Sleep(10);
  206. std::cout << " Boxes On " << std::endl;
  207. }
  208.  
  209. if (GetAsyncKeyState(VK_F5))
  210. {
  211. ReadProcessMemory (hProcess, (LPVOID)(clientbase + triggerbotOffset + triggerbotOffsetB), &triggerbotAn, 4, NULL);
  212. Sleep(10);
  213. std::cout << " triggerbot on " << std::endl;
  214. }
  215.  
  216. if (GetAsyncKeyState(VK_F6))
  217. {
  218. ReadProcessMemory (hProcess, (LPVOID)(clientbase + triggerbotOffset + triggerbotOffsetB), &triggerbotAus, 4, NULL);
  219. Sleep(10);
  220. std::cout << " triggerbot off " << std::endl;
  221. }
  222.  
  223. /////----------------------- menü, chat, overlay------------///////////////////////////////////
  224.  
  225. ReadProcessMemory(hProcess, (LPVOID)(clientbase + ChatOffsetA), &tempadd, sizeof(tempadd), 0);
  226. tempadd += ChatOffsetB;
  227. ReadProcessMemory(hProcess, (LPVOID)(tempadd), &iChat, 4, 0);
  228. ReadProcessMemory(hProcess, (LPVOID)(dwOverlayBase + OverlayOffset), &bOverlay, 4, 0);
  229. ReadProcessMemory(hProcess, (LPVOID)(dwVGui + MenuOffset), &bMenu, 4, 0);
  230.  
  231. ///////////---------------------Bhop-----------------/////////////////////////////////////////////
  232. ReadProcessMemory (hProcess, (LPVOID)(clientbase + BhopOffsetA), &inair, 1, NULL);
  233.  
  234. ////////////------------------------------------------------///////////////////////////////////////
  235.  
  236. if (GetAsyncKeyState(VK_SPACE) && inair != 255 && iChat == 0 && !bMenu && !bOverlay)
  237. {
  238. m_jump();
  239. Sleep(1);
  240. }
  241.  
  242. Sleep (1);
  243. }
  244. return 0;
  245. }
  246.