OldSchoolHack

Registrieren / Anmelden Deutsch

Phantom Dog Tag Finder

icon Thema: [Release] Phantom Dog Tag Finder

Anmeldungsdatum: Aug 2007

Beiträge: 8643

Benutzer-Bewertung:

199 positiv
33 negativ
Kategorie: Battlefield 4
Entwickler: typ1232

Beschreibung:
Notes:

- It always shows the position, also if someone else already took the box. Wait (up to 10 minutes I think) until it changes position.
- Using an overlay, so don't play in fullscreen.
- Close the tool with "Home" key.

CPP Code:
  1. #include "hacklib/Main.h"
  2. #include "hacklib/Drawer.h"
  3. #include "hacklib/WindowOverlay.h"
  4. #include "hacklib/ImplementMember.h"
  5. #include "hacklib/PatternScanner.h"
  6.  
  7.  
  8. namespace BF4
  9. {
  10.     class Cam
  11.     {
  12.         IMPLMEMBER(D3DXMATRIX, Transform, 0x40);
  13.         IMPLMEMBER(D3DXVECTOR3, ViewVec, 0x60);
  14.         IMPLMEMBER(D3DXVECTOR3, Pos, 0x70);
  15.         IMPLMEMBER(float, Fovy, 0xb4);
  16.         IMPLMEMBER(D3DXMATRIX, ViewMat, 0x260);
  17.     };
  18.     class CamHolder
  19.     {
  20.         IMPLMEMBER(Cam*, CamData, 0x60);
  21.     };
  22.     class MeshAsset
  23.     {
  24.         IMPLMEMBER(char*, Name, 0x10);
  25.     };
  26.     class StaticModelEntityData
  27.     {
  28.         IMPLMEMBER(MeshAsset*, Asset, 0x98);
  29.     };
  30.     class ClientStaticModelEntity
  31.     {
  32.         IMPLMEMBER(StaticModelEntityData*, Data, 0x30);
  33.         IMPLMEMBER(ClientStaticModelEntity*, Next, 0x40);
  34.         IMPLMEMBER(D3DXVECTOR3, Pos, 0x240);
  35.     };
  36. }
  37.  
  38. class BF4BoxMain : public hl::Main
  39. {
  40. public:
  41.     bool init() override;
  42.     bool step() override;
  43.  
  44. private:
  45.     hl::Drawer m_drawer;
  46.     hl::WindowOverlay m_overlay;
  47.  
  48.     struct Mems {
  49.         BF4::CamHolder *pCamHolder;
  50.     } m_mems;
  51.  
  52.     static const uintptr_t m_typeInfoStaticModel = 0x1427f8850;
  53. };
  54.  
  55. hl::StaticInit<BF4BoxMain> g_initObj;
  56.  
  57.  
  58. bool BF4BoxMain::init()
  59. {
  60.     uintptr_t sigCam = hl::FindPattern("\x84\xc0\x75\x00\x48\x8b\x0d\x00\x00\x00\x00\x48\x8b\x01\xff\x50\x00\xf3\x0f\x10\x0d", "xxx?xxx????xxxxx?xxxx");
  61.  
  62.     if (!sigCam) {
  63.         hl::MsgBox("Error", "Invalid patterns");
  64.         return false;
  65.     }
  66.  
  67.     auto camAdr = *(std::uint32_t*)(sigCam + 0x7);
  68.     m_mems.pCamHolder = *(BF4::CamHolder**)(camAdr + sigCam + 0x7 + 0x4);
  69.  
  70.     if (m_overlay.create() != hl::WindowOverlay::Error::Success)
  71.         return false;
  72.  
  73.     m_overlay.registerResetHandlers(std::bind(&hl::Drawer::OnLostDevice, &m_drawer), std::bind(&hl::Drawer::OnResetDevice, &m_drawer));
  74.     m_drawer.SetDevice(m_overlay.getDev());
  75.  
  76.     return true;
  77. }
  78.  
  79. bool BF4BoxMain::step()
  80. {
  81.     if (GetAsyncKeyState(VK_HOME) < 0)
  82.         return false;
  83.  
  84.     D3DXMATRIX viewMat, projMat;
  85.     D3DXVECTOR3 camPos;
  86.     auto pCamHolder = m_mems.pCamHolder;
  87.     if (pCamHolder)
  88.     {
  89.         auto pCam = pCamHolder->getCamData();
  90.         if (pCam)
  91.         {
  92.             viewMat = pCam->getViewMat();
  93.             viewMat._11 = -viewMat._11; // negate x
  94.             viewMat._12 = -viewMat._12;
  95.             viewMat._13 = -viewMat._13;
  96.             std::swap(viewMat._21, viewMat._31); // swap y and z
  97.             std::swap(viewMat._22, viewMat._32);
  98.             std::swap(viewMat._23, viewMat._33);
  99.  
  100.             camPos = D3DXVECTOR3(-pCam->getPos().x, pCam->getPos().z, pCam->getPos().y);
  101.  
  102.             D3DXMatrixPerspectiveFovRH(&projMat, pCam->getFovy(), (float)m_overlay.getWidth()/m_overlay.getHeight(), 0.1f, 100000.0f);
  103.  
  104.             m_drawer.Update(viewMat, projMat);
  105.         }
  106.     } else {
  107.         return true;
  108.     }
  109.  
  110.     auto pDevice = m_overlay.getDev();
  111.     if (pDevice->BeginScene() == D3D_OK)
  112.     {
  113.         m_overlay.clearRenderTarget();
  114.  
  115.         uintptr_t itEntity = m_typeInfoStaticModel + 0x60;
  116.         auto pEntity = (BF4::ClientStaticModelEntity*)(itEntity - 0x40);
  117.  
  118.         while (itEntity)
  119.         {
  120.             std::string name = pEntity->getData()->getAsset()->getName();
  121.  
  122.             if (name.find("glasswin") != std::string::npos ||
  123.                 name.find("ammobox") != std::string::npos ||
  124.                 name.find("rubble_01_large_snow") != std::string::npos ||
  125.                 name.find("officedivider") != std::string::npos)
  126.             {
  127.                 D3DXVECTOR3 worldPos = pEntity->getPos();
  128.                 worldPos = D3DXVECTOR3(-worldPos.x, worldPos.z, worldPos.y);
  129.                 D3DXVECTOR3 screenPos;
  130.                 m_drawer.Project(worldPos, screenPos);
  131.                 if (m_drawer.IsInfrontCam(screenPos))
  132.                 {
  133.                     float dist = D3DXVec3Length(&(camPos - worldPos));
  134.                     m_drawer.DrawCircle(screenPos.x, screenPos.y, 2000*(1/dist), 0xff00ff00);
  135.                     m_drawer.DrawCircle(screenPos.x, screenPos.y, 1500*(1/dist), 0xffff0000);
  136.                 }
  137.             }
  138.  
  139.             itEntity = *(uintptr_t*)itEntity;
  140.             pEntity = (BF4::ClientStaticModelEntity*)(itEntity - 0x40);
  141.         }
  142.  
  143.         pDevice->EndScene();
  144.         pDevice->Present(NULL, NULL, NULL, NULL);
  145.     }
  146.     std::this_thread::sleep_for(std::chrono::milliseconds(10));
  147.  
  148.     return true;
  149. }

Screenshots:
https://www.oldschoolhack.me/hackdata/screenshot/thumb/9206365868188d06ec0b116dd9640e1a.jpg https://www.oldschoolhack.me/hackdata/screenshot/thumb/746e06c6854faffa728e57f3f351f193.jpg https://www.oldschoolhack.me/hackdata/screenshot/thumb/42cb19ce0746a5aa967507ffc2283050.jpg

Download:
Phantom Dog Tag Finder

__________________

Hallo