Anmeldungsdatum: Aug 2007
Beiträge: 1957
|
Kategorie: Other FPS Games Entwickler: can1357
Beschreibung: F1 Infinite Ammo F2 Infinite Suppressor F3 Infinite Fulton Extraction F4 Instant Health Refill F5 Perfect Aim (No spread, recoil, breath) F6 Triggerbot( Doesn't work from super long range. Sniper etc. Quite usefull for oneshot hs rifles when sneaking though. ) F7 +10.000 GMP F8 +100.000 GMP F9 +10.000 Basic Resources F10 +100.000 Basic Resources F11 Double all resources
Includes.h
TEXT Code: #pragma once #define _CRT_SECURE_NO_WARNINGS #include <Windows.h> #include <iostream> #include <string> #include <d3dx9.h> #include <d3d9.h> #pragma comment(lib, "d3d9.lib") #pragma comment(lib, "d3dx9.lib") using namespace std; #define QWORD UINT64 struct ResourceManager{ int ResourceArray[0xFFFF]; int GetResource(int iIndex){ return ResourceArray[iIndex] >> 1; } int SetResource(int iIndex, int iAmount){ return ResourceArray[iIndex] = iAmount << 1; } int MultiplyResource(int iIndex, int iMultiplier){ return ResourceArray[iIndex] *= iMultiplier; } int AddResource(int iIndex, int iAmount){ return ResourceArray[iIndex] += iAmount << 1; } }; enum TargetType{ None = 0, Enemy = 1, Ally = 2 }; struct CWeapon{ WORD Ammo; WORD Unknown; BYTE Suppressor; // 0xF - 0x0 void SetSuppressor(float SuppressorVal){ Suppressor = max((BYTE)((float)0xF * SuppressorVal),0); } float GetSuppressor(){ return (float)Suppressor / (float)0xF; } void SetAmmo(WORD w){ Ammo = max(w,0); } WORD GetAmmo(){ return Ammo; } }; class CEquipmentList{ public: CWeapon * GetFultonDevice(){ return (CWeapon*)((QWORD)this + 0x48A); } CWeapon * GetWeapon(int WepId){ return (CWeapon*)((QWORD)this + 0x3D8 + 0xC * WepId); } }; class CGeneralInformation{ public: D3DXVECTOR3 * GetFootPosition(){ return (D3DXVECTOR3*)((char*)this + 0xE0); } D3DXVECTOR3 * GetCameraPosition1(){ // ? return (D3DXVECTOR3*)((char*)this + 0x170); } D3DXVECTOR3 * GetCameraPosition2(){ // ? return (D3DXVECTOR3*)((char*)this + 0x1B0); } D3DXVECTOR2 * GetAngle1(){ // ? return (D3DXVECTOR2*)((char*)this + 0x168); } D3DXVECTOR2 * GetAngle2(){ // ? return (D3DXVECTOR2*)((char*)this + 0x160); } float * GetCurrentHealth(){ return (float*)((char*)this + 0x3C0); } float * GetMaxHealth(){ return (float*)((char*)this + 0x3C4); } }; class CCurrentWeaponInformation{ public: // breath, recoil, spread, probably aim assist }; class CEntity{ public: WORD GetTargetInCrosshair(){ // Works under all conditions return *(WORD*)(*(char**)((char*)this + 0xE0) + 0x5AC); } bool HasTargetInCrosshair(){ return GetTargetInCrosshair() != 0xFFFF; } CEquipmentList * GetEquipmentList(){ return *(CEquipmentList**)((char*)this + 0xE8); } CGeneralInformation * GetGeneralInformation(){ return *(CGeneralInformation**)((char*)this + 0x2A0); } CCurrentWeaponInformation * GetCurrentWeaponInformation(){ return *(CCurrentWeaponInformation**)((char*)this + 0x110); } bool IsValid(){ return this != nullptr && *(char**)((char*)this + 0xE0) != nullptr && *(char**)((char*)this + 0xE8) != nullptr && *(char**)((char*)this + 0x2A0) != nullptr&& *(char**)((char*)this + 0x110) != nullptr; } }; class CLocalPlayer{ public: CEntity * GetEntity(){ return *(CEntity**)((char*)this + 0x48); } bool IsValid(){ return this != nullptr && GetEntity()->IsValid(); } }; class CGameModule{ private: QWORD ModuleHandle; public: void * m_pSuppressor = nullptr; void * m_pAmmo = nullptr; void * m_pBreathRecoil = nullptr; void * m_pSpread = nullptr; DWORD * m_pGMP = nullptr; ResourceManager * m_pResourceMgr; char * m_pFultonTemp1; char * m_pFultonTemp2; TargetType (__fastcall*CompareTeams) (void * LocalPlayer, DWORD EntityID); ResourceManager * GetResouceManager(){ return m_pResourceMgr; } void SetFultonExtractionCount(char chFultonCount){ GetLocalPlayer()->GetEntity()->GetEquipmentList()->GetFultonDevice()->SetAmmo(chFultonCount); *m_pFultonTemp1 = chFultonCount; *m_pFultonTemp2 = chFultonCount; } char GetFultonExtractionCount(){ return GetLocalPlayer()->GetEntity()->GetEquipmentList()->GetFultonDevice()->GetAmmo(); } DWORD GetGmp(){ return *m_pGMP; } void SetGmp(DWORD iGMP){ *m_pGMP = iGMP; } void AddGmp(DWORD iGMP){ *m_pGMP += iGMP; } void MultiplyGmp(float iMultiplier){ *m_pGMP *= iMultiplier; } DWORD * GetGmpPointer(){ return m_pGMP; } CLocalPlayer * GetLocalPlayer(){ // dynamic // [ule+2963210]+308]+10 QWORD pLocalPlayer = *(QWORD*)(ModuleHandle + 0x2963210); if (pLocalPlayer == 0) return nullptr; pLocalPlayer = *(QWORD*)(pLocalPlayer + 0x308); if (pLocalPlayer == 0) return nullptr; pLocalPlayer = *(QWORD*)(pLocalPlayer + 0x10); return (CLocalPlayer*)pLocalPlayer; } void PatchAntiDebugger(){ DWORD Junk; void * pNtdllProtect = (char*)ModuleHandle + 0x4F47554; void * pDbgUiRemoteBreakin = GetProcAddress(GetModuleHandle("ntdll.dll"), "DbgUiRemoteBreakin"); void * pDbgUiIssueRemoteBreakin = GetProcAddress(GetModuleHandle("ntdll.dll"), "DbgUiIssueRemoteBreakin"); static char * arNtdllProtect = "\x90\x90"; static char * arDbgUiRemoteBreakin = "\x48\x83\xEC\x28\x65\x48\x8B\x04\x25\x30\x00\x00\x00\x48\x8B\x48\x60\x80\x79\x02\x00\x75\x0A\xF6\x04\x25\xD4\x02\xFE\x7F\x02\x74\x19\x65\x48\x8B\x04\x25\x30\x00\x00\x00\xF6\x80\xEE\x17\x00\x00\x20\x75\x07\xE8\x88\x86\xF5\xFF\xEB\x00\x33\xC9\xE8\x2F\xEA\xF4\xFF\xCC"; static char * arDbgUiIssueRemoteBreakin = "\x4C\x8B\xDC\x53\x48\x83\xEC\x70\x49\x8D\x43\xE8\x45\x33\xC9\x33\xD2\x49\x89\x43\xD8\x49\x8D\x43\x10\x45\x8D\x41\x02\x49\x89\x43\xD0\x49\x83\x63\xC8\x00\x48\x8D\x05\xC3\x11\x03\x00\x49\x89\x43\xC0\x49\x83\x63\xB8\x00\x49\xC7\x43\xB0\x00\x40\x00\x00\x49\x83\x63\xA8\x00\xE8\xD8\x75\xF5\xFF\x8B\xD8\x85\xC0\x78\x0D\x48\x8B\x8C\x24\x88\x00\x00\x00\xE8\x65\xA6\xF8\xFF\x8B\xC3\x48\x83\xC4\x70\x5B\xC3"; static int szNtdllProtect = 2; static int szDbgUiIssueRemoteBreakin = 99; static int szDbgUiRemoteBreakin = 66; VirtualProtect(pNtdllProtect, szNtdllProtect, PAGE_EXECUTE_READWRITE, &Junk); VirtualProtect(pDbgUiRemoteBreakin, szDbgUiRemoteBreakin, PAGE_EXECUTE_READWRITE, &Junk); VirtualProtect(pDbgUiIssueRemoteBreakin, szDbgUiIssueRemoteBreakin, PAGE_EXECUTE_READWRITE, &Junk); memcpy(pNtdllProtect, arNtdllProtect, szNtdllProtect); memcpy(pDbgUiRemoteBreakin, arDbgUiRemoteBreakin, szDbgUiRemoteBreakin); memcpy(pDbgUiIssueRemoteBreakin, arDbgUiIssueRemoteBreakin, szDbgUiIssueRemoteBreakin); } CGameModule(QWORD ModuleHandle){ this->ModuleHandle = ModuleHandle; CompareTeams = (TargetType(__fastcall*)(void *, DWORD))(ModuleHandle + 0x3D47F10); m_pResourceMgr = (ResourceManager*)(ModuleHandle + 0x2ad713c); m_pSuppressor = (QWORD*)(ModuleHandle + 0x3C54B53); m_pAmmo = (QWORD*)(ModuleHandle + 0x3C546FF); m_pBreathRecoil = (QWORD*)(ModuleHandle + 0x3D4D861); m_pSpread = (QWORD*)(ModuleHandle + 0x3D4B945); m_pGMP = (DWORD*)(ModuleHandle + 0x2AC9C98); m_pFultonTemp1 = (char*)(ModuleHandle + 0x2940CAA); m_pFultonTemp2 = (char*)(ModuleHandle + 0x2AC752A); } }
main.cpp
TEXT Code: #include "Includes.h" unsigned long getMilliseconds(){ SYSTEMTIME st; GetSystemTime(&st); return st.wMilliseconds + st.wSecond * 1000 + st.wMinute * 60 * 1000 + st.wHour * 60 * 60 * 1000; } char arSuppresserPatch[] = "\x90\x90\x90\x90"; char arAmmoPatch[] = "\x90\x90\x90\x90\x90"; char arBreathRecoilPatch[] = "\x90\x90\x90\x90\x90\x90\x90"; char arSpreadPatch[] = "\x90\x90\x90\x90\x90"; void ExchByte(void* pDst, void* pSrc, int iSize){ DWORD Junk; VirtualProtect(pDst, iSize, PAGE_EXECUTE_READWRITE, &Junk); char * bcOldMem = new char[iSize]; memcpy(bcOldMem, pDst, iSize); memcpy(pDst, pSrc, iSize); memcpy(pSrc, bcOldMem, iSize); delete[] bcOldMem; } CGameModule * pEngine; bool bTriggerbotOn = false; bool bMessageSaidOnce = false; bool bLockExtractionCount = false; bool bInfiniteHealth = false; char chFultonCount = 0x0; void PrintHelp(){ cout << "Hotkeys:" << endl; cout << "F1 => Toggle Infinite Ammo" << endl; cout << "F2 => Toggle Infinite Suppressor" << endl; cout << "F3 => Toggle Infinite Fulton Extraction" << endl; cout << "F4 => Toggle Instant Health Refill" << endl; cout << "F5 => Toggle Perfect Aim" << endl; cout << "F6 => Triggerbot" << endl; cout << "F7 => +10.000 GMP" << endl; cout << "F8 => +100.000 GMP" << endl; cout << "F9 => +10.000 Basic Resources" << endl; cout << "F10 => +100.000 Basic Resources" << endl; cout << "F11 => All resources x 2" << endl; } DWORD WINAPI main(LPVOID lpParam) { AllocConsole(); freopen("conin$", "r", stdin); freopen("conout$", "w", stdout); long KeyLock = 0; pEngine = new CGameModule((QWORD)GetModuleHandleA("mgsvtpp.exe")); pEngine->PatchAntiDebugger(); PrintHelp(); while (true){ if (!pEngine->GetLocalPlayer()->IsValid()){ if (!bMessageSaidOnce && (bMessageSaidOnce = true)) cout << "Waiting for the player to spawn." << endl; Sleep(100); continue; } bMessageSaidOnce = false; if (bLockExtractionCount){ if (chFultonCount > pEngine->GetFultonExtractionCount()){ pEngine->SetFultonExtractionCount(chFultonCount); } chFultonCount = pEngine->GetFultonExtractionCount(); } else chFultonCount = 0x0; if (bTriggerbotOn && (GetAsyncKeyState(VK_RBUTTON) & 0x8000)){ if (pEngine->GetLocalPlayer()->GetEntity()->HasTargetInCrosshair() && pEngine->CompareTeams(pEngine->GetLocalPlayer(), pEngine->GetLocalPlayer()->GetEntity()->GetTargetInCrosshair()) == TargetType::Enemy){ Sleep(25); mouse_event(MOUSEEVENTF_LEFTDOWN, NULL, NULL, NULL, NULL); Sleep(5); mouse_event(MOUSEEVENTF_LEFTUP, NULL, NULL, NULL, NULL); } } if (bInfiniteHealth){ *pEngine->GetLocalPlayer()->GetEntity()->GetGeneralInformation()->GetCurrentHealth() = *pEngine->GetLocalPlayer()->GetEntity()->GetGeneralInformation()->GetMaxHealth(); } if (KeyLock + 250 < getMilliseconds()){ KeyLock = getMilliseconds(); if (GetAsyncKeyState(VK_F1) & 0x8000){ ExchByte(pEngine->m_pAmmo, arAmmoPatch, 5); cout << "Infinite Ammo: "; cout << ((arAmmoPatch[0] == '\x90') ? "OFF." : "ON.") << endl; } else if(GetAsyncKeyState(VK_F2) & 0x8000){ ExchByte(pEngine->m_pSuppressor, arSuppresserPatch, 4); cout << "Infinite Suppressor: "; cout << ((arSuppresserPatch[0] == '\x90') ? "OFF." : "ON.") << endl; } else if (GetAsyncKeyState(VK_F3) & 0x8000){ bLockExtractionCount = !bLockExtractionCount; cout << "Infinite Fulton Extraction: " << (bLockExtractionCount ? "ON" : "OFF") << endl; } else if (GetAsyncKeyState(VK_F4) & 0x8000){ bInfiniteHealth = !bInfiniteHealth; cout << "Instant Health Refill: " << (bInfiniteHealth ? "ON" : "OFF") << endl; } else if (GetAsyncKeyState(VK_F5) & 0x8000){ cout << "Perfect Aim: "; ExchByte(pEngine->m_pBreathRecoil, arBreathRecoilPatch, 7); ExchByte(pEngine->m_pSpread, arSpreadPatch, 5); cout << ((arSpreadPatch[0] == '\x90') ? "OFF." : "ON.") << endl; } else if (GetAsyncKeyState(VK_F6) & 0x8000){ bTriggerbotOn = !bTriggerbotOn; cout << "Triggerbot: " << (bTriggerbotOn ? "ON" : "OFF") << endl; } else if (GetAsyncKeyState(VK_F7) & 0x8000){ cout << "Added 10.000 GMP" << endl; pEngine->AddGmp(10 * 1000); } else if (GetAsyncKeyState(VK_F8) & 0x8000){ cout << "Added 100.000 GMP" << endl; pEngine->AddGmp(100 * 1000); } else if (GetAsyncKeyState(VK_F9) & 0x8000){ cout << "Added 10.000 Basic Resources" << endl; for (int i = 0; i < 5; i++) pEngine->GetResouceManager()->AddResource(i, 10 * 1000); } else if (GetAsyncKeyState(VK_F10) & 0x8000){ cout << "Added 100.000 Basic Resources" << endl; for (int i = 0; i < 5; i++) pEngine->GetResouceManager()->AddResource(i, 100 * 1000); } else if (GetAsyncKeyState(VK_F11) & 0x8000){ cout << "All Resources multiplied by 2" << endl; for (int i = 0; i <= 50; i++) pEngine->GetResouceManager()->MultiplyResource(i, 2); } else{ KeyLock = 0; } } } return 0; } int WINAPI DllMain( HINSTANCE hInstance2, DWORD fdwReason, LPVOID lpvReserved ) { DisableThreadLibraryCalls(hInstance2); if (fdwReason == DLL_PROCESS_ATTACH) { CreateThread(NULL, 0, &main, NULL, 0, NULL); } return 1; }
Download: Metal Gear Solid V Multihack V2 |