-
Автор темы
- #1
Стреляет с такой же задержкой как и задержка моего развития, но даже это не остановило меня от того что бы вставить его в свою пасту, вторым триггером. Она кстати выйдет в ближайшее будущее.
Код:
#include <windows.h>[/SIZE][/SIZE][/CENTER]
[SIZE=5][SIZE=4]
[CENTER] #include <TlHelp32.h>
enum class _IN_CROSS_OBJECT : unsigned char
{
INC_CROSS_CLEAR, // == 0 (no body in the cross)
INC_TERRORIST, // and so on
INC_CT,
INC_HOSTAGE
};
unsigned int FindClientBase(_Out_ unsigned int& hl_pid)
{
HANDLE tlh_list;
unsigned int pid{ 0 }, cl_base{ 0 };
tlh_list = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, -1);
if (INVALID_HANDLE_VALUE == tlh_list) return 0;
PROCESSENTRY32W pe{ sizeof PROCESSENTRY32W };
Process32First(tlh_list, &pe);
do
{
if (lstrcmpiW(L"hl.exe", pe.szExeFile) == 0)
{
pid = pe.th32ProcessID;
break;
}
} while (Process32Next(tlh_list, &pe));
CloseHandle(tlh_list);
hl_pid = pid;
if (pid == 0)
return 0;
// search module:
tlh_list = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid);
if (INVALID_HANDLE_VALUE == tlh_list) return 0;
MODULEENTRY32W me{ sizeof MODULEENTRY32W };
Module32First(tlh_list, &me);
do
{
if (lstrcmpiW(L"client.dll", me.szModule) == 0)
{
cl_base = reinterpret_cast<unsigned int>( me.modBaseAddr);
break;
}
} while (Module32Next(tlh_list, &me));
CloseHandle(tlh_list);
return cl_base;
}
void main()
{
{ // wait for cstrike.
unsigned int in_cross{ 0 }, hl_pid{ 0 };
while (!(in_cross = FindClientBase(hl_pid)))
Sleep(10);
in_cross += 0x1211f4; // setup address
// i ve discovered it with CE:
// just set cursor at entities (mates/enemies/hostages) and scan per byte memory for exact values (only writeable)
// that used in enum above, finally you should find single 'green' address (placed inside module)
// then sub client.dll base from it, and you will have a required number to place instead of 0x1211f4
HANDLE hlprc = OpenProcess(PROCESS_VM_READ | PROCESS_VM_OPERATION, FALSE, hl_pid);
_IN_CROSS_OBJECT val;
SIZE_T io;
bool enabled = true;
while (1)
{
if (GetAsyncKeyState(VK_F1) & 0b1)
enabled = !enabled;
if(enabled)
if (ReadProcessMemory(hlprc, (const void*) in_cross, &val, sizeof(val), &io)
&& val != _IN_CROSS_OBJECT::INC_CROSS_CLEAR
&& val != _IN_CROSS_OBJECT::INC_HOSTAGE
&& val != _IN_CROSS_OBJECT::INC_TERRORIST)
{
// due to conditions abowe, fires into CTs only.
// NOTEs:
// 1) shot is delayed a bit, it triggered immediatly when mate/enemy info appers at the screen
// 2) cant see thru smoke
// 3) 'shots' even in spect mode (changes person actually)
mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
Sleep(10);
mouse_event(MOUSEEVENTF_ABSOLUTE | MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
}
else
{ // handle cant read - probably hl process exited
if (!FindClientBase(hl_pid) || !hl_pid)
{
break;
}
}
Sleep(10);
}
CloseHandle(hlprc);
MessageBox(0, L"Looks like HL.EXE process is not accessible anymore.\nExiting.",
L"Triggerbot info",
MB_OK | MB_ICONINFORMATION);
ExitProcess(0);
}
}