Flex 2 SOURCE Msn Messenger implementation 0.1alpha
Hi all, well for the last couple of nights I have been staying up late trying to figure out a roadblock I hit with the msn messenger Flex version. I have uploaded the source for people to play with but if you manage to solve my problem please let me know. If nothing else just use it as an example of sockets in flash 8.5. If you have any questions please post in the comments.
SETTING THE SCENE:
Msn Messenger logs onto the messenger server, shakes hands then is sent away to get a ticket from an SSL connection. Thats where my php script (included) steps in. Flash cannot open sockets lower than 1024
(. So I had to find a way to get the ticket from the SSL MSN server then pass it back to flash. If you know your PHP your thinking fsockopen(). Burrrrr… wrong. Micro$oft has changed its protocols and is at somewhere about version 9. Through doing this they have tried to stop people like me obviously. So I used cURL to get a connection read the page ( i have an echo commented out in the php if you want to see the output), find the ticket and pass the ticket back to flash.
All works well at this point. Flash recieves the ticket passes it off to the Msn Server……and the server fails my authentification . Im not sure if it records ip addresses so runing the php off localhost might fix it.
Included in this bundel it the .AS file and the .PHP file (but you can use the one on my server if you want, just please dont hammer);
For more info on the msn protocol etc click HERE .
Download the zip HERE .
It doesnt do much visually but if you watch the debug panel youll see the comunication. like:
>>> VER 2 MSNP8 CVR0
<<< VER 2 MSNP8 CVR0
>>> CVR 3 0×0409 winnt 5.1 i386 MSNMSGS 4.7.3001 WindowsMessenger example@hotmail.com
<<< CVR 3 1.0.0000 1.0.0000 1.0.0000 http://msgr.dlservice.microsoft.com http://messenger.msn.com
>>> USR 4 TWN I example@hotmail.com
<<< XFR 4 NS 207.46.2.59:1863 0 65.54.239.140:1863
>>> VER 5 MSNP8 CVR0
<<< VER 5 MSNP8 CVR0
>>> CVR 6 0×0409 winnt 5.1 i386 MSNMSGS 4.7.3001 WindowsMessenger example@hotmail.com
<<< CVR 6 1.0.0000 1.0.0000 1.0.0000 http://msgr.dlservice.microsoft.com http://messenger.msn.com
>>> USR 7 TWN I example@hotmail.com
<<< USR 7 TWN S lc=1033,id=507,tw=40,fs=1,ru=http%3A%2F%2Fmes…
NOTE: this application will send you username and password in clear txt across the internet as it stands (using the remote php script) So if you have pissed off any geeks and they have a packet sniffer on your network they can see them. To fix use the php script on your local host and make sure you have cURL module installed as a part of you build, else use the testing script on my server.




After talking to someone on flashcoders mailing list looking at remobjects sdk with sockets might be cool might be just reinventing the wheel though (http://remobjects.com/page.asp)
I’ll take a look at this when I get home tonight. I’ve been going at it alone with Socket for my AIM connector, so it’ll be good to see how someone else used it.
Cool, Its not hugely OOP butit was a test.
My AIM classes are finally finished. Head on over, and check them out. (http://lab.zeusdesign.net/?p=6)
Good work Dude……. Nice classes
Hey Campbell.. I’ve actually used your great work to create a working Windows Live Messenger client..
It’s far from ready to release, I’ve managed to received the contact list and changed the status..
It’s made with Adobe AIR framework..
So thanks for you’re pre-work..!
No worries mate, was quite a while ago so Im glad it was usefull
Flex SOURCE Msn Messenger implementation…
Hi all, well for the last couple of nights I have been staying up late trying to figure out a roadblock I hit with the msn messenger Flex version. I have uploaded the source for people to play with but if you manage to solve my problem please let me kn…