mIRC Home    About    Download    Register    News    Help

Print Thread
need help in sockets along with MSN protocol 7 #28918 09/06/03 11:47 PM
Joined: Jun 2003
Posts: 2
E
eCriminal Offline OP
Bowl of petunias
OP Offline
Bowl of petunias
E
Joined: Jun 2003
Posts: 2
alias nc {
set %mail $$?="Your Email"
set %pass $$?*="Your Pass"
sockopen nc messenger.hotmail.com 1863
}

on *:sockopen:nc: {
echo -a 4Connection Started
if ($sockerr) { echo 4 -a 12Connection Refused $+ $sock($sockname).wsmsg }
else {
sockwrite -nt $sockname VER 3 MSNP7 MSNP6 MSNP5 MSNP4 CVRO
}
}

on *:sockread:nc: {
if ($sockbr > 0) {
sockread -f %tempdata
echo -a 4 %tempdata
if (VER 3 isin %tempdata) { sockwrite -nt $sockname INF 1 | 4Connection Initiated With Dispatch Server }
else { return }
sockread -f %tempdata
echo -a 4 %tempdata
if (INF 1 MD5 isin %tempdata) { sockwrite -nt $sockname USR 2 MD5 I %mail | echo -a 4Sending %mail Email To Hotmail Dispatch Server } else { return }
sockread -f %tempdata
echo -a 4 %tempdata
if (XFR isin %tempdata) { set %newserver $replace($gettok(%tempdata,4,32),:,$chr(32)) | echo -a 4 Getting New Server From Dispatch Server $+ %newserver }
sockclose $sockname
sockopen nc1 %newserver
}
}

this is a code for creating connection with MSN Dispatch server and getting the new server IP to connect to it as Notification server .. the socket scripter can't understand it but the socket scripter with some knowledge in MSN protocol 7 can understand it ... so my problem is this code has sumthin wrong .. i can't figure it out .. so i want help from someone

when i start this code it is echoed me Connection Started
and stopped here
so what`s wrong?
why it doesn continue?
there is no sockerr i think cuz if there is sockerr it will return according to my if-else
..
and also there is data sent and received
cuz also my if ($sockbr > 0)
if data stopped it rturn
so what is the wrong
plz help me

Re: need help in sockets along with MSN protocol 7 #28919 10/06/03 12:59 AM
Joined: Dec 2002
Posts: 1,527
_
_D3m0n_ Offline
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
you wont get msn chat server help here


D3m0nnet.com
Re: need help in sockets along with MSN protocol 7 #28920 10/06/03 01:20 AM
Joined: May 2003
Posts: 177
P
Prizm Offline
Vogon poet
Offline
Vogon poet
P
Joined: May 2003
Posts: 177
I'm not exactly sure it's a script to chat on MSN. Seeing how it connects to hotmail.com and everything.

Re: need help in sockets along with MSN protocol 7 #28921 12/06/03 04:48 AM
Joined: May 2003
Posts: 79
A
Artwerks Offline
Babel fish
Offline
Babel fish
A
Joined: May 2003
Posts: 79
I've done a MSN Messenger client so I know this protocol. So here is a code I modified from yours.

Code:
alias nc {
  sockclose nc
  sockopen nc messenger.hotmail.com 1863 
}

on *:sockopen:nc:{
  if (!$sockerr) {
    sockwrite -n $sockname VER 0 MSNP7 MSNP6 MSNP5 MSNP4 CVRO
  }
}

on *:sockread:nc:{
  sockread %tempdata
  if (%tempdata == VER 0 MSNP7 MSNP6 MSNP5 MSNP4) { sockwrite  -n $sockname INF 1 }
  if (%tempdata == INF 1 MD5) { sockwrite -n $sockname USR 2  MD5  I  %mail }
  if (XFR 2 isin %tempdata) { echo $replace($gettok(%tempdata,4,32),:,$chr(32)) }
}