mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: May 2003
Posts: 7
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: May 2003
Posts: 7
i hope i'm asking the right questions here, i'm not sure exactly how this dll did what it did so i'll do my best to explain what i need help with.

a long time ago i used a dll called mOTFv which was a dll capable of attaching to mirc's existing sockets connecting it to a server, and intercept a ctcp version request and send out its own reply bypassing mirc's own processing of the request.

what i'm hoping to do is something similar to mOTFv, except not to change a ctcp version reply, but to do some heavy processing of server notices before mirc gets ahold of them, because at times my script just has too much overhead using mircscript.

what i'd like to do is write a dll that hooks an existing mirc server connection the way mOTFv did and then have the gruntwork happen within the dll (these would be oper functions for the server i help admin) and just have a basic mirc script that communicates with the dll to configure it on what to do and when to do it.

what i need help with is in the way mOTFv was able to hook into mirc's server sockets and basically act as a transparent (to mirc) proxy between mirc and the server. has anyone got any idea how this was done? i have an older version of mOTFv's sourcecode, but it doesn't include core.cpp which i believe is what contains the code that did the actual socket interception and function hooking. and most of the sites that used to have the more advanced mirc stuff seem to no longer exist, like dragonzap's dlls and danielson's (who originally authored mOTFv) site etc. i'm running into dead end after dead end and i don't know where to go from here.

does anyone on this forum have any idea how to accomplish this? i'm new to c++ and dll programming, but i can figure that stuff out on my own, it's the hooking and socket grabbing that i don't have a clue how to do, and i've been researching it for the past couple of weeks with basically no luck.

ANY help would be appreciated! thanks in advance guys and gals.

P.S. links to tutorials or other useful information relevant to this question will also be appreciated. smile

--
baby_bird on chatcircuit.com

Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
I don't know if this is helpful to you, but I'm planning on releasing an I/O filter DLL somewhere in the next week... This DLL allows scripts to examine and block all incoming and outgoing message lines, using a rule-based system; it hooks into mIRC's internal line send and line receive functions, which basically means SSL support at the cost of high dependence on the mIRC binary (6.14/6.15 only at this moment).

I will not release the source code (at least for a while), but if you want, I could add a few API calls that allow other DLLs to make use of it... Let me know if you're interested. smile


Saturn, QuakeNet staff
Joined: May 2003
Posts: 7
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: May 2003
Posts: 7
this sounds interesting, i wonder if anyone else would find it useful as well. so this dll you are writing actually works on the outside of mirc's SSL functions? that sounds like exactly what i am trying to do.

i wonder how different what you are doing is from what mOTFv did is, i do not know how version-sensitive that dll was because i barely used it, but i don't recall having a problem with it between any different versions. perhaps it works differently.

at any rate, that sounds like a nice idea including a few API calls in your dll. i will still be trying to research how to do the same thing myself, if for no other reason than the intellectual challenge, but including an API for other DLLs to use is great. if i figure out how to do it myself i will definitely include support in my own as well. smile

Joined: Apr 2004
Posts: 871
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 871
As far as I know, mOTFv hooks into winsock's send() and recv() functions, using a rather generic technique. This means such a DLL will be mIRC-version independent, but if send() and recv() are used to send/receive encrypted text (which is the case for SSL connections of course), the technique will fail.

On the other hand, my DLL hooks into functions deep inside mIRC, at a place where there is no difference between messages sent as plain text, and messages sent over SSL. This technique is far from generic; it needs specific offsets into the mIRC binary, and that makes it so version-dependent.

Quote:
at any rate, that sounds like a nice idea including a few API calls in your dll.

Okay, I'll do that then - I'll send you a message when it's done.


Saturn, QuakeNet staff
Joined: May 2003
Posts: 7
P
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
P
Joined: May 2003
Posts: 7
thank you, very much appreciated! laugh


Link Copied to Clipboard