Foro de elhacker.net

Programación => Ingeniería Inversa => Mensaje iniciado por: str0nghack en 3 Septiembre 2018, 20:52 pm



Título: Ayuda con external glow hack CS.GO
Publicado por: str0nghack en 3 Septiembre 2018, 20:52 pm
Estoy leyendo algunos codigos por github pero no entiendo esta parte que os enseñare mas abajo
Código:
glow_currentPlayerGlowIndex * 0x34) + 0x4

por que multiplica por 0x34? y entonces suma 0x4? son offsets que hay que sacar con el cheat engine? o son simplemente bytes de la estructura? no lo entiendo...

Código:
#include <Windows.h>
#include "ProcMem.h"
#include "Offsets.h"

#pragma region Settings
//Stealth
bool StealthActive = true;

//Glow
bool GlowActive = true;
bool GlowTeamCheck = true;
float GlowTerroristRed = 1.f;
float GlowTerroristGreen = 0.f;
float GlowTerroristBlue = 0.f;
float GlowTerroristAlpha = 1.f;

float GlowCounterTerroristRed = 0.f;
float GlowCounterTerroristGreen = 0.f;
float GlowCounterTerroristBlue = 1.f;
float GlowCounterTerroristAlpha = 1.f;
#pragma endregion

ProcMem proM;
DWORD Client;

int main();
void GlowEsp();
void Stealth();

int main()
{
proM.Process("csgo.exe");
Sleep(200);
Client = proM.Module("client.dll");
if (StealthActive)
Stealth();

while (true)
{
if (GlowActive)
GlowEsp();
}
}

void Stealth()
{
HWND Stealth;
AllocConsole();
Stealth = FindWindowA("ConsoleWindowClass", NULL);
ShowWindow(Stealth, 0);
}


void GlowEsp()
{
DWORD glow_LocalBase = proM.Read<DWORD>(Client + m_dwLocalPlayerIndex);
DWORD glow_Pointer = proM.Read<DWORD>(Client + m_dwGlowObject);
int MyTeamID = proM.Read<int>(glow_LocalBase + m_iTeamNum);

for (int i = 0; i < 32; i++)
{
int glow_currentPlayer = proM.Read<int>(Client + m_dwEntityList + i * 0x10);
bool glow_currentPlayerDormant = proM.Read<bool>(glow_currentPlayer + m_bDormant);
int glow_currentPlayerGlowIndex = proM.Read<int>(glow_currentPlayer + m_iGlowIndex);
int EntityBaseTeamID = proM.Read<int>(glow_currentPlayer + m_iTeamNum);

if (glow_currentPlayerDormant == 1 || EntityBaseTeamID == 0)
continue;
else
if (MyTeamID != EntityBaseTeamID || GlowTeamCheck == false)
switch (EntityBaseTeamID) // 1 GoTV; 2 T; 3 CT
{
case 2:
proM.Write<float>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x4)), GlowTerroristRed);
proM.Write<float>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x8)), GlowTerroristGreen);
proM.Write<float>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0xC)), GlowTerroristBlue);
proM.Write<float>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x10)), GlowTerroristAlpha);
proM.Write<BOOL>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x24)), true);
proM.Write<BOOL>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x25)), false);
break;
case 3:
proM.Write<float>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x4)), GlowCounterTerroristRed);
proM.Write<float>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x8)), GlowCounterTerroristGreen);
proM.Write<float>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0xC)), GlowCounterTerroristBlue);
proM.Write<float>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x10)), GlowCounterTerroristAlpha);
proM.Write<BOOL>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x24)), true);
proM.Write<BOOL>((glow_Pointer + ((glow_currentPlayerGlowIndex * 0x34) + 0x25)), false);
break;
}
}
}

el codigo completo aqui

https://github.com/Kyrr0/GlowESP/blob/master/main.cpp


Título: Re: Ayuda con external glow hack CS.GO
Publicado por: BloodSharp en 5 Septiembre 2018, 04:15 am
Estoy leyendo algunos codigos por github pero no entiendo esta parte que os enseñare mas abajo
Código
  1. glow_currentPlayerGlowIndex * 0x34) + 0x4

por que multiplica por 0x34? y entonces suma 0x4? son offsets que hay que sacar con el cheat engine? o son simplemente bytes de la estructura? no lo entiendo...

Debe ser una sub-estructura basada en la lista de entidades, entonces el 0x34 (52 bytes) debe ser el tamaño que debe recorrer la estructura/clase de entidades para pasar a la siguiente...

No tengo mucha idea de Source Engine dado a que mucha atención nunca le presté, pero en GoldSrc cada entidad (cl_entity_s es el nombre de la estructura) tiene una grán cantidad de sub-estructuras que especifican el renderizado, los estados y algunas otras cosas más...


B#