Coding an AIM bot in MFC
I was thinking this summer I would like to write myself
a little bot that would respond properly to instant messages
from the AOL instant messenger program. I''m can code with MFC, WIN32, C, C++. Any tips guys?
Thanks,
Tim
i think it best of you do some research on ai chat bots. there is a ton of info out there on this.
How do you even send/rcv with the AIM thing?
I would like to do the same, but dont know how to actually connect and send and recieve msgs..
thanx
Dwiel ~ Tazzel3d
I would like to do the same, but dont know how to actually connect and send and recieve msgs..
thanx
Dwiel ~ Tazzel3d
either use the toc protocal, or get firetalk (which is gpl and means ALL your code must be distributed with the exe). toc is a simple text based protocal for use with connecting to an aim server known as oscar. you can try search google for it, or http://www.wiredbots.com/ which explains how to use the perl implementation.
another way is to constantly poll the aim windows to see if there text has changed or even modify the aim windows so that you recieve all the windows messages (ie see subclassing or hooking a window). this is a more complex method of doing things though.
another way is to constantly poll the aim windows to see if there text has changed or even modify the aim windows so that you recieve all the windows messages (ie see subclassing or hooking a window). this is a more complex method of doing things though.
I have been to that cite,m but didnt want to do perl.... rather use C... is there a way to use C, C++, or VB?
thanx
thanx
This is becoming a programming question and I am certain that it would be better served if asked in the General Programming forum.
BTW: The answer you''re looking for is to write a ''hook'' into the AIM application. That''s DEFINITELY not a trivial matter.
Cheers,
Timkin
BTW: The answer you''re looking for is to write a ''hook'' into the AIM application. That''s DEFINITELY not a trivial matter.
Cheers,
Timkin
Thanks for your replies guys.
Yeah, I''ve read some stuff about hooking.
I understand the theory, but I haven''t tried
to implement it yet. Ideally I''d like to have
my AIMBot running while I have AIM open and
the bot would just receive and send messages
through hooking. Perl is no good; I haven''t
learned it yet. =/ I think I''m going to work
on hooking applications. I was just curious
if anyone knows anything about intercepting
messages from AIM.
Thanks again,
Tim
Yeah, I''ve read some stuff about hooking.
I understand the theory, but I haven''t tried
to implement it yet. Ideally I''d like to have
my AIMBot running while I have AIM open and
the bot would just receive and send messages
through hooking. Perl is no good; I haven''t
learned it yet. =/ I think I''m going to work
on hooking applications. I was just curious
if anyone knows anything about intercepting
messages from AIM.
Thanks again,
Tim
When I said intercept messages, I meant
client side. I certainly don''t want to
intercept any user''s messages.
Tim
client side. I certainly don''t want to
intercept any user''s messages.
Tim
you can do it like how it is done for aim. just findwindow() the textbox, and grab the text. send via finding the input window and settext() along with sending the WM_LBUTTONUP message to the correct button (though you may have to send a WM_LBUTTONDOWN as well along with a WM_MOUSEMOVE). then after you answer the message you can change the window title(check the win32 api). i am not usre if aim actually changes the window title each time an message is recieved, but i know aol did. this technique worked on aol (i wrote an away message app before aim was created and before away messages were added to the aol, though thankfully i am no longer on aol). granted you have the tougher job of grabbing the text and parsing it for the new text, removing your own messages. not too tough, just keep the last message sent (ie yours and the other persons so its more unique), and find that first, anything after it should be new. its simple, but should be effective enough. you could even include some sort of fake html tag that includes a serial number for the message. since all messages on aim are sent using html when dealing with a standard aim client. also aim ignores any bad html it dont understand. not sure if its stripped though. much fun you will have doing this (spy++ will be helpful finding the window class names you need for findwindow()). remeber when you cant directly use findwindow() to find hwnds to childwindows, so make sure you read up the win32 api on how all that works. it will be some fun you will have.
also you CANT intercept any messages except ones that go through your pc. implemneting your own aim client may be a good idea since it will be more reliable then hooking, but probably more difficult unless you are comfortable with socks32 AND using a somewhat poorly documented protocal (the actual protocal is simple, just some of the wierd setup of the packets is a diffiuclty).
also you CANT intercept any messages except ones that go through your pc. implemneting your own aim client may be a good idea since it will be more reliable then hooking, but probably more difficult unless you are comfortable with socks32 AND using a somewhat poorly documented protocal (the actual protocal is simple, just some of the wierd setup of the packets is a diffiuclty).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement