-
Автор темы
- #1
говорю сразу, здесь фулл код только самого шифта, саму систему эксплоитов и прочую хуйню я не реверсил
было сделано наспор для линея
из плюсов разве что хороший мувмент и не нужно мануалом нихуя фиксить
но есть способы сделать эксплоиты куда лучше.....
было сделано наспор для линея
C++:
#pragma once
void WriteUsercmd(bf_write* buf, CUserCmd* in, CUserCmd* out)
{
using WriteUserCmd_t = void(__fastcall*)(void*, CUserCmd*, CUserCmd*);
static auto Fn = (WriteUserCmd_t)csgo->Utils.FindPatternIDA(GetModuleHandleA(g_Modules[fnva1(hs::client_dll.s().c_str())]().c_str()),
hs::write_user_cmd.s().c_str());
__asm
{
mov ecx, buf
mov edx, in
push out
call Fn
add esp, 4
}
}
bool ShiftCmd(int* new_commands, int* backup_commands, void* ecx, int slot, bf_write* buf, int unk, bool real_cmd) {
static auto original_fn = g_pClientHook->GetOriginal <WriteUsercmdDeltaToBufferFn>(g_HookIndices[fnva1(hs::Hooked_WriteUsercmdDeltaToBuffer.s().c_str())]);
auto new_from = -1;
auto shift_amount = csgo->shift_amount;
csgo->shift_amount = 0;
auto commands = *new_commands;
auto shift_commands = std::clamp(commands + shift_amount, 1, 62);
*new_commands = shift_commands;
*backup_commands = 0;
auto next_cmd_nr = csgo->client_state->iChokedCommands + csgo->client_state->nLastOutgoingCommand + 1;
auto new_to = next_cmd_nr - commands + 1;
if (new_to <= next_cmd_nr) {
while (original_fn(ecx, slot, buf, new_from, new_to, true)) {
new_from = new_to++;
if (new_to > next_cmd_nr)
goto next_cmd;
}
return false;
}
next_cmd:
*(int*)((uintptr_t)interfaces.prediction + 0x1C) = 0;
*(int*)((uintptr_t)interfaces.prediction + 0xC) = -1;
auto fake_cmd = interfaces.input->GetUserCmd(slot, new_from);
if (!fake_cmd)
return true;
CUserCmd to_cmd;
CUserCmd from_cmd;
from_cmd = *fake_cmd;
to_cmd = from_cmd;
++to_cmd.command_number;
if (real_cmd) {
int iterator = 0;
do
{
interfaces.prediction->Update(
csgo->client_state->iDeltaTick, csgo->client_state->iDeltaTick > 0,
csgo->client_state->nLastCommandAck,
csgo->client_state->nLastOutgoingCommand + csgo->client_state->iChokedCommands);
to_cmd.buttons &= ~0xFFBEFFF9;
auto new_cmd = interfaces.input->GetUserCmd(to_cmd.command_number);
auto verified_cmd = interfaces.input->GetVerifiedUserCmd(to_cmd.command_number);
std::memcpy(new_cmd, &to_cmd, sizeof(CUserCmd));
std::memcpy(&verified_cmd->m_cmd, &to_cmd, sizeof(CUserCmd));
verified_cmd->m_crc = new_cmd->GetChecksum();
WriteUsercmd(buf, &to_cmd, &from_cmd);
++iterator;
if (iterator >= shift_amount) {
auto& out = csgo->packets.emplace_back();
out.is_outgoing = true;
out.is_used = false;
out.cmd_number = csgo->client_state->nLastOutgoingCommand + csgo->client_state->iChokedCommands + 1;
out.previous_command_number = 0;
}
else
{
auto net_chan = csgo->client_state->pNetChannel;
if (net_chan) {
++net_chan->iOutSequenceNr;
++net_chan->iChokedPackets;
}
++csgo->client_state->iChokedCommands;
}
from_cmd = to_cmd;
++to_cmd.command_number;
} while (iterator < shift_amount);
}
else {
to_cmd.tick_count = INT_MAX;
do {
WriteUsercmd(buf, &to_cmd, &from_cmd);
++to_cmd.command_number;
shift_amount--;
} while (shift_amount > 0);
}
}
bool __fastcall Hooked_WriteUsercmdDeltaToBuffer(void* ecx, void*, int slot, bf_write* buf, int from, int to, bool isnewcommand)
{
static auto original_fn = g_pClientHook->GetOriginal <WriteUsercmdDeltaToBufferFn>(g_HookIndices[fnva1(hs::Hooked_WriteUsercmdDeltaToBuffer.s().c_str())]);
if (!csgo->local
|| !csgo->is_connected
|| !csgo->is_local_alive
|| csgo->game_rules->IsFreezeTime()
|| csgo->local->HasGunGameImmunity()
|| csgo->local->GetFlags() & FL_FROZEN)
return original_fn(ecx, slot, buf, from, to, isnewcommand);
if (csgo->need_to_recharge || !csgo->shift_amount)
return original_fn(ecx, slot, buf, from, to, isnewcommand);
if (from != -1)
return true;
uintptr_t frame_ptr = 0;
__asm mov frame_ptr, ebp;
auto backup_commands = reinterpret_cast <int*> (frame_ptr + 0xFD8);
auto new_commands = reinterpret_cast <int*> (frame_ptr + 0xFDC);
return ShiftCmd(new_commands, backup_commands, ecx, slot, buf, -1, !csgo->break_lc);
}
из плюсов разве что хороший мувмент и не нужно мануалом нихуя фиксить
но есть способы сделать эксплоиты куда лучше.....
Последнее редактирование: