Join Date: Jun 2011
Posts: 490
User-Rating:
|
Hallo erstmal, Ich habe mir in den letzten Wochen mit einer Menge Hilfe von SilverFire einen externen Triggerbot und Bhop gecodet. Informationen für EnemyOnly wird aus dem Radarstruct abgelesen. Ich habe mal an einen externen Aimbot gedacht, doch ich weiß nicht sorecht etwas mit den Begriffen pitch, Yaw und Angle anzufangen. Ist ein externer aimbot ala SetCursorPos o.ä. mit Hilfe der Radarstruct Informationen überhaupt möglich und wenn ja, könnte mir einer einen Ansatz nennen? Hier mein Code: Credits: Manta und groooooße Credits zu SilverFire CPP Code: #include "stdafx.h" #include <windows.h> #include <iostream> #include <conio.h> #include <tlhelp32.h> #include <stdlib.h> #include <stdio.h> #include <string> #include <cstdlib> #include <sstream> #include <Windows.h> #include <cmath> #define DIKEYBOARD_L 0x0426 #pragma comment(lib, "Psapi.lib") using namespace std; char Myname[32] = "M a n t a R o c h e n"; DWORD LastShotTime = GetTickCount(); struct player // our playerstruct... { BYTE hp; // here the hp will be saved... char name[32]; // the name in chars... BYTE team; // the team... 0 = spec, 2 = t, 3 = ct float x; // x coord float y; // y... float z; // z... float pitch; // pitch float yaw; // yaw float angle; // angle } players[64] = {0}; // struct array to save the readout data - max 64 players float rechnen(player eins, player zwei) { float x; float y; float z; float ergebnis; x = eins.x - zwei.x; x = x * x; y = eins.y - zwei.y; y = y * y; z = eins.z - zwei.z; z = z * z; ergebnis = sqrt(x+y+z); //Gibt das ergebnis an main zurück return ergebnis; } bool isLow; int Triggerkey; int a = 30; int c = 600; int focusindex = 64; int oppositeTeam(int team) { if (team == 2) { return 3; } else if (team == 3) { return 2; } else { return 0; } } const int RadarOffset = 0x593334; int tempAdress, BaseAdress; BYTE inair; void m_jump()// press l { INPUT inp; memset(&inp,0,sizeof(inp)); inp.type=INPUT_KEYBOARD; inp.ki.wVk = 0; inp.ki.wScan = DIKEYBOARD_L; //DIKEYBOARD_SPACE; LMENU inp.ki.time = 0; inp.ki.dwExtraInfo = 0; inp.ki.dwFlags=KEYEVENTF_SCANCODE; SendInput(1,&inp,sizeof(inp)); Sleep(60); inp.type=INPUT_KEYBOARD; inp.ki.wVk = 0; inp.ki.time = 0; inp.ki.dwExtraInfo = 0; inp.ki.wScan = DIKEYBOARD_L; //DIKEYBOARD_SPACE; LMENU inp.ki.dwFlags=KEYEVENTF_SCANCODE|KEYEVENTF_KEYUP; SendInput(1,&inp,sizeof(inp)); } void m_click() { if (LastShotTime + a < GetTickCount()) { INPUT input; memset(&input,0,sizeof(INPUT)); input.mi.dx = 0; input.mi.dy = 0; input.mi.dwFlags = MOUSEEVENTF_LEFTDOWN; input.mi.dwExtraInfo = 0; input.mi.mouseData = 0; input.mi.time = 0; SendInput(1,&input,sizeof(input)); Sleep(3); memset(&input,0,sizeof(INPUT)); input.mi.dx = 0; input.mi.dy = 0; input.mi.dwExtraInfo = 0; input.mi.mouseData = 0; input.mi.time = 0; input.mi.dwFlags = MOUSEEVENTF_LEFTUP; SendInput(1,&input,sizeof(input)); LastShotTime = GetTickCount(); } } DWORD GetModuleBaseExtern(const DWORD dwProcessId, const char *szModuleName) { #ifdef _GMBE_CHECK_PARAMS_ if (!dwProcessID) || (!szModuleName) return 0; #endif HANDLE hSnap = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, dwProcessId); if (!hSnap) return 0; MODULEENTRY32 me; me.dwSize = sizeof(MODULEENTRY32); DWORD dwReturn = 0; if (Module32First(hSnap, &me)) { while (Module32Next(hSnap, &me)) { if (lstrcmpi(me.szModule, szModuleName) == 0) { dwReturn = (DWORD)me.modBaseAddr; break; } } } CloseHandle(hSnap); return dwReturn; } int main(int argc, char *argv[]) { char TriggerKey[500]; DWORD destSize; destSize=500; GetPrivateProfileString("trigger","Myname","NULL",Myname,destSize,"C://settings.ini"); cout << " Auszug deines Namens aus der Settings.ini : " << Myname << endl; GetPrivateProfileString("trigger","TriggerKey","NULL",TriggerKey,destSize,"C://settings.ini"); Triggerkey = atoi (TriggerKey); // 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"); SetConsoleTitle( "Mantas Trigger - Exorbital gut" ); HWND hwnd = NULL; DWORD pid; HANDLE hProcess; DWORD clientbase; int Gegner; int InCrosshair; cout << " Starte jetzt CS:S du Lappen." << endl; while(hwnd==NULL) { hwnd = FindWindow (NULL, "Counter-Strike Source"); cout << " Es ist ja immer noch nicht an ! " << endl; Sleep(3000); } GetWindowThreadProcessId (hwnd, &pid); hProcess = OpenProcess (PROCESS_VM_READ, FALSE, pid); cout << " Isch hab ihn gefunden ;) " << endl; cout << " _____ _____ _ " << endl; cout << " | __|___ _ _ ___ ___ __ | __|_ _ ___| |_ " << endl; cout << " |__ | . | | | _| _| -_| | __| | | _| '_|" << endl; cout << " |_____|___|___|_| |___|___| |__| |___|___|_,_|" << endl; cout << "" << endl; clientbase = GetModuleBaseExtern(pid, "client.dll"); while (true) { ReadProcessMemory (hProcess, (PVOID)(clientbase + 0x56A244), &Gegner, sizeof(Gegner), NULL); ReadProcessMemory (hProcess, (PVOID)(Gegner + 0x1448), &InCrosshair, sizeof(InCrosshair), NULL); ReadProcessMemory (hProcess, (PVOID)(clientbase + 0x5C20E0), &inair, sizeof(inair), NULL); tempAdress = clientbase + RadarOffset; ReadProcessMemory(hProcess, (LPVOID)tempAdress, &BaseAdress, sizeof(BaseAdress), 0); tempAdress = BaseAdress + 0x8; ReadProcessMemory(hProcess, (LPVOID)tempAdress, &BaseAdress, sizeof(BaseAdress), 0); BYTE Playerteam[64] = {0}; BYTE buffer[65*0x140]; tempAdress = BaseAdress; ReadProcessMemory(hProcess, (LPVOID)tempAdress, &buffer, 65*0x140, 0); for ( int i = 1; i<= 64; i++) // copying the relevant data in our extra structs. { memcpy(&players[i].team, &buffer[0x140*i+0x34], sizeof(players[i].team)); memcpy(&players[i].name, &buffer[0x140*i+0x14], sizeof(players[i].name)); memcpy(&players[i].angle, &buffer[0x140*i+0x50], sizeof(players[i].angle)); memcpy(&players[i].x, &buffer[0x140*i+0x3C], sizeof(players[i].x)); memcpy(&players[i].y, &buffer[0x140*i+0x40], sizeof(players[i].y)); memcpy(&players[i].z, &buffer[0x140*i+0x44], sizeof(players[i].z)); } isLow = FALSE; // we havent found right now our name for (int i = 0; i <= 64; i++) // identifying focusplayer { if (strcmp(Myname, players[i].name) == 0) // is that us? { if (!isLow) // first player found with that name? { isLow = TRUE; // yeeeaaah focusindex = i; // gotcha! break; // breaking up with you  } } } Sleep(1); if (InCrosshair > 0 && InCrosshair <= 64){ float ergebnis = rechnen(players[InCrosshair], players[focusindex]); if (ergebnis > 0 && ergebnis <= 75) { a = 10; c = 20; } if (ergebnis > 75 && ergebnis <= 200) { a = 15; c = 40; } if (ergebnis > 200 && ergebnis <= 400) { a = 10; c = 50; } if (ergebnis > 400 && ergebnis <= 600) { a = 8; c = 60; } if (ergebnis > 600) { a = 5; c = 70; } } if (GetAsyncKeyState(Triggerkey)) { Sleep(100); if (InCrosshair > 0 && InCrosshair <= 64) { if (oppositeTeam(players[InCrosshair].team) == players[focusindex].team) { Sleep (a); m_click(); Sleep(c); } } } if(GetKeyState(VK_LMENU) & 1<<15) { if(inair != 255) { m_jump(); Sleep(1); } } } Sleep(3); }
__________________
|