-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathcsgo11.cpp
77 lines (56 loc) · 1.42 KB
/
csgo11.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
const int m_fFlags = 0x104;
const int dwLocalPlayer = 0xDEA964;
const int dwForceJump = 0x52BBD50;
//client.dll
int CLIENT;
// engine.dll+80CD98
int CMD;
bool bhop = false;
DWORD CALLBACK thread_func(LPVOID data) {
CLIENT = (int)GetModuleHandle("client.dll");
CMD = (int)GetModuleHandle("engine.dll") + 0x80CD98;
while (1) {
if (strcmp((char*)CMD, "bhop on") == 0) {
bhop = true;
}
if (strcmp((char*)CMD, "bhop off") == 0) {
bhop = false;
}
if (!bhop) {
continue;
}
void* local_player = *(void**)(CLIENT + dwLocalPlayer);
int flag = 0;
flag = *(int*)((int)local_player + m_fFlags);
int buffer = 0;
if (flag & 1) {
buffer = 5;
}
else {
buffer = 4;
}
// 4 5
if (GetAsyncKeyState(VK_SPACE) & 0x8000) {
*(int*)(CLIENT + dwForceJump) = buffer;
}
}
}
void run() {
CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)(thread_func), NULL, 0, NULL);
}
BOOL APIENTRY DllMain( HMODULE hModule,
DWORD ul_reason_for_call,
LPVOID lpReserved
)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
run();
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}