Session spoofing? Is it like a host star?

Source: Internet
Author: User

By cowhide total


Experiment with a Session.

Local PHP Version 5.2.3 & apache_2.2.4
Remote Server Environment PHP Version 4.4.0 & Linux Apache/2.0.54 (Unix)
IIS not tested
Test Domain Name: www.netpk.org & www.i0day.cn

First write two PHP scripts Session. php ifsession. php

The session. php code is as follows:

<? Php
Session_start ();

$ _ SESSION [NETPK] = netpk;


Echo $ _ SESSION [NETPK]:. $ _ SESSION [NETPK]. "<br/> ";


Echo <br/> <a href = "ifsession. php"> verify the SESSION </a>;

?>

The ifsession. php code is as follows:

<? Php
Session_start ();

If ($ _ SESSION [NETPK]! = Netpk)
{
Echo session error !!;
} Else
{
Echo Session OK !!;
}
Echo <br/> $ _ SESSION [NETPK]:. $ _ SESSION [NETPK]. "<br/> ";
?>
<A href = "session. php"> return </a>


The local test graph will not be available. It is the same as the remote server result.

The same two scripts are uploaded
Under the root directories www.netpk.org and www.i0day.cn

First http://www.i0day.cn/session.php


SESSION set successfully
Verify it at http://www.i0day.cn/ifsession.php.

OK .. the SESSION value is output successfully.

So here I http://www.netpk.org/ifsession.php. Is it true that I can also successfully verify the output sessionvalue?


ERROR...
Echo session is empty...

Same server ..

 


The practice is over ....
Is it like a host star?

Related Article

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.