How does MSN record session information in Client Security

Source: Internet
Author: User

When I opened Hotmail today, I accidentally read the script written by Microsoft. I found that many of the scripts behind Hotmail are also intentionally messed up, so that the readability is worse.

Many people use MSN. If you use Hotmail or a contact in MSN to send you a mail, Hotmail will automatically display its status. Including many Microsoft products, such as SPS and outlook.

I took a look.CodeSPS call ActiveX regardless of Hotmail or outlook. First, judge the login information of current MSN. The Code is as follows:

Msngrobj = New Activexobject ( " Msnmessenger. hotmailcontrol " );

State = (Msngrobj. getlocaluserstatus ();

// Different return values indicate different States



When determining the contact information, it is

Getuserstatus

Function Msngrgetcontact (EM, Loc)

{

VaR RET;

VaR IMG;

VaR MSG;

VaR CS = Msngrobj. getuserstatus (EM );

If (CS =   Null ) Return ;

Switch (CS)

{

Case   1 :

IMG = 1

MSG = Rochelle isoffline

Break ;

Case   2 :

IMG = 0

MSG = L_isonline

Break ;

Case   10 :

IMG = 3

MSG = Rochelle isbusy

Break ;

Case   14 :

IMG = 2

MSG = L_isbrb

Break ;

Case   18 :

Case   34 :

IMG = 2

MSG = Rochelle isaway

Break ;

Case   50 :

IMG = 3

MSG = Rochelle isonthephone

Break ;

Case   66 :

IMG = 2

MSG = L_isouttolunch

Break ;

}


In fact, I did write a piece of code to achieve the same effect. In fact, it is not so easy to implement it unless I use the SDK authorized by Microsoft.

My simple code:

Msngrobj = new activexobject ("msnmessenger. hotmailcontrol ");

Alert (msngrobj. getlocaluserstatus ());

An error object error is returned during execution.

I have determined that msngrobj is successfully created, and the getlocaluserstatus error occurs.

Therefore, it is assumed that getlocaluserstatus needs to obtain some context or session information, which may be the cookie stored on the client in the web app.

Slightly modify the code

First, get the cookie after MSN Hotmail login, and then attach this cookie to my code, like the principle of CSS :)

Document. Cookie = "msnads = Um = ;";

Document. Cookie = "mspauth = 5znke3zkibklpwlhl8emwllcj1lpc16yodjsddu3ocxlv % 21u2fe9wk % 2aida2% 21 nnati % ..."

Msngrobj = new activexobject ("msnmessenger. hotmailcontrol ");

Alert (msngrobj. getlocaluserstatus ());

The result is the same.

In fact, this is expected. Do you know where the MSN client's login information is stored? Haha

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.