TCPStartup ( )
Dim $MSNConnectServer = TCPNameToIP ("messenger.hotmail.com")
Dim $MSNConnectPort = 1863
Dim $MSNCurrentID = 0, $TCPMainSocket
_MSNStart("[email protected]", "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 & " MSN9" & @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