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: // guter code.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung. // OFFSETS EXTRA RAUSGENOMMEN!!!! #include "stdafx.h" #include <windows.h> #include <iostream> #include <tlhelp32.h> #include <Windows.h> #define DIKEYBOARD_L 0x0426 HWND hwnd = NULL; DWORD pid = NULL; HANDLE hProcess = NULL; DWORD enginebase = NULL; DWORD clientbase = NULL; DWORD dwOverlayBase = NULL; DWORD dwVGui = NULL; DWORD tempadd = NULL; const DWORD drawrendermodelsOffset = const DWORD drawParticleOffset = const DWORD drawOtherModelsOffset = const DWORD cheatBypassOffset = const DWORD triggerbotOffset = const DWORD triggerbotOffsetB = const DWORD BhopOffsetA = const DWORD ChatOffsetA = //client.dll //[1=sayall, 2=sayteam] const DWORD ChatOffsetB = const DWORD OverlayOffset = // GameOverlayRenderer.dll+77D8C // Overlay 4byte const DWORD MenuOffset = // vguimatsurface.dll int cheatBypassAn = 1; int cheatBypassAus = 0; int wireframeAn = 2; int wireframeAus = 1; int smokeAn = 0; int smokeAus = 1; int boxesAn = 1; int boxesAus = 0; int triggerbotAn = 1; int triggerbotAus = 0 ; int inair = 0; int iChat = 0; bool bMenu = false; bool bOverlay = true; 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; } void m_jump() { INPUT inp; memset(&inp,0,sizeof(inp)); inp.type=INPUT_KEYBOARD; inp.ki.wVk = 76; inp.ki.wScan = DIKEYBOARD_L; //L Taste drücken inp.ki.time = 0; inp.ki.dwExtraInfo = 0; inp.ki.dwFlags=KEYEVENTF_SCANCODE; SendInput(1,&inp,sizeof(inp)); inp.type=INPUT_KEYBOARD; inp.ki.wVk = 76; inp.ki.time = 0; inp.ki.dwExtraInfo = 0; inp.ki.wScan = DIKEYBOARD_L; // L Taste loslassen inp.ki.dwFlags=KEYEVENTF_SCANCODE|KEYEVENTF_KEYUP; SendInput(1,&inp,sizeof(inp)); } ///// Wichtig: ingame bind L +jump, da der cheat L spammt zum Springen und das nur, wenn du leertaste gedrückt hältst int main(int argc, char *argv[]) { SetConsoleTitle( "blabla" ); std::cout << " Starte jetzt CS:S du Lappen." << std::endl; std::cout << std::endl; hwnd = FindWindow (NULL, "Counter-Strike Source"); while(hwnd==NULL) { hwnd = FindWindow (NULL, "Counter-Strike Source"); std::cout << " Es ist ja immer noch nicht an ! " << std::endl; Sleep(3000); } GetWindowThreadProcessId (hwnd, &pid); hProcess = OpenProcess (PROCESS_ALL_ACCESS, 0, pid); enginebase = GetModuleBaseExtern(pid, "engine.dll"); clientbase = GetModuleBaseExtern(pid, "client.dll"); dwOverlayBase = GetModuleBaseExtern(pid, "GameOverlayRenderer.dll"); dwVGui = GetModuleBaseExtern(pid, "vguimatsurface.dll"); /////////////-------------Debug Kontrolle--------------////////////////////////// std::cout << " hwnd : " << hwnd << std::endl; std::cout << " Prozess-ID : " << pid << std::endl; std::cout << " Prozess-Handle : " << hProcess << std::endl; std::cout << std::endl; std::cout << " Client Module Entry : " << clientbase << std::endl; std::cout << " Engine Module Entry : " << enginebase << std::endl; std::cout << " Overlay Module Entry : " << dwOverlayBase << std::endl; std::cout << " VGui Module Entry : " << dwVGui << std::endl; std::cout << std::endl; std::cout << " Drücke einfügen um die Befehle zu bypassen " << std::endl; std::cout << " Drücke entfernen um die Bypasses rückgängig zu machen " << std::endl; std::cout << " Drücke F1 um NoSmoke anzumachen " << std::endl; std::cout << " Drücke F2 um NoSmoke Auszumachen " << std::endl; std::cout << " Drücke F3 um Boxes Anzumachen " << std::endl; std::cout << " Drücke F4 um Boxes Auszumachen " << std::endl; //////////--------------------------------------------///////////////////////// while (true) { if (GetAsyncKeyState(VK_INSERT)) { WriteProcessMemory (hProcess, (LPVOID)(enginebase + cheatBypassOffset), &cheatBypassAn, 4, NULL); Sleep(10); WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawOtherModelsOffset), &wireframeAn, 2, NULL); Sleep(10); std::cout << " sv_cheats Bypass On | Wireframe Wh On " << std::endl; } if (GetAsyncKeyState(VK_DELETE)) { WriteProcessMemory (hProcess, (LPVOID)(enginebase + cheatBypassOffset), &cheatBypassAus, 4, NULL); Sleep(10); WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawOtherModelsOffset), &wireframeAus, 2, NULL); Sleep(10); std::cout << " Bypasses Off " << std::endl; } if (GetAsyncKeyState(VK_F1)) { WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawParticleOffset), &smokeAn, 4, NULL); Sleep(10); std::cout << " Smoke ON " << std::endl; } if (GetAsyncKeyState(VK_F2)) { WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawParticleOffset), &smokeAus, 4, NULL); Sleep(10); std::cout << " Smoke OFF " << std::endl; } if (GetAsyncKeyState(VK_F3)) { WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawrendermodelsOffset), &boxesAn, 4, NULL); Sleep(10); std::cout << " Boxes On " << std::endl; } if (GetAsyncKeyState(VK_F4)) { WriteProcessMemory (hProcess, (LPVOID)(clientbase + drawrendermodelsOffset), &boxesAus, 4, NULL); Sleep(10); std::cout << " Boxes On " << std::endl; } if (GetAsyncKeyState(VK_F5)) { ReadProcessMemory (hProcess, (LPVOID)(clientbase + triggerbotOffset + triggerbotOffsetB), &triggerbotAn, 4, NULL); Sleep(10); std::cout << " triggerbot on " << std::endl; } if (GetAsyncKeyState(VK_F6)) { ReadProcessMemory (hProcess, (LPVOID)(clientbase + triggerbotOffset + triggerbotOffsetB), &triggerbotAus, 4, NULL); Sleep(10); std::cout << " triggerbot off " << std::endl; } /////----------------------- menü, chat, overlay------------/////////////////////////////////// ReadProcessMemory(hProcess, (LPVOID)(clientbase + ChatOffsetA), &tempadd, sizeof(tempadd), 0); tempadd += ChatOffsetB; ReadProcessMemory(hProcess, (LPVOID)(tempadd), &iChat, 4, 0); ReadProcessMemory(hProcess, (LPVOID)(dwOverlayBase + OverlayOffset), &bOverlay, 4, 0); ReadProcessMemory(hProcess, (LPVOID)(dwVGui + MenuOffset), &bMenu, 4, 0); ///////////---------------------Bhop-----------------///////////////////////////////////////////// ReadProcessMemory (hProcess, (LPVOID)(clientbase + BhopOffsetA), &inair, 1, NULL); ////////////------------------------------------------------/////////////////////////////////////// if (GetAsyncKeyState(VK_SPACE) && inair != 255 && iChat == 0 && !bMenu && !bOverlay) { m_jump(); Sleep(1); } Sleep (1); } return 0; }
|