[Coding] OpenGL Hook + CS 1.6 Wallhack

Reply

OpenGL Hook + CS 1.6 Wallhack
Old 16th August 2013, 12:33 PM #1
Hacker Supreme

Reflex_Rampage's Avatar

Join Date: Aug 2013

Location: 216.185.109.66:10077

Posts: 226

OpenGL Hook + CS 1.6 Wallhack

Since many people are searching for an ogl hook, i thought about releasing this one

I included a DrawBox function so you have an idea how to draw in opengl. I also added XQZ wallhack, for the old cs 1.6: Protocol 48, Build 4554. I tested this hook in other games like assault cube and it works fine, but it doesn’t work in the newest cs 1.6 steam version.

I didn’t find a working opengl hook for the newest 1.6 in some time, but godly’s engine hook is working for the steam version, so if you want to draw and code other stuff in the newest cs 1.6 you can download his base, just google it

I’m not really good with opengl, but if you need some help feel free to PM me, idk how to code wallhack or nosky for assault cube, but i have some snippets to code nosmoke and nosky for old cs

Code:

#pragma comment(lib,”OpenGL32.lib”) #pragma comment(lib,”GLu32.lib”) #include #include #include #include #include #include typedef void ( APIENTRY *glBegin_t )( GLenum ); typedef void ( APIENTRY *glEnd_t )( void ); typedef void ( APIENTRY *glClear_t )( GLbitfield ); typedef void ( APIENTRY *glVertex3fv_t )( const GLfloat *v ); typedef void ( APIENTRY *glVertex3f_t )( GLfloat x, GLfloat y, GLfloat z ); typedef void ( APIENTRY *glEnable_t )( GLenum ); glBegin_t pglBegin = NULL; glEnd_t pglEnd = NULL; glClear_t pglClear = NULL; glVertex3fv_t pglVertex3fv = NULL; glVertex3f_t pglVertex3f = NULL; glEnable_t pglEnable = NULL; bool wallhack = false; void DrawBox(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) { glBegin(GL_QUADS); glVertex3f(x,y,z); glVertex3f(x+width,y,z); glVertex3f(x+width,y+height,z); glVertex3f(x,y+height,z); glEnd(); } //================================================================================= // ###################### Hooked OpenGL Functions ################################# //================================================================================= void APIENTRY Hooked_glBegin( GLenum mode ) { if (GetAsyncKeyState(VK_F1)&1) wallhack = !wallhack; if (wallhack) { if(mode == GL_TRIANGLES || mode == GL_TRIANGLE_STRIP || mode == GL_TRIANGLE_FAN) glDepthRange(0, 0.5); else glDepthRange(0.5, 1); } if(pglBegin) (*pglBegin)(mode); } void APIENTRY Hooked_glEnd( void ) { (*pglEnd)(); } void APIENTRY Hooked_glVertex3fv( GLfloat *v ) { (*pglVertex3fv)( v ); } void APIENTRY Hooked_glVertex3f ( GLfloat x, GLfloat y, GLfloat z ) { (*pglVertex3f)( x, y, z ); } void APIENTRY Hooked_glClear( GLbitfield mask ) { (*pglClear)( mask ); } void APIENTRY Hooked_glEnable (GLenum cap) { /*if (GetAsyncKeyState(VK_F2)) DrawBox(200,100,0,50,30);*/ (*pglEnable)(cap); } void *DetourFunc( BYTE *src, const BYTE *dst, const int len ) { BYTE *jmp = (BYTE*)malloc( len + 5 ); DWORD dwback; VirtualProtect( src, len, PAGE_READWRITE, &dwback ); memcpy( jmp, src, len ); jmp += len; jmp[0] = 0xE9; *(DWORD*)( jmp + 1 ) = (DWORD)( src + len – jmp ) – 5; src[0] = 0xE9; *(DWORD*)( src + 1 ) = (DWORD)( dst – src ) – 5; VirtualProtect( src, len, dwback, &dwback ); return ( jmp – len ); } void HookGL() { HMODULE hOpenGL = GetModuleHandle(“opengl32.dll”); pglVertex3fv = (glVertex3fv_t)DetourFunc( (LPBYTE)GetProcAddress(hOpenGL, “glVertex3fv” ), (LPBYTE)&Hooked_glVertex3fv, 6 ); pglVertex3f = (glVertex3f_t)DetourFunc( (LPBYTE)GetProcAddress(hOpenGL, “glVertex3f” ), (LPBYTE)&Hooked_glVertex3f, 6); pglBegin = (glBegin_t)DetourFunc( (LPBYTE)GetProcAddress(hOpenGL, “glBegin”),(LPBYTE)&Hooked_glBegin,6); pglEnd = (glEnd_t)DetourFunc( (LPBYTE)GetProcAddress(hOpenGL, “glEnd” ), (LPBYTE)&Hooked_glEnd, 6 ); pglClear = (glClear_t)DetourFunc( (LPBYTE)GetProcAddress(hOpenGL, “glClear” ), (LPBYTE)&Hooked_glClear, 7 ); pglEnable = (glEnable_t)DetourFunc( (LPBYTE)GetProcAddress(hOpenGL, “glEnable”), (LPBYTE)&Hooked_glEnable, 6); } DWORD WINAPI dwMainThread( LPVOID ) { HookGL(); return TRUE; } BOOL WINAPI DllMain( HINSTANCE hInstDLL,DWORD dwReason,LPVOID lpReserved ) { if( dwReason==DLL_PROCESS_ATTACH ) CreateThread(0,0,dwMainThread,0,0,0); return TRUE; }

You can copy and paste this, you shouldn’t get any errors. Just make sure you use multi-byte character set and compile it as a dll.

Credits: Panzer, Blade, Random Pastebin, WiTH

happy hacking

Last edited by Daax; 17th August 2013 at 07:08 AM. Reason: Added credits.

Reflex_Rampage is offline Reply With Quote

Ad Blockers — creating paywalls and destroying free content since 2006

We strive to provide all our services for free and not interrupt your visit with intrusive advertisements or restrictions — support us by disabling your ad blocker or whitelisting our site.

Ad Blockers — creating paywalls and destroying free content since 2006

We strive to provide all our services for free and not interrupt your visit with intrusive advertisements or restrictions — support us by disabling your ad blocker or whitelisting our site.

Old 17th August 2013, 05:39 AM #2
n00bie

TOWERZ's Avatar

Join Date: Jul 2013

Posts: 9

Reputation: 5
Rep Power: 0
TOWERZ has a near-average in quality posting ability

In what program to complie it?

TOWERZ is offline Reply With Quote

Old 17th August 2013, 06:34 AM #3

witchcraft and fuckery

Adam's Avatar

Join Date: Oct 2012

Location: Australia

Posts: 2,343

Points: 112,113, Level: 48

Level up: 29%, 3,587 Points needed

Nice copy & paste, you didn’t even change it besides from removing credits from the original post.

Adam is offline Reply With Quote

Old 17th August 2013, 07:24 AM #5

p

Nov's Avatar

Join Date: Nov 2008

Location: WRLOD CITSEN

Posts: 1,249

Points: 36,634, Level: 29

Level up: 14%, 2,166 Points needed

This isn’t VAC’d? I’d be surprised :S

__________________

Nov is offline Reply With Quote
Reply

Ad Blockers — creating paywalls and destroying free content since 2006

We strive to provide all our services for free and not interrupt your visit with intrusive advertisements or restrictions — support us by disabling your ad blocker or whitelisting our site.

Ad Blockers — creating paywalls and destroying free content since 2006

We strive to provide all our services for free and not interrupt your visit with intrusive advertisements or restrictions — support us by disabling your ad blocker or whitelisting our site.

All times are GMT. The time now is 09:55 AM.

Source

Leave a Reply

Your email address will not be published. Required fields are marked *