Re: Api hooking
Posted: Tue Nov 10, 2009 12:20 am
You got something for the detour procedure also? Sounds interesting cause I had an interest in looking into that at one point be never did really.
Here it is: http://www.purebasic.fr/english/viewtop ... =7&t=39881SFSxOI wrote:You got something for the detour procedure also? Sounds interesting cause I had an interest in looking into that at one point be never did really.
Code: Select all
Procedure WriteHex(LogFile.l,*buf.l,l.l)
Protected i.l
Protected h.l
Protected Text.s
Protected Hex.s
If l
i=0
Repeat
h=PeekB(*buf+i)&$ff
If (h<32) Or (h>127)
Text+"ยท"
Else
Text+Chr(h)
EndIf
Hex+" "+RSet(Hex(h),2,"0")
i+1
If (i&$F=0) Or (i=l)
If i>$10
CompilerIf #LogDate
WriteString(Logfile," ")
CompilerElse
WriteString(Logfile," ")
CompilerEndIf
EndIf
WriteStringN(LogFile,"|"+LSet(Text,16)+"|"+Hex)
Text=""
Hex=""
EndIf
Until i=l
Else
WriteStringN(LogFile,"{}")
EndIf
EndProcedure
Procedure NewSend(s.l,*buf,len.l,flags.l)
Protected Result.l=CallFunctionFast(Adr_Send,s.l,*buf,len.l,flags.l)
If LogFile
CompilerIf #LogDate
WriteString(LogFile,LogDate+" > ")
CompilerElse
WriteString(LogFile,"-> ")
CompilerEndIf
WriteHex(LogFile,*buf,result)
FlushFileBuffers(LogFile)
EndIf
ProcedureReturn Result
EndProcedure
WPE Pro can do that. But i don't like it very much.Michael Vogel wrote: But I found no free software (NetMon, SmartSnif, Whireshark) which is able to see the local packets (127.0.0.1) - only commercial products (e.g. CommView) work fine.![]()
Also using a virtual Loopback interface does not work in all cases![]()
And WPE Pro doesn't like me, Rapid Sh!$.. tells me how many people are just doenloading this file nowThorium wrote:WPE Pro can do that. But i don't like it very much.