Исходник Сурсы внешнего чита external

Начинающий
Начинающий
Статус
Оффлайн
Регистрация
14 Мар 2019
Сообщения
52
Реакции
9
Создаем main.cpp
туда Пишем :

Код:
Expand Collapse Copy
#include windows.h
#include <urlmon.h>
#include <cstdlib>
#include "FindPattern.h"
using namespace std::basic_filebuf;
#pragma comment(lib, "urlmon.lib")
//подключение библиотек


затем :
int dwlocalPlayer;
int dwForceJump;
int iHealth;
int fFlags;



далее

byte redGlowFixer[6];
byte greenGlowFixer[6];
byte blueGlowFixer[6];
byte alphaGlowFixer[6];
byte occGlowFixer[4];

void* colorGlowFixerOffset;
void* alphaGlowFixerOffset;
void* occGlowFixerOffset;

#define bDormant 0xED
#define PLAYER_ON_FLOOR (1 << 0)
#define PLAYER_CROUCHED 0x6
#define M_RADPI 57.295779513082

typedef struct Vector {
float x, y, z;
}Vector;

struct GlowBase
{
float r;
float g;
float b;
float a;
uint8_t unk1[16];
bool m_bRenderWhenOccluded;
bool m_bRenderWhenUnoccluded;
bool m_bFullBloom;
};

struct BoneBase {
byte padding[12];
float x;
byte padding2[12];
float y;
byte padding3[12];
float z;

};




PlayerStruct Players[33];
NBQMemory mem;




DWORD dwPID = 0;
DWORD dwClient = 0;
DWORD dwEngine = 0;
HANDLE hProcess;
DWORD clientbase;
#define PI 3.14159265359

float degreesToRadians(float angle_in_degrees) {
return angle_in_degrees * (PI / 180.0);
}

bool EntIsVisible(HANDLE csgo, DWORD ent, DWORD local)
{
int mask = mem.ReadMemory<int>(csgo, ent + SpottedByMask);
int PBASE = mem.ReadMemory<int>(csgo, local + 0x64) - 1;
return (mask & (1 << PBASE)) > 0;
}

float getFOV(float *src, Vector flLocalAngles)
{
float back[2];
float smoothdiff[2];
float srcangle[2];
srcangle[0] = src[0];
srcangle[1] = src[1];
srcangle[2] = src[2];



return back[1];
}

потом

void entRefresher(HANDLE csgo,DWORD client) {
while (true) {
localPlayer = mem.ReadMemory<DWORD>(csgo, client + dwlocalPlayer);
DWORD localTeam = mem.ReadMemory<DWORD>(csgo, localPlayer + iTeamNum);
localHealth = mem.ReadMemory<int>(csgo, localPlayer + iHealth);
enemyteam = localTeam == 0x3 ? 0x2 : 0x3;
if (isopenedaim) {
Players[0].Pos = mem.ReadMemory<Vector>(csgo, localPlayer + vecOrigin);
Vector VecView = mem.ReadMemory<Vector>(csgo, localPlayer + vecViewOffset);
Players[0].Pos.x += VecView.x;
Players[0].Pos.y += VecView.y;
Players[0].Pos.z += VecView.z;
}
if (!localPlayer && !localHealth)
continue;

for (int i = 1; i < 33; i++) {
DWORD player = mem.ReadMemory<int>(csgo, client + entityList + ((i-1) * 0x10));
if (player == 0 && player == localPlayer) {
Players.Ignore = true;
continue;
}
else {
Players.Ignore = false;
}

Players.Dormant = mem.ReadMemory<bool>(csgo, player + bDormant);

if (Players.Dormant) {
Players.Ignore = true;
continue;
}
else {
Players.Ignore = false;
}

DWORD playerteam = mem.ReadMemory<DWORD>(csgo, player + iTeamNum);

Players.Team = playerteam;

if (playerteam == localTeam) {
Players.Ignore = true;
continue;
}
else {
Players.Ignore = false;
}

Players.Ignore = false;
Players.Base = player;
if (isopenedaim) {
DWORD playerbonemtrix = mem.ReadMemory<DWORD>(csgo, player + boneMatrix);
BoneBase temp = mem.ReadMemory<BoneBase>(csgo, (playerbonemtrix + (0x30 * 8)));
Players.Pos.x = temp.x;
Players.Pos.y = temp.y;
Players.Pos.z = temp.z;
Players.Spotted = EntIsVisible(csgo, player, localPlayer);
}
Players.Health = mem.ReadMemory<int>(csgo, player + iHealth);
Players.GlowIndex = mem.ReadMemory<int>(csgo, player + glowIndex);
}
std::this_thread::sleep_for(std::chrono::milliseconds(5));
}

float scrToWorld(float X, float Y, float Z, float eX, float eY, float eZ)
{
return(sqrtf((eX - X) * (eX - X) + (eY - Y) * (eY - Y) + (eZ - Z) * (eZ - Z)));
}

void CalcAngle(Vector src, Vector dst, float *angles)
{
float Delta[3] = { (src.x - dst.x), (src.y - dst.y), (src.z - dst.z) };
angles[0] = atan(Delta[2] / sqrt(Delta[0] * Delta[0] + Delta[1] * Delta[1])) * M_RADPI;
angles[1] = atan(Delta[1] / Delta[0]) * M_RADPI;
angles[2] = 0.0f;
if (Delta[0] >= 0.0) angles[1] += 180.0f;


}

float CloseEnt()
{

float fLowest = 1000000, TMP;
int iIndex = -1;
Vector localAngles = mem.ReadMemory<Vector>(hProcess, clientbase + clientAngle);

for (int i = 1; i < 33; i++)
{

TMP = scrToWorld(Players[0].Pos.x, Players[0].Pos.y, Players[0].Pos.z, Players.Pos.x, Players.Pos.y, Players.Pos.z);
CalcAngle(Players[0].Pos, Players.Pos, Players.Angle);
Players.FOV = abs(getFOV(Players.Angle, localAngles));

if (TMP < fLowest && !Players.Ignore && Players.Base != localPlayer && Players.Health > 0 && Players.Spotted && Players.FOV < aimfov)
{
fLowest = TMP;
iIndex = i;
}

return iIndex;
}

float AngleDifference(float* ViewAngles, float* TargetAngles, float Distance)
{
float pitch = sin(degreesToRadians(ViewAngles[0] - TargetAngles[0]));
float yaw = sin(degreesToRadians(ViewAngles[1] - TargetAngles[1]));
return sqrt(powf(pitch, 2.0) + powf(yaw, 2.0));
}

void retryAim(HANDLE csgo, DWORD client, DWORD engine) {
isopenedaim = true;
while (true) {
if (isopenedaim && localPlayer && localHealth) {
std::this_thread::sleep_for(std::chrono::milliseconds(2));
static Vector oldAimPunch;
static Vector fixedAngle;
if (GetAsyncKeyState(key1) & 0x8000) {
Ind = CloseEnt();
if (Players[lasttarget].Spotted && (Players[lasttarget].Team == enemyteam) && !Players[lasttarget].Dormant && Players[lasttarget].Health > 0) {
Ind = lasttarget;
}
if (Ind != -1) {
float smoothed[2];
Vector aimpunch = mem.ReadMemory<Vector>(csgo, localPlayer + aimPunch);
aimpunch.x = aimpunch.x * 2.f;
aimpunch.y = aimpunch.y * 2.f;
Vector localAngles = mem.ReadMemory<Vector>(csgo, clientbase + clientAngle);
CalcAngle(Players[0].Pos, Players[Ind].Pos, Players[Ind].Angle);
Smooth(aimpunch.x, aimpunch.y, Players[Ind].Angle, smoothed, localAngles, aimsmooth);
mem.WriteMemory<float>(csgo, clientbase + clientAngle, smoothed[0]);
mem.WriteMemory<float>(csgo, clientbase + clientAngle + 0x4, smoothed[1]);
lasttarget = Ind;

}
{
void glowPlayer(HANDLE csgo, DWORD client, GlowBase entity, DWORD entityadr, int Health) {
entity.r = 1.f - (float)(Health / 100.f);
entity.g = (float)(Health / 100.f);
entity.b = 0.f;
entity.a = 1.f;
entity.m_bRenderWhenOccluded = true;
mem.WriteMemory<GlowBase>(csgo, entityadr + 0x4, entity);
}

void FixedGlowPlayer(HANDLE csgo, DWORD client, GlowBase entity, DWORD entityadr) {
entity.r = 1.f;
entity.g = 0.f;
entity.b = 0.f;
entity.a = 1.f;
entity.m_bRenderWhenOccluded = true;
mem.WriteMemory<GlowBase>(csgo, entityadr + 0x4, entity);
}

void FixedGlowPlayerClose(HANDLE csgo, DWORD client, GlowBase entity, DWORD entityadr) {
entity.r = 0.f;
entity.g = 0.f;
entity.b = 0.f;
entity.a = 0.f;
entity.m_bRenderWhenOccluded = false;
mem.WriteMemory<GlowBase>(csgo, entityadr + 0x4, entity);


}

HWND hWnd;
void retryHotkeys(HANDLE csgo, DWORD client) {
isopened = true;
while (true) {
if (GetAsyncKeyState(VK_NUMPAD8) & 0x8000) {
isopened = !isopened;
if (isopened) {
COORD coord;
coord.X = 0;
coord.Y = lineint;
lineint++;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);

else
{
COORD coord;
coord.X = 0;
coord.Y = lineint;
lineint++;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);

}
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}



if ((GetAsyncKeyState(VK_NUMPAD4) & 0x8000) || (GetAsyncKeyState(VK_END) & 0x8000)) {
exit(0);
}
if (GetAsyncKeyState(VK_NUMPAD5) & 0x8000) {
if (showwnd) {
hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_HIDE);
showwnd = false;
}
else {
hWnd = GetConsoleWindow();
ShowWindow(hWnd, SW_SHOW);
showwnd = true;
}
std::this_thread::sleep_for(std::chrono::milliseconds(200));
}
std::this_thread::sleep_for(std::chrono::milliseconds(100));
}
}

затем

void retryGlowFixed(HANDLE csgo, DWORD client) {

while (true) {
if (isopened && localPlayer) {
DWORD GlowObject = mem.ReadMemory<DWORD>(csgo, client + dwGlowObjectManager);
for (int i = 1; i < 33; i++) {
if (Players.Team != enemyteam) {
GlowBase entity = mem.ReadMemory<GlowBase>(csgo, GlowObject + ((Players.GlowIndex) * 0x38) + 0x4);
DWORD entityadr = GlowObject + ((Players.GlowIndex) * 0x38);
FixedGlowPlayerClose(csgo, client, entity, entityadr);
}

for (int i = 1; i < 33; i++) {
if (!Players.Ignore) {
GlowBase entity = mem.ReadMemory<GlowBase>(csgo, GlowObject + ((Players.GlowIndex) * 0x38) + 0x4);
DWORD entityadr = GlowObject + ((Players.GlowIndex) * 0x38);
FixedGlowPlayer(csgo, client, entity, entityadr);


}
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
}


void retryGlow(HANDLE csgo, DWORD client) {

while (true) {
if (isopened) {
DWORD GlowObject = mem.ReadMemory<DWORD>(csgo, client + dwGlowObjectManager);
for (int i = 1; i < 33; i++) {
if (!Players.Ignore) {
GlowBase entity = mem.ReadMemory<GlowBase>(csgo, GlowObject + ((Players.GlowIndex) * 0x38) + 0x4);
DWORD entityadr = GlowObject + ((Players.GlowIndex) * 0x38);
glowPlayer(csgo, client, entity, entityadr, Players.Health);


}
std::this_thread::sleep_for(std::chrono::milliseconds(100));

}





BOOL WINAPI ConsoleHandler(DWORD dwType)
{
switch (dwType) {
case CTRL_CLOSE_EVENT:
case CTRL_LOGOFF_EVENT:
case CTRL_SHUTDOWN_EVENT:
recover();
Sleep(1000);
return TRUE;
default:
break;
}
return FALSE;
}

bool catched = false;
bool catchedfov = false;
bool catchedglow = false;
bool repeat = false;
bool repeatfov = false;
bool repeatglow = false;
std::string input1;

HWND console = GetConsoleWindow();
RECT r;



fseek(infile, 0, SEEK_END);
long filesize = ftell(infile);
char* buf = new char[filesize + 1];
fseek(infile, 0, SEEK_SET);
fread(buf, 1, filesize, infile);
fclose(infile);
buf[filesize] = '\0';
std::stringstream ss;
ss.str(buf);
delete[] buf;
Json::Value netvars;
ss >> netvars;
MoveWindow(console, r.left, r.top, 650, 500, TRUE);
SetConsoleTitle(title);
_setmode(_fileno(stdout), _O_U16TEXT);


_setmode(_fileno(stdout), _O_U16TEXT);

do {
dwPID = mem.GetProcessIdByProcessName("csgo.exe");
Sleep(100);
} while (!dwPID);

do {
dwClient = mem.GetModuleBaseAddress(dwPID, "client_panorama.dll");
Sleep(100);

ReadProcessMemory(hProcess, (LPVOID)((DWORD)colorGlowFixerOffset + 11), greenGlowFixer, sizeof(greenGlowFixer), 0);
ReadProcessMemory(hProcess, (LPVOID)((DWORD)colorGlowFixerOffset + 22), blueGlowFixer, sizeof(blueGlowFixer), 0);
system("cls");
FILE* infile1 = fopen("Yougame.json", "r");
if (infile1 != NULL) {
fseek(infile1, 0, SEEK_END);
long filesize1 = ftell(infile1);
char* buf1 = new char[filesize1 + 1];
fseek(infile1, 0, SEEK_SET);
fread(buf1, 1, filesize1, infile1);
fclose(infile1);
buf1[filesize1] = '\0';
std::stringstream ss1;
ss1.str(buf1);
delete[] buf1;

// удачи тебе ;)
}
 
Последнее редактирование:
Ща заценим
 
это што
 
Кста,прикольная штука.НО хз где её юзать,легит почти вымер:roflanPominki:
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Найс DeniZeus шоли?
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Да просто похоже пипец как сильно
 
Не понимаю я создал maim.cpp вписал код что дальше? можно по поддробней?
 
Вх есть там и БХОП ?
 
1585370641109.png

Я хуею,почему так?
 
Назад
Сверху Снизу