Dampe Posted December 15, 2008 Share Posted December 15, 2008 Hey all,I was bored and started having a crack at the MSN protocol.Ref: http://www.hypothetic.org/docs/msn/notific...hentication.phpexpandcollapse popupLocal $MSNConnectServer = TCPNameToIP ("messenger.hotmail.com") Local $MSNConnectPort = 1863 Local $MSNCurrentID = 0, $TCPMainSocket _MSNStart("emailhere@hotmail.com", "passwordhere") Func _MSNStart($tEmail, $tPassword) ;//Start connection While 1 $TCPMainSocket = TCPConnect ($MSNConnectServer, $MSNConnectPort) If $TCPMainSocket <> - 1 Then ExitLoop EndIf WEnd ConsoleWrite ("Connected to " & $MSNConnectServer & @CRLF) _MSNVer($MSNCurrentID) $MSNCurrentID +=1 _MSNCvr($MSNCurrentID, $tEmail) $MSNCurrentID +=1 _MSNUsr($MSNCurrentID, $tEmail) ;//Connect to new server While 1 $TCPMainSocket = TCPConnect ("207.46.111.72", 1863) If $TCPMainSocket <> - 1 Then ExitLoop EndIf WEnd $MSNCurrentID = 0 _MSNVer($MSNCurrentID) $MSNCurrentID +=1 _MSNCvr($MSNCurrentID, $tEmail) $MSNCurrentID +=1 _MSNUsr($MSNCurrentID, $tEmail) EndFunc Func _MSNCvr($tID, $tEmail) $tVersionString = "CVR " & $tID & " 0x0409 win 4.10 i386 MSNMSGR 5.0.0544 MSMSGS " & $tEmail & @CRLF TCPSend ($TCPMainSocket, $tVersionString) ConsoleWrite (">>> " & $tVersionString) ;//Version command While 1 $TCPRecv = TCPRecv ($TCPMainSocket, 2048) If $TCPRecv <> "" Then ConsoleWrite ("<<< " & $TCPRecv) ExitLoop EndIf WEnd EndFunc Func _MSNVer($tID) $tVERString = "VER " & $tID & " MSNP9" & @CRLF TCPSend ($TCPMainSocket, $tVERString) ConsoleWrite (">>> " & $tVERString) ;//Verify command While 1 $TCPRecv = TCPRecv ($TCPMainSocket, 2048) If $TCPRecv <> "" Then If $TCPRecv = $tVERString Then ConsoleWrite ("<<< " & $TCPRecv) ExitLoop Else ConsoleWrite ("<<< " & $TCPRecv) EndIf EndIf WEnd EndFunc Func _MSNUsr($tID, $tEmail) $tUsrString = "USR " & $tID & " TWN I " & $tEmail & @CRLF TCPSend ($TCPMainSocket, $tUsrString) ConsoleWrite (">>> " & $tUsrString) ;//USR command While 1 $TCPRecv = TCPRecv ($TCPMainSocket, 2048) If $TCPRecv <> "" Then ConsoleWrite ("<<< " & $TCPRecv) ExitLoop EndIf WEnd TCPCloseSocket ($TCPMainSocket) EndFunc Link to comment Share on other sites More sharing options...
arcker Posted December 15, 2008 Share Posted December 15, 2008 nice one, using msn protocol v8. I've developped an msn client with the v15 ( xml, sso, ticket token, and so on ...) , but it's forbidden so i've never published it. too bad that we can't make our own client with the new protocol :/ nice job anyway -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
James Posted December 15, 2008 Share Posted December 15, 2008 what's forbidden? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
torels Posted December 15, 2008 Share Posted December 15, 2008 (edited) Good work! Edit: But it's not working Edited December 15, 2008 by torels Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
arcker Posted December 15, 2008 Share Posted December 15, 2008 in the licence agreement microsoft says that msn protocol is proprietary. Since there you can't make your own client with this new protocol. It's proprietary. -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
jvanegmond Posted December 16, 2008 Share Posted December 16, 2008 Thanks for the documentation. I've wanted to do an MSN client a few years back, but back then noone had documented anything.. github.com/jvanegmond Link to comment Share on other sites More sharing options...
torels Posted December 16, 2008 Share Posted December 16, 2008 Am I the only idiot for whom it's not working ? Can it depend on the country where you are ? Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
jvanegmond Posted December 16, 2008 Share Posted December 16, 2008 Am I the only idiot for whom it's not working ?Can it depend on the country where you are ?What do you expect to happen? github.com/jvanegmond Link to comment Share on other sites More sharing options...
Skrip Posted December 16, 2008 Share Posted December 16, 2008 It's not working for my either. No version is returned. (Nothing is returned) [left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left] Link to comment Share on other sites More sharing options...
jvanegmond Posted December 17, 2008 Share Posted December 17, 2008 It's not working for my either. No version is returned. (Nothing is returned)I just remembered... He cut TCPStartUp() off at some point. expandcollapse popupTCPStartup ( ) Dim $MSNConnectServer = TCPNameToIP ("messenger.hotmail.com") Dim $MSNConnectPort = 1863 Dim $MSNCurrentID = 0, $TCPMainSocket _MSNStart("emailhere@hotmail.com", "passwordhere") Func _MSNStart($tEmail, $tPassword) ConsoleWrite("Attempting to connect to " & $MSNConnectServer & @CRLF) ;//Start connection While 1 $TCPMainSocket = TCPConnect ($MSNConnectServer, $MSNConnectPort) If $TCPMainSocket <> - 1 Then ExitLoop EndIf WEnd ConsoleWrite ("Connected to " & $MSNConnectServer & @CRLF) _MSNVer($MSNCurrentID) $MSNCurrentID +=1 _MSNCvr($MSNCurrentID, $tEmail) $MSNCurrentID +=1 _MSNUsr($MSNCurrentID, $tEmail) ;//Connect to new server While 1 $TCPMainSocket = TCPConnect ("207.46.111.72", 1863) If $TCPMainSocket <> - 1 Then ExitLoop EndIf WEnd $MSNCurrentID = 0 _MSNVer($MSNCurrentID) $MSNCurrentID +=1 _MSNCvr($MSNCurrentID, $tEmail) $MSNCurrentID +=1 _MSNUsr($MSNCurrentID, $tEmail) EndFunc Func _MSNCvr($tID, $tEmail) $tVersionString = "CVR " & $tID & " 0x0409 win 4.10 i386 MSNMSGR 5.0.0544 MSMSGS " & $tEmail & @CRLF TCPSend ($TCPMainSocket, $tVersionString) ConsoleWrite (">>> " & $tVersionString) ;//Version command While 1 $TCPRecv = TCPRecv ($TCPMainSocket, 2048) If $TCPRecv <> "" Then ConsoleWrite ("<<< " & $TCPRecv) ExitLoop EndIf WEnd EndFunc Func _MSNVer($tID) $tVERString = "VER " & $tID & " MSNP9" & @CRLF TCPSend ($TCPMainSocket, $tVERString) ConsoleWrite (">>> " & $tVERString) ;//Verify command While 1 $TCPRecv = TCPRecv ($TCPMainSocket, 2048) If $TCPRecv <> "" Then If $TCPRecv = $tVERString Then ConsoleWrite ("<<< " & $TCPRecv) ExitLoop Else ConsoleWrite ("<<< " & $TCPRecv) EndIf EndIf WEnd EndFunc Func _MSNUsr($tID, $tEmail) $tUsrString = "USR " & $tID & " TWN I " & $tEmail & @CRLF TCPSend ($TCPMainSocket, $tUsrString) ConsoleWrite (">>> " & $tUsrString) ;//USR command While 1 $TCPRecv = TCPRecv ($TCPMainSocket, 2048) If $TCPRecv <> "" Then ConsoleWrite ("<<< " & $TCPRecv) ExitLoop EndIf WEnd TCPCloseSocket ($TCPMainSocket) EndFunc github.com/jvanegmond Link to comment Share on other sites More sharing options...
torels Posted December 17, 2008 Share Posted December 17, 2008 Now it's working Some Projects:[list][*]ZIP UDF using no external files[*]iPod Music Transfer [*]iTunes UDF - fully integrate iTunes with au3[*]iTunes info (taskbar player hover)[*]Instant Run - run scripts without saving them before :)[*]Get Tube - YouTube Downloader[*]Lyric Finder 2 - Find Lyrics to any of your song[*]DeskBox - A Desktop Extension Tool[/list]indifference will ruin the world, but in the end... WHO CARES :P---------------http://torels.altervista.org Link to comment Share on other sites More sharing options...
Influx Posted December 19, 2008 Share Posted December 19, 2008 Any way someone could post a working example(like a personal client?) Link to comment Share on other sites More sharing options...
Chris86 Posted March 16, 2009 Share Posted March 16, 2009 Holy smokes ! can u give use some examples, like how to send files etc ? Link to comment Share on other sites More sharing options...
FireFox Posted March 16, 2009 Share Posted March 16, 2009 Holy smokes ! can u give use some examples, like how to send files etc ?Send file ? FT - Pocket on my signature Cheers, FireFox. Link to comment Share on other sites More sharing options...
DJKMan Posted June 12, 2009 Share Posted June 12, 2009 Am I missing something or is there a way to send a message to another user? Link to comment Share on other sites More sharing options...
Datenshi Posted June 12, 2009 Share Posted June 12, 2009 Holy smokes ! can u give use some examples, like how to send files etc ?Sending/Receiving files through MSN protocol is a bit more advanced, it requires packet reassembly and MSN has a particular way of handling these, it wouldn't be to hard to initiate the transfer negotiation but you can only send the file in i think 2040bytes increments which include the position of that piece in the final file, this becomes complicated when data packets could be lost on their way to the target. There's an msnwiki on the net explaining in-depth how the protocol works. Ive analyzed packets from my MSN client using Wireshark, and it's quite a handful actually. RapidQueuer 2.4 - For Rapidshare.comOpensubtitles Hashing FuncRevision3 PlayerGTPlayer BetaIMDB & Poster Grabber v1.3Fetgrek.com - My Website Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now