Re: msn + windev |
Sujet: Re: msn + windev par gpowerz sur 9/6/2006 15:10:42 bon j'ai demarré quelques tests pour voir grace à la doc citée plus http://www.hypothetic.org/docs/msn/notification/authentication.php et etherreal pour espioner les packet TCP sortant et entrant 1er constat : y a du boulot - gestion des redirections de serveur car le 1er serveur sert de gateway - gestion d'un ticket (passport microsoft) donné par un site https - bcp de commande à gerer mon 1 er test envoi bien la 1er commande au serveur et le serveur me repond mais je me suis arreté car j'avais du boulot voila un extrait du code zMSN est une classe MSNServer est une chaîne // param de connexion MSN MSNPort est un entier MSNProxy est un chaîne MSNProxyPort est un entier MSNProxyUser est une chaîne MSNProxyPassword est une chaîne SocketName est une chaîne // Nom de la scoket IsConnect est un booléen // Vrai si connection Ok SockCpt est un entier ChRead est une chaîne // chaine lue dans la socket FIN PROCEDURE Constructeur() :MSNServer = "Messenger.hotmail.com" :MSNPort = 1863 PROCEDURE ConnecteUser(UserName,Password) Ret est un entier Ch est une chaîne // ----------------------------------------------------------------- // Si on passe par un proxy il faut le specifier // ----------------------------------------------------------------- SI :MSNProxy<>"" ALORS SI :MSNProxy = "AUTO" ALORS // TODO : recuperation auto des param dans la registry SINON Proxy(:MSNProxy,:MSNPort,:MSNProxyUser,:MSNProxyPassword) FIN FIN :SocketName = "MSN_"+DateSys()+"_"+HeureSys() Ret = SocketConnecte(:SocketName,:MSNPort,:MSNServer) Trace("ret="+Ret) SI Ret ALORS // si HTTPRequête("https://nexus.passport.com/rdr/pprdr.asp","","","","",USerName,Password) alors // Ch = HTTPDonneRésultat(HTTPEntête) // info(Ch) // FIN // -------------------------------------------------------------------------- // Change le marqueur de FIN par RC // -------------------------------------------------------------------------- SocketChangeModeTransmission(:SocketName,SocketMarqueurFinBuffer,Caract(13)+Caract(10)) :SockWrite("VER","MSNP11 MSNP10 CVR0") :SockRead() :SockWrite("VER","MSNP8 CVR0") :SockRead() :SockWrite("CVR","0x040c winnt 5.0 i386 MSNMSGR 7.0.0816 msmsgs "+UserName+" USR "+(:SockCpt+1)+Caract(84)+Caract(87)+" TWN I "+UserName) :SockRead() :SockWrite("TWN","S t=rqyuwNRZmguMVJY27eQatw1w6zs3ZQ842cW4*Tqtg!MCAZo31hzp58Mw6yPLw*oHfdrfpjZdxdJHSp1A6wsIWQmpWdQHXxUdMM&p=7v21XIG56CURZmo8dUf4XvhVvPryt8t*tUNotzePtIsYj*1mzSVDy53m0bGutGBtVfMvvQhT1rD1D2*D92v2vigUT0BAf*dWrLfK6vFH*voz0JqPg!HzNoqNZncs4AUOfhfgyiLhymtDcb2il3xlBwFECpiFfLocT1UQcqFzsK!f4Nc0KK8EuKIw$$") FIN // ------------------------------------------------------------------------------------ // Ecriture dans la socket // ------------------------------------------------------------------------------------ PROCEDURE SockWrite(Cmd,Param="") Ret est un entier Ch est une chaîne = Cmd+" "+:SockCpt+" "+Param+RC Ret = SocketEcrit(:SocketName,Ch) :SockCpt++ // on increment le compteur Trace(Ret+"->"+Ch) // -------------------------------------------------------------------------------------- // Lecture dans la socket // -------------------------------------------------------------------------------------- PROCEDURE SockRead() :ChRead = SocketLit(:SocketName) Trace("<-"+:ChRead) RENVOYER :ChRead |