• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Page 1 of 5 123 ... LastLast
    Results 1 to 10 of 41
    1. #1
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      WiTH's Avatar
      Join Date
      May 2012
      Posts
      62
      Thanks (-->)
      1
      Thanks (<--)
      10

      Post [Source] OpenGL Hook + Counter Strike WallHack

      John Kittz
      Since many people are searching for an opengl 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 Anyways here is the opengl hook

      Code:
      #pragma comment(lib,"OpenGL32.lib")
      #pragma comment(lib,"GLu32.lib")
      
      #include <windows.h>
      #include <string>
      #include <tlhelp32.h>
      #include <iostream>
      #include <gl\gl.h>
      #include <gl\glu.h>
      
      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, hf
      Credits: Panzer/Blade/Random Pastebin

    2. Thanks N/A, Fleep, jamesst20, NTvalk, Solaire, Liduen, Cybersploit, artania thanked for this post
    3. #2
      Global Moderator
      give me my colorz back
      FeelsBadMan
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Quote Originally Posted by WiTH View Post
      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 <windows.h>
      #include <string>
      #include <tlhelp32.h>
      #include <iostream>
      #include <gl\gl.h>
      #include <gl\glu.h>
      
      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, hf
      Credits: Panzer/Blade/Random Pastebin


      Wow this is really useful. Will it be possible to hook opengl and make Wallhack + Chams with this?
      Last edited by [GH]Rake; 05-14-2016 at 09:43 AM. Reason: opengl hook

    4. #3
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      WiTH's Avatar
      Join Date
      May 2012
      Posts
      62
      Thanks (-->)
      1
      Thanks (<--)
      10

      opengl hooking

      Quote Originally Posted by till0sch97 View Post
      Wow this is really useful. Will it be possible to make Wallhack + Chams with this?
      i think it's possible, i saw chams for cs 1.6 some time ago but i never tried to code chams but i already coded wallhack

    5. #4
      Global Moderator
      give me my colorz back
      FeelsBadMan
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Quote Originally Posted by WiTH View Post
      i think it's possible, i saw chams for cs 1.6 some time ago but i never tried to code chams but i already coded wallhack
      Which hook would I have to use for Chams? I mean which function?

    6. #5
      Global Moderator
      give me my colorz back
      FeelsBadMan
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      I guess I'll need OpenGL SDK. From where do I get it?

    7. #6
      Jr.Coder
      Learning to hack games!
       
      Feeling Normal
       
      WiTH's Avatar
      Join Date
      May 2012
      Posts
      62
      Thanks (-->)
      1
      Thanks (<--)
      10
      Quote Originally Posted by till0sch97 View Post
      I guess I'll need OpenGL SDK. From where do I get it?
      You don't need any SDK, you can copy paste the code and compile your dll

    8. #7
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491
      Quote Originally Posted by till0sch97 View Post
      I guess I'll need OpenGL SDK. From where do I get it?
      The headers and libraries come with standard template library
      [Source] OpenGL Hook + Counter Strike WallHack

    9. #8
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491
      Quote Originally Posted by till0sch97 View Post
      Which hook would I have to use for Chams? I mean which function?
      glDrawElements
      [Source] OpenGL Hook + Counter Strike WallHack

    10. #9
      Global Moderator
      give me my colorz back
      FeelsBadMan
       
      Coding
       
      till0sch's Avatar
      Join Date
      Oct 2012
      Location
      Germany.
      Posts
      1,168
      Thanks (-->)
      179
      Thanks (<--)
      340
      Quote Originally Posted by c5 View Post
      glDrawElements
      Okay, but how do I hook it? Just the same thing like with glDrawElements and then DetourFunction? Is there any Model Logger or do I have to make my own?

    11. #10
      Kim Kong Trasher
      I don't have status.
       
      Raging
       
      c5's Avatar
      Join Date
      Jul 2012
      Location
      Mankei Iland
      Posts
      1,221
      Thanks (-->)
      97
      Thanks (<--)
      491
      Cheats'n'Trainers
      Quote Originally Posted by till0sch97 View Post
      Okay, but how do I hook it? Just the same thing like with glDrawElements and then DetourFunction? Is there any Model Logger or do I have to make my own?
      Yes, you can do it the same way
      [Source] OpenGL Hook + Counter Strike WallHack

    Page 1 of 5 123 ... LastLast

    Similar Game Hacker Threads

    1. [Source Code] Hi guys this is a simple source code wallhack for counter strike global
      By Clash's in forum CS:GO Hacks
      Replies: 12
      Last Post: 02-04-2016, 05:05 PM
    2. [Tut] - Counter-Strike Source Bhop Script
      By Helios in forum Hack Tutorials
      Replies: 9
      Last Post: 12-26-2015, 10:43 AM
    3. [Source Code] Counter-Strike : Source | EndScene Pointer [Shaderapidx9.dll]
      By Simon-Benyo in forum Tutorials and Snippets
      Replies: 2
      Last Post: 10-05-2014, 12:05 PM
    4. Counter-Strike Source Simple Radar Hack
      By Cristlol in forum Hack Tutorials
      Replies: 9
      Last Post: 02-13-2014, 10:52 AM
    5. Counter-Strike Source Multihack Trainer
      By B0M8AY in forum Counter-Strike: Source Hacks
      Replies: 15
      Last Post: 02-20-2013, 07:55 AM

    Tags for this Thread