[Quake Live] OpenGL Wallhack

Status
Not open for further replies.

stealth93

Semi-Coder
Like the title says, a basic OpenGL wallhack for Quake Live, should work for any version of the game and also the PBSS returns black so no big deal there.
icon_e_smile.gif


To run just open up the script "qlh_openGL" and change the path in the HAXLIBS file to the path of your "qlh_openGL.so" library then run the script. Also you must make sure instantances of your firefox / iceweasel windows are closed before running.

Fedora users run this as root before the hack, thanks th0br0:
Code:
sysctl -w kernel.exec-shield=0

Questions / Comments appreciated!

Credits:
nixCoders, Sinner, kingOrgy
 

Attachments

  • qlh_openGL.tar.gz
    5.2 KB · Views: 314

zorro_ac

New member
how do I use it?

i get errors when i run:

make
cc -m32 -Wall -fPIC qlh_openGL.c -c -o qlh_openGL.o
In file included from qlh_openGL.c:2:
ghf/ghf.h:24:18: error: gelf.h: File or directory does not exist
In file included from qlh_openGL.c:2:
ghf/ghf.h:34: error: expected declaration specifiers or ‘...’ before ‘u_int32_t’
ghf/ghf.h:40: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
ghf/ghf.h:41: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
ghf/ghf.h:42: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
ghf/ghf.h:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
qlh_openGL.c:9:19: error: GL/gl.h: File or directory does not exist
qlh_openGL.c:10:20: error: GL/glu.h: File or directory does not exist
qlh_openGL.c:11:20: error: GL/glx.h: File or directory does not exist
qlh_openGL.c:15: error: expected ‘)’ before ‘target’
qlh_openGL.c:16: error: expected ‘)’ before ‘target’
qlh_openGL.c:18: error: expected ‘)’ before ‘mode’
qlh_openGL.c:19: error: expected ‘)’ before ‘mode’
qlh_openGL.c:21: error: expected ‘)’ before ‘x’
qlh_openGL.c:22: error: expected ‘)’ before ‘x’
qlh_openGL.c: In function ‘dlsym_hook’:
qlh_openGL.c:40: error: ‘orig_glBindTexture’ undeclared (first use in this function)
qlh_openGL.c:40: error: (Each undeclared identifier is reported only once
qlh_openGL.c:40: error: for each function it appears in.)
qlh_openGL.c:41: error: ‘hook_glBindTexture’ undeclared (first use in this function)
qlh_openGL.c:45: error: ‘orig_glDrawElements’ undeclared (first use in this function)
qlh_openGL.c:46: error: ‘hook_glDrawElements’ undeclared (first use in this function)
qlh_openGL.c:50: error: ‘orig_glReadPixels’ undeclared (first use in this function)
qlh_openGL.c:51: error: ‘hook_glReadPixels’ undeclared (first use in this function)
qlh_openGL.c: At top level:
qlh_openGL.c:57: error: expected ‘)’ before ‘target’
qlh_openGL.c:65: error: expected ‘)’ before ‘mode’
qlh_openGL.c:101: error: expected ‘)’ before ‘x’
make: *** [qlh_openGL.o] errors 1
 

hookey

New member
Problems on 64 bit. Sticky post mentioned not compatible with 64 bit... would it be a ton of work to get this working in 64 bit?
 

zorro_ac

New member
i have ubuntu 9.10 32bit and all dependecies you all mention in here but i still dont get it to work..?
 

zorro_ac

New member
oookey, libglu1-xorg-dev was missing, after installing that, the compile was done correct..

now to next noob question, how do I "enable" and "disable" this hack?
 

zorro_ac

New member
i get the Segmentation fault when I run the script..
what's the difference between this and that one in the sticky thread?
 

tesla

New member
hi,
fixed team mode wh.game type detection by hud's icons. any1 can test&confirm?
Code:
#define _GNU_SOURCE
#include "ghf/ghf.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <dlfcn.h>
#include <link.h>

#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glx.h>

typedef enum qlhGameType_s {
	MODE_NOTSET,
	MODE_NOTEAM,
	MODE_TDM,
	MODE_CTF,
	MODE_CA
} qlhGameType_t;
qlhGameType_t gametype;

unsigned long curBindTexture;

void (*orig_glBindTexture)(GLenum target, GLuint texture);
void hook_glBindTexture(GLenum target, GLuint texture);

void (*orig_glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
void hook_glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);

void (*orig_glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
void hook_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);

void *dlsym_hook(void *handle, const char *symbol);

typedef void*(*dlsym_t)(void *handle, const char *symbol);
dlsym_t orig_dlsym;

void __attribute__ ((constructor)) q2hack_init (void) 
{
	gametype=MODE_NOTSET; //it's not a good place to do it, isn't it ? :)
	orig_dlsym = detourFunction((void*)dlsym, (void*)&dlsym_hook);
}

void *dlsym_hook(void *handle, const char *symbol)
{
	void *result = orig_dlsym(handle, symbol);

	if(strstr(symbol, "glBindTexture"))
	{
		orig_glBindTexture = result;
		return hook_glBindTexture;
	}
	else if(strstr(symbol, "glDrawElements"))
	{
		orig_glDrawElements = result;
		return hook_glDrawElements;
	}
	else if(strstr(symbol, "glReadPixels"))
	{
		orig_glReadPixels = result;
		return hook_glReadPixels;
	}

	return result;
}

void hook_glBindTexture(GLenum target, GLuint texture)
{
	/* Thanks to Sinner at www.aimbots.net for pointing this out */
	asm ("movl %%esi, %0;" : "=r"(curBindTexture));

	orig_glBindTexture(target, texture);
}

void hook_glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
{
	int colortype;
	if(curBindTexture > 0x1000)
	{
//			if(strstr((char*)curBindTexture, "ui/assets/hud"))
//				printf("%s\n", (char*)curBindTexture);
// detect game type by hud icon 
		if(gametype==MODE_NOTSET) {
			if(strstr((char*)curBindTexture, "ui/assets/hud/tdm.tga")) 
			    gametype=MODE_TDM;
			else if(strstr((char*)curBindTexture, "ui/assets/hud/ctf.tga")) 
			    gametype=MODE_CTF;
			else if(strstr((char*)curBindTexture, "ui/assets/hud/ca.tga")) 
			    gametype=MODE_CA;
			else if(strstr((char*)curBindTexture, "ui/assets/hud/tourn.tga")) 
			    gametype=MODE_NOTEAM;
			else if(strstr((char*)curBindTexture, "ui/assets/hud/dm.tga")) 
			    gametype=MODE_NOTEAM;
		}

		if(strstr((char*)curBindTexture, "models/players") && !strstr((char*)curBindTexture, "icon"))
		{
			glEnable(GL_COLOR_MATERIAL);
			glDisableClientState(GL_COLOR_ARRAY);

			glDisable(GL_DEPTH_TEST);
			glDisable(GL_TEXTURE_2D);

			colortype=0;
			if(gametype!=MODE_NOTEAM) {
			    if(strstr((char*)curBindTexture, "/red.tga") || strstr((char*)curBindTexture, "/red_"))
				colortype=1;
			    else if(strstr((char*)curBindTexture, "/blue.tga") || strstr((char*)curBindTexture, "/blue_"))
				colortype=2;
			}
			
			switch(colortype){
				case 1:
					glColor3ub(255, 0, 0);
					break;
				case 2:
                                        glColor3ub(0, 0, 255);
                                        break;
  				default:
                                        glColor3ub(255,255, 0);
                                        break;
   			}				

			glDrawElements(mode, count, type, indices);

			glEnable(GL_DEPTH_TEST);
			glEnable(GL_TEXTURE_2D);

                        switch(colortype){
                                case 1: 
                                        glColor3ub(255, 0, 0);
                                        break;
                                case 2:
                                        glColor3ub(0, 0, 255);
                                        break;
                                default:
                                        glColor3ub(0, 255, 0);
                                        break;
                        }
			
			glEnable(GL_BLEND);
			glBlendFunc(GL_ONE, GL_ZERO);
		
			glDrawElements(mode, count, type, indices);

			glEnableClientState(GL_COLOR_MATERIAL);
			glDisable(GL_BLEND);
		}
	}
	
	orig_glDrawElements(mode, count, type, indices);
}

void hook_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
{
	/* Don't do anything for blank PBSS :o */
	orig_glReadPixels(x, y, width, height, format, type, pixels);
}
 

tesla

New member
hi again

base aimbot code added. no enemy sorting,no dead player detect, no visibility check etc ;] so it's useful for duel only.
since it's my first gl aim so i don't think i do much progress in short time with it. so here is source for you. oh and it looks like working properly only on debian ;] other distros got problems.

peace
 

Attachments

  • qlh_gl.tar.gz
    7 KB · Views: 116

opls

Member
undetected for ever?
and can u add some intructions how to use it?
whe i do "make Release=1" i got this error

"cc -m32 -Wall -fPIC qlh_openGL.c -c -o qlh_openGL.o
qlh_openGL.c:11:20: error: GL/glu.h: No such file or directory
make: *** [qlh_openGL.o] error 1"
 
Status
Not open for further replies.
Top