[RELEASE][pyDeveloper]PythonHook/Detour-Class

09/10/2013 19:19 [uLow]Beni#1
Don't download if you think python is only a snake !

Hey,
I made a epic class, which makes many things easier.

I have no desire to describe it in this thread, everything is commented ;)

examples for usage:
- easy getting hp of target vid
- handling OnRecvQuest for instant close
- ...
Snippet from DaRealFreaks bot:
Code:
	
def HookOpenTargetBoard():
	game.GameWindow.SetPCTargetBoard = HookedOpenTargetBoard
	chat.AppendChat(1, "OpenTargetBoard wurde erfolgreich gehooked.")		

def HookedOpenTargetBoard(self, vid, name):
	global OldOpenTargetBoard
	global BuffVid
	BuffVid = vid
	chat.AppendChat(1, "Du hast " + name + " anvisiert.")
	OldOpenTargetBoard(self, vid, name)
	
def UnHookOpenTargetBoard():
	global OldOpenTargetBoard
	global BuffVid
	BuffVid = 0
	game.GameWindow.SetPCTargetBoard = OldOpenTargetBoard
	chat.AppendChat(1, "OpenTargetBoard Hook wurde erfolgreich entfernt.")
With my pyDetour:
Code:
import pyDetour
....
def HookedOpenTargetBoard(data):
	global BuffVid
	BuffVid = data.args[1]
        name = data.args[2]
	chat.AppendChat(1, "Du hast " + name+ " anvisiert.")
	data() # call the original function, with *data.args as argument(s)

detour = pyDetour.detour(game.GameWindow.SetPCTargetBoard, HookedOpenTargetBoard)

HookOpenTargetBoard=detour.attach
UnHookOpenTargetBoard=detour.deatch
AND there are no ugly globals (OldOpenTargetBoard)

In the past (i was a noob), i always searched for this class, but i was to unskilled for writing it myself.

pyDetour3: "import" works again for GF clients :)

Have fun.
09/10/2013 19:21 Alinsmekerash91#2
Virus Total pls :)
09/10/2013 19:25 Hemoglobien²10#3
Quote:
Originally Posted by Alinsmekerash91 View Post
Virus Total pls :)
it´s .py Files you don´t need an Vt:, lg.


!Beni! super Sache ich danke dir für das Teilen mit uns, lg.
09/10/2013 22:29 Agresive3#4
can u explain what this does?
09/11/2013 00:53 .Sexeh.#5
For me nothing. I just get log succ (he lazy to write success).

1
09/11/2013 00:55 battlefox#6
THANK YOU!
09/11/2013 17:29 [uLow]Beni#7
Quote:
Originally Posted by .Sexeh. View Post
For me nothing. I just get log succ (he lazy to write success).

1
yes, this is the victim, it's only a example how this works ;)

#reported, i wrote it's only for py-Developer.
09/11/2013 18:55 Mi4uric3#8
53x gedownloaded, 5 Personen haben was geschrieben, da wird man ja als Entwickler richtig motiviert ;D
09/11/2013 19:41 osama18#9
Was ist den das für ein Hack ??
09/11/2013 19:45 [uLow]Beni#10
Naja 80% laden das sofort runter nur weil das in der Hack Sektion ist ^^.

Quote:
Originally Posted by osama18 View Post
Was ist den das für ein Hack ??
Kein Hack, nur ein Python Modul, welches sonst auch in keine andere Sektion passt.
09/11/2013 19:45 xP3NG3Rx#11
Hmm, thank you.
09/12/2013 18:27 [uLow]Beni#12
#updated
now you can hook a complete class.
it's awesome :)
09/12/2013 19:12 Hemoglobien²10#13
Quote:
Originally Posted by !Beni! View Post
#updated
now you can hook a complete class.
it's awesome :)

ui und noch einmal dankeschön fürs teilen, lg.
09/15/2013 22:32 P3enguin#14
hammer Teil !Beni! suchte sowas schon ne ganze Weile.

Thx haste ;)
09/19/2013 10:49 toniginone#15
Can somebody please explain the use of this hack?