OldSchoolHack

Registrieren / Anmelden Deutsch

Externer Aimbot for-Schleifen-Problem

icon Thema: Externer Aimbot for-Schleifen-Problem

Anmeldungsdatum: Jun 2011

Beiträge: 490

Benutzer-Bewertung:

12 positiv
0 negativ
Hallo Leute,
hab meinen Externen Aimbot nochmal komplett recoded und er läuft auch an sich nicht schlecht(auch wenn ich noch nciht viele Features iengebaut hab, aber das kommt wenn er mal läuft ), nur das Problem ist, dass er die For-Schleife in der main einmal bis Index 32 durchgeht, bis dahin auch aimt, danach die Schleife zwar von neu durchgeht, aber  nicht mehr aimt, obwohl WriteProcessMemory noch gecalled wird... Hier mal ein Teil Code, der komplette kommt zum Schluss als DL :
CPP Code:
  1. #include "StdAfx.h"
  2. #include <Windows.h>
  3. #include "PlayerStructs.h"
  4. #include "GlobaleVariablen.h"
  5. #include <tlhelp32.h>
  6. #include <iostream>
  7.  
  8.  
  9. DWORD GetModuleBase(const DWORD dwProcessId, const char *szModuleName)
  10. {
  11. #ifdef _GMBE_CHECK_PARAMS_
  12. if (!dwProcessID) || (!szModuleName) return 0;
  13. #endif
  14.  
  15. HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
  16. if (!hSnap) return 0;
  17.  
  18. MODULEENTRY32 me;
  19. me.dwSize = sizeof(MODULEENTRY32);
  20.  
  21. DWORD dwReturn = 0;
  22.  
  23. if (Module32First(hSnap, &me)) {
  24. while (Module32Next(hSnap, &me)) {
  25. if (lstrcmpi(me.szModule, szModuleName) == 0) {
  26. dwReturn = (DWORD)me.modBaseAddr;
  27. break;
  28. }
  29. }
  30. }
  31.  
  32. CloseHandle(hSnap);
  33.  
  34. return dwReturn;
  35. }
  36. void InitializeModulesAndSetup()
  37. {
  38.  
  39. hProcess = OpenProcess(PROCESS_ALL_ACCESS, false, dwProcessId);
  40.  
  41. while(dwClientDLL == 0x0)
  42. {
  43. dwClientDLL = GetModuleBase(dwProcessId, "client.dll");
  44. }
  45.  
  46. while(dwEngineDLL == 0x0);
  47. {
  48. dwEngineDLL = GetModuleBase(dwProcessId, "engine.dll");
  49. }
  50.  
  51. while(dwOverlayDLL == 0x0)
  52. {
  53. dwOverlayDLL = GetModuleBase(dwProcessId, "GameOverlayRenderer.dll");
  54. }
  55.  
  56. while(dwVGuiDLL == 0x0)
  57. {
  58. dwVGuiDLL = GetModuleBase(dwProcessId, "vguimatsurface.dll");
  59. }
  60. }
  61. void World2Screen(void)
  62. {
  63.  
  64. if( TargetChanged == TRUE )
  65. {
  66. Players[iTargetID].Vectors.fAbsOrigin[2] = Players[iTargetID].Vectors.fAbsOrigin[2] + 0.5;
  67. Players[iTargetID].Vectors.fAbsOrigin[1] = Players[iTargetID].Vectors.fAbsOrigin[1] - 0.5;
  68. }
  69. fDelta[0] = LocalPlayer.Vectors.fAbsOrigin[0] - Players[iTargetID].Vectors.fAbsOrigin[0];
  70. fDelta[1] = LocalPlayer.Vectors.fAbsOrigin[1] - Players[iTargetID].Vectors.fAbsOrigin[1];
  71. fDelta[2] = LocalPlayer.Vectors.fAbsOrigin[2] - Players[iTargetID].Vectors.fAbsOrigin[2];
  72.  
  73. fHyp = sqrt(fDelta[0]*fDelta[0] + fDelta[1]*fDelta[1] + fDelta[2]*fDelta[2]);
  74.  
  75. fAimbotAngles[0] = (float) (atanf(fDelta[2]/fHyp) * 57.295779513082f);
  76. fAimbotAngles[1] = (float) (atanf(fDelta[1]/fDelta[0]) * 57.295779513082f);
  77. fAimbotAngles[2] = 0.0f;
  78.  
  79. if(fDelta[0] >= 0.0f)
  80. {
  81. fAimbotAngles[1] += 180.0f;
  82. }
  83. }
  84. float GetDistance( int iLoop )
  85. {
  86. float fDeltaX = Players[iLoop].Vectors.fAbsOrigin[0] - LocalPlayer.Vectors.fAbsOrigin[0];
  87. float fDeltaY = Players[iLoop].Vectors.fAbsOrigin[1] - LocalPlayer.Vectors.fAbsOrigin[1];
  88. float fDeltaZ = Players[iLoop].Vectors.fAbsOrigin[2] - LocalPlayer.Vectors.fAbsOrigin[2];
  89.  
  90. return (float)( sqrt( ( fDeltaX * fDeltaX ) + ( fDeltaY * fDeltaY ) + ( fDeltaZ * fDeltaZ ) ) );
  91. }
  92.  
  93.  
  94. void GetBestTarget(void)
  95. {
  96. for(int iLoop = 1; iLoop <= 32; iLoop++)
  97. {
  98. if(iLoop == 1)
  99. {
  100. iTargetID = iLoop;
  101. }
  102. if ( Players[iLoop].Integers.iHealth > 0 && Players[iLoop].Integers.iHealth <= 100 )
  103. {
  104. if ( LocalPlayer.Integers.iTeam != Players[iLoop].Integers.iTeam)
  105. {
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112. if(GetDistance(iLoop) < GetDistance(iTargetID))
  113. {
  114. iTargetID = iLoop;
  115. TargetChanged = TRUE;
  116. }
  117. if (GetDistance(iLoop) > GetDistance(iTargetID))
  118. {
  119. TargetChanged = FALSE;
  120. }
  121.  
  122. }
  123.  
  124. }
  125. }
  126.  
  127. }
  128.  
  129.  
  130.  
  131.  
  132. int main()
  133. {
  134.  
  135. hwnd = FindWindow (NULL, "Counter-Strike Source");
  136. Sleep(300);
  137. GetWindowThreadProcessId (hwnd, &dwProcessId);
  138. Sleep(300);
  139. hProcess = OpenProcess (PROCESS_ALL_ACCESS, 0, dwProcessId);
  140. Sleep(300);
  141.  
  142. dwClientDLL = GetModuleBase(dwProcessId, "client.dll");
  143.  
  144. Sleep(200);
  145.  
  146. dwEngineDLL = GetModuleBase(dwProcessId, "engine.dll");
  147.  
  148. Sleep(200);
  149. std::cout << dwEngineDLL << " : " << dwClientDLL << std::endl;
  150. for(iIndex = 0; iIndex <= 32; iIndex++)
  151. {
  152. ReadProcessMemory(hProcess, (LPCVOID)(dwClientDLL + 0x733C78 ), &Players[iIndex].RadarBase, 4, 0);
  153. }
  154. ReadProcessMemory(hProcess, (LPCVOID) ( dwEngineDLL + 0x3C9074), &LocalPlayer.NameBase, 4 ,0);
  155.  
  156. while(HackAktiv == TRUE)
  157. {
  158.  
  159. for(iIndex = 0; iIndex <= 32; iIndex++)
  160. {
  161.  
  162.  
  163. fAimbotAngles[0] = 0.0f;
  164. fAimbotAngles[1] = 0.0f;
  165. fAimbotAngles[2] = 0.0f;
  166.  
  167. LocalPlayer.Vectors.fAbsOrigin[0] = 0.0f;
  168. LocalPlayer.Vectors.fAbsOrigin[1] = 0.0f;
  169. LocalPlayer.Vectors.fAbsOrigin[2] = 0.0f;
  170. LocalPlayer.Integers.iTeam = 0;
  171.  
  172. LocalPlayer.Vectors.fEyeAngles[0] = 0.0f;
  173. LocalPlayer.Vectors.fEyeAngles[1] = 0.0f;
  174. LocalPlayer.Vectors.fEyeAngles[2] = 0.0f;
  175.  
  176.  
  177. Players[iIndex].Vectors.fAbsOrigin[0] = 0.0f;
  178. Players[iIndex].Vectors.fAbsOrigin[1] = 0.0f;
  179. Players[iIndex].Vectors.fAbsOrigin[2] = 0.0f;
  180.  
  181.  
  182.  
  183.  
  184.  
  185. ReadProcessMemory(hProcess, (LPCVOID)(dwEngineDLL + 0x3C09B8 ), &LocalPlayer.Vectors.fAbsOrigin, 12, 0);
  186. ReadProcessMemory(hProcess, (LPCVOID)(dwEngineDLL + 0x3EA964 ), &LocalPlayer.Vectors.fEyeAngles, 12, 0);
  187. ReadProcessMemory(hProcess, (LPCVOID)(LocalPlayer.NameBase ), LocalPlayer.Strings.cName, 31 ,0);
  188.  
  189. ReadProcessMemory(hProcess, (LPCVOID)( dwClientDLL + 0x71212C), &dwTemp, 4, 0);
  190. dwTemp += 0xC;
  191. ReadProcessMemory(hProcess, (LPCVOID)( dwTemp), &dwTemp, 4, 0);
  192. dwTemp += 0x10;
  193. ReadProcessMemory(hProcess, (LPCVOID)( dwTemp), &dwTemp, 4, 0);
  194. dwTemp += 0x6E8;
  195. ReadProcessMemory(hProcess, (LPCVOID)( dwTemp), &LocalPlayer.Integers.iTeam, 4, 0);
  196. ReadProcessMemory(hProcess, (LPVOID)( Players[iIndex].RadarBase + (iIndex * 0x140 + 0x60 ) ), &Players[iIndex].Vectors.fAbsOrigin, 12, 0);
  197. ReadProcessMemory(hProcess, (LPVOID)( Players[iIndex].RadarBase + (iIndex * 0x140 + 0x5C ) ), &Players[iIndex].Integers.iHealth, 4, 0);
  198. ReadProcessMemory(hProcess, (LPVOID)( Players[iIndex].RadarBase + (iIndex * 0x140 + 0x38 ) ), &Players[iIndex].Strings.cName, 31, 0);
  199. ReadProcessMemory(hProcess, (LPVOID)( Players[iIndex].RadarBase + (iIndex * 0x140 + 0x58 ) ), &Players[iIndex].Integers.iTeam, 4, 0);
  200. Sleep(200);
  201. std::cout << " Gegner : " << Players[iTargetID].Strings.cName << std::endl;
  202. std::cout << " iIndex : " << iIndex << std::endl;
  203.  
  204.  
  205. GetBestTarget();
  206. World2Screen();
  207. if (GetAsyncKeyState (VK_SPACE))
  208. {
  209. WriteProcessMemory(hProcess, (LPVOID)(dwEngineDLL + 0x3EA964), &fAimbotAngles, 12, 0);
  210. Sleep(1);
  211. }
  212. iTargetID = 0;
  213. Sleep(20);
  214.  
  215.  
  216. }
  217.  
  218. }
  219. }
Wenn mir jemand helfen kann, wäre das sehr nett
Danke im Vorraus
Manta
PS: Hier der Link für den Kompletten Quellcode : Um Links zu sehen, musst du dich registrieren

__________________

http://www10.pic-upload.de/30.04.12/j9dbc34bxdg.jpg