OldSchoolHack

Registrieren / Anmelden Deutsch

Externer Aimbot Probleme

icon Thema: Externer Aimbot Probleme

Anmeldungsdatum: Jun 2011

Beiträge: 490

Benutzer-Bewertung:

12 positiv
0 negativ
Hi Leute, ich bin an ienem externen Aimbot dran und bin auch soweit mit den Berechnungen fertig. Aber irgendwas mach ich beim auslesen des Radarstructs falsch, der aimbot zielt immer nach oben xD
Edit : Hier ganzer Code :
Kann mir eventuell einer sagen, was ich falsch machen?
Danke im Vorraus.
Manta
CPP Code:
  1. #include "stdafx.h"
  2. #include <math.h>
  3. #include <windows.h>
  4. #include <iostream>
  5. #include <conio.h>
  6. #include <tlhelp32.h>
  7. #include <stdlib.h>
  8. #include <stdio.h>
  9. #include <string>
  10. #include <cstdlib>
  11. #include <sstream>
  12. #include <Windows.h>
  13. #include <cmath>
  14. #define DIKEYBOARD_L 0x0426
  15. #pragma comment(lib, "Psapi.lib")
  16. using namespace std;
  17. char Myname[32] = "M a n t a R o c h e n";
  18. struct player // our playerstruct...
  19. {
  20. BYTE hp; // here the hp will be saved...
  21. char name[32]; // the name in chars...
  22. BYTE team; // the team... 0 = spec, 2 = t, 3 = ct
  23. float x; // x coord
  24. float y; // y...
  25. float z; // z...
  26. float pitch; // pitch
  27. float yaw; // yaw
  28. float roll; // angle
  29. } players[64] = {0}; // struct array to save the readout data - max 64 players
  30.  
  31.  
  32. bool isLow;
  33. int Triggerkey;
  34. int a = 30;
  35. int c = 600;
  36. int focusindex = 64;
  37. int oppositeTeam(int team)
  38. {
  39. if (team == 2)
  40. {
  41. return 3;
  42. }
  43. else if (team == 3)
  44. {
  45. return 2;
  46. }
  47. else
  48. {
  49. return 0;
  50. }
  51. }
  52.  
  53. float rechnen(player eins, player zwei) {
  54. float x;
  55. float y;
  56. float z;
  57. float ergebnis;
  58. x = eins.x - zwei.x;
  59. x = x * x;
  60. y = eins.y - zwei.y;
  61. y = y * y;
  62. z = eins.z - zwei.z;
  63. z = z * z;
  64. ergebnis = sqrt(x+y+z);
  65. //Gibt das ergebnis an main zurück
  66. return ergebnis;
  67. }
  68. const int RadarOffset = 0x71EA14;
  69. const int BhopOffset = 0x6F5874;
  70. const int BhopOffsetB = 0x1F0;
  71. const int TriggerOffset = 0x6F5874;
  72. const int TriggerOffsetB = 0x1458;
  73. const int RadarOffsetB = 0xC;
  74. int tempAdress, BaseAdress;
  75.  
  76.  
  77. DWORD GetModuleBaseExtern(const DWORD dwProcessId, const char *szModuleName)
  78. {
  79. #ifdef _GMBE_CHECK_PARAMS_
  80. if (!dwProcessID) || (!szModuleName) return 0;
  81. #endif
  82.  
  83. HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId);
  84. if (!hSnap) return 0;
  85.  
  86. MODULEENTRY32 me;
  87. me.dwSize = sizeof(MODULEENTRY32);
  88.  
  89. DWORD dwReturn = 0;
  90.  
  91. if (Module32First(hSnap, &me)) {
  92. while (Module32Next(hSnap, &me)) {
  93. if (lstrcmpi(me.szModule, szModuleName) == 0) {
  94. dwReturn = (DWORD)me.modBaseAddr;
  95. break;
  96. }
  97. }
  98. }
  99.  
  100. CloseHandle(hSnap);
  101.  
  102. return dwReturn;
  103. }
  104.  
  105.  
  106. int main(int argc, char *argv[])
  107. {
  108. DWORD destSize;
  109. destSize=500;
  110. GetPrivateProfileString("trigger","Myname","NULL",Myname,destSize,"C://settings.ini");
  111. cout << " Auszug deines Namens aus der Settings.ini : " << Myname << endl;
  112. // Wenn die Variablen aus der Ini nicht eingelesen werden können, steht nach dem Aufruf der Default-Wert in Test, EinPfad oder Test (In diesem Beispiel "NULL");
  113. SetConsoleTitle( "Mantas Aimer - Exorbital gut" );
  114. HWND hwnd = NULL;
  115. DWORD pid;
  116. HANDLE hProcess;
  117. DWORD clientbase;
  118. DWORD enginebase;
  119. int Triggerbase;
  120. int InCrosshair;
  121. int Bhopbase;
  122. double hyp;
  123. double delta_x;
  124. double delta_y;
  125. double delta_z;
  126. float yaw;
  127. float pitch;
  128. float roll;
  129. float backup;
  130. float pitchalt;
  131. int iTarget;
  132. cout << " Starte jetzt CS:S du Lappen." << endl;
  133. while(hwnd==NULL)
  134. {
  135. hwnd = FindWindow (NULL, "Counter-Strike Source");
  136. cout << " Es ist ja immer noch nicht an ! " << endl;
  137. Sleep(1000);
  138. }
  139. SetForegroundWindow (hwnd);
  140. while (!(GetForegroundWindow() == hwnd))
  141. {
  142. Sleep(100);
  143. }
  144. GetWindowThreadProcessId (hwnd, &pid);
  145. hProcess = OpenProcess (PROCESS_ALL_ACCESS, 0, pid);
  146. cout << " Isch hab ihn gefunden ;) " << endl;
  147. cout << " _____ _____ _ " << endl;
  148. cout << " | __|___ _ _ ___ ___ __ | __|_ _ ___| |_ " << endl;
  149. cout << " |__ | . | | | _| _| -_| | __| | | _| '_|" << endl;
  150. cout << " |_____|___|___|_| |___|___| |__| |___|___|_,_|" << endl;
  151. cout << "" << endl;
  152.  
  153. clientbase = GetModuleBaseExtern(pid, "client.dll");
  154. enginebase = GetModuleBaseExtern(pid, "engine.dll");
  155. while (true)
  156. {
  157. tempAdress = clientbase + RadarOffset;
  158. ReadProcessMemory(hProcess, (LPVOID)tempAdress, &BaseAdress, sizeof(BaseAdress), 0);
  159. tempAdress = BaseAdress + RadarOffsetB;
  160. ReadProcessMemory(hProcess, (LPVOID)tempAdress, &BaseAdress, sizeof(BaseAdress), 0);
  161.  
  162.  
  163. BYTE Playerteam[64] = {0};
  164. BYTE buffer[65*0x140];
  165.  
  166. tempAdress = BaseAdress;
  167. ReadProcessMemory(hProcess, (LPVOID)tempAdress, &buffer, 65*0x140, 0);
  168. for ( int i = 0; i <= 64; i++) // copying the relevant data in our extra structs.
  169. {
  170. memcpy(&players[i].team, &buffer[0x140*i+0x34], sizeof(players[i].team));
  171. memcpy(&players[i].name, &buffer[0x140*i+0x14], sizeof(players[i].name));
  172. memcpy(&players[i].x, &buffer[0x140*i+0x3C], sizeof(players[i].x));
  173. memcpy(&players[i].y, &buffer[0x140*i+0x40], sizeof(players[i].y));
  174. memcpy(&players[i].z, &buffer[0x140*i+0x44], sizeof(players[i].z));
  175. memcpy(&players[i].pitch, &buffer[0x140*i+0x48], sizeof(players[i].pitch));
  176. memcpy(&players[i].yaw, &buffer[0x140*i+0x4C], sizeof(players[i].yaw));
  177. memcpy(&players[i].roll, &buffer[0x140*i+0x50], sizeof(players[i].roll));
  178. }
  179.  
  180. isLow = FALSE; // we havent found right now our name
  181. for (int i = 0; i <= 64; i++) // identifying focusplayer
  182. {
  183. if (strcmp(Myname, players[i].name) == 0) // is that us?
  184. {
  185. if (!isLow) // first player found with that name?
  186. {
  187. isLow = TRUE; // yeeeaaah
  188. focusindex = i; // gotcha!
  189. break; // breaking up with you 
  190. }
  191. }
  192. }
  193.  
  194. for ( int iLoopCounter = 1; iLoopCounter <= 64; iLoopCounter++ && iLoopCounter != focusindex )
  195. {
  196.  
  197. iTarget = 3;
  198. float ergebnis0 = rechnen(players[0], players[focusindex]);
  199. float ergebnis1 = rechnen(players[1], players[focusindex]);
  200. float ergebnis2 = rechnen(players[2], players[focusindex]);
  201. float ergebnis3 = rechnen(players[3], players[focusindex]);
  202. if( ergebnis1 < ergebnis0 )
  203. {
  204. iTarget = iLoopCounter;
  205.  
  206. }
  207.  
  208. if(ergebnis2 < ergebnis1 )
  209. {
  210. iTarget = iLoopCounter;
  211.  
  212. }
  213. if(ergebnis2 < ergebnis1 )
  214. {
  215. iTarget = iLoopCounter;
  216.  
  217. }
  218. if(ergebnis3 < ergebnis2 )
  219. {
  220. iTarget = iLoopCounter;
  221.  
  222. }
  223.  
  224. }
  225.  
  226. /*Your xyz coordinates in the game
  227. Dim my_x As Single
  228. Dim my_y As Single
  229. Dim my_z As Single
  230.  
  231. //The enemy coordinates in game
  232. Dim nme_x As Single
  233. Dim nme_y As Single
  234. Dim nme_z As Single
  235.  
  236. //static testing values for aiming at
  237. //nme_x = -103.08
  238. //nme_y = 1526.4
  239. //nme_z = 96.03
  240. */
  241.  
  242.  
  243. //aimbot correction testing (height depth)
  244. players[iTarget].z = players[iTarget].z + 55;
  245. players[iTarget].x = players[iTarget].x - 10;
  246. players[iTarget].y = players[iTarget].y + 5;
  247. cout << iTarget << endl;
  248. Sleep(500);
  249.  
  250. //math shit
  251.  
  252.  
  253. roll = 0;
  254.  
  255.  
  256. delta_x = players[focusindex].x - players[iTarget].x;
  257. delta_y = players[focusindex].y - players[iTarget].y;
  258. delta_z = players[focusindex].z - players[iTarget].z;
  259. hyp = sqrt((delta_x * delta_x) + (delta_y * delta_y) + (delta_z * delta_z));
  260.  
  261. pitch = atan(delta_z / hyp) * 57.295779513082;
  262.  
  263. //sometimes a certain view angle goes to 0 and makes the aimbot go crazy, this will use the last non 0 integer so you can maintain a smooth non glitchy aimbot
  264. if (delta_x == 0)
  265. {
  266. delta_x = backup;
  267. }
  268.  
  269. //this saves your last view angle for backup in case it is 0 next time around
  270. backup = delta_x;
  271. yaw = atan(delta_y / delta_x) * 57.295779513082;
  272. if (delta_x > 0)
  273. {
  274. yaw = yaw + 180;
  275. }
  276. if (GetAsyncKeyState(VK_SPACE))
  277. {
  278. ReadProcessMemory (hProcess,(LPCVOID)(enginebase + 0x3EA964),&pitchalt, sizeof(pitchalt), NULL);
  279. cout << pitchalt << endl;
  280. Sleep(300);
  281. WriteProcessMemory (hProcess,(LPVOID)(enginebase + 0x3EA964), &pitch, sizeof(pitch), NULL);
  282. WriteProcessMemory (hProcess,(LPVOID)(enginebase + 0x3EA968), &yaw, sizeof(yaw), NULL);
  283. }
  284. Sleep(1);
  285. }
  286. Sleep(1);
  287. return 0;
  288. }


__________________

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