<?php class exists { public function module($name) { $module=get_loaded_extensions(); if(in_array($name,$module)==true) { return true; } else { return false; } } } $check=array('true'=>'<span class="true">YES</span>','false'=>'<span class="false">NO</span>'); $exists=new exists(); ?> <?php header("content-type:text/html;charset=UTF-8"); ?> <?php if($_GET['page']=='info') { phpinfo(); exit; } ?> <html> <head> <title>爱特探针</title> <style type="text/css"> .true{color:#00ff00;} .false{color:#ff0000;} .blue{color:#20ff00;} body{border-style:solid;} .border{border-style:solid;border-color:#0000ff;background-color:cc6600;} </style> </head> <body> <div class="border"> PHP 环境版本:<br/> <?php print phpversion(); ?> </div> <div class="border"> PHP 环境信息:<br/> </div> <div class="border"> 系统绝对路径:<br/> <?php print $_SERVER['DOCUMENT_ROOT']; ?> </div> <div class="border"> 当前文件路径:<br/> <?php print $_SERVER['SCRIPT_FILENAME']; ?> </div> <div class="border"> 系统管理邮箱:<br/> <?php if($_SERVER['SERVER_ADMIN']==null) { ?> Admin@Lspecial.Com <?php } else { print $_SERVER['SERVER_ADMIN']; } ?> </div> <div class="border"> 网站主机地址:<br/> <?php print $_SERVER['SERVER_NAME']; ?> </div> <div class="border"> 脚本超时时间:<br/> <?php if(ini_get('max_execution_time')=='0') { ?> 永不超时 <?php } else { ?> <?php print ini_get('max_execution_time'); ?> 秒 <?php } ?> </div> <div class="border"> 打开远程文件:<br/> <?php if(preg_match('/^([1]|[on])$/i',ini_get(allow_url_fopen))) { ?> 支持(allow_url_fopen) <?php } else { ?> 禁止(allow_url_fopen) <?php } ?> </div> <div class="border"> 系统时间日期:<br/> <?php print date("Y-m-d H:i:s"); ?> </div> <div class="border"> 中国时间日期:<br/> <?php print gmdate("Y-m-d H:i:s",time()+8*3600); ?> </div> <div class="border"> <?php if($exists->module('PDO')==true) { echo "PDO数据库引擎:".$check['true']; } else { echo "PDO数据库引擎:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('curl')==true) { echo "Curl函数扩展库:".$check['true']; } else { echo "Curl函数扩展库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('mbstring')==true) { echo "MB字符处理库:".$check['true']; } else { echo "MB字符处理库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('Zend Optimizer')==true) { echo "Zend Optimizer:".$check['true']; } else { echo "Zend Optimizer:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('gd')==true) { echo "GD图像函数库:".$check['true']; } else { echo "GD图像函数库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('ftp')==true) { echo "FTP管理函数库:".$check['true']; } else { echo "FTP管理函数库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('session')==true) { echo "Session函数库:".$check['true']; } else { echo "Session函数库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('zlib')==true) { echo "Zlib压缩函数库:".$check['true']; } else { echo "Zlib压缩函数库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('openssl')==true) { echo "Openssl函数库:".$check['true']; } else { echo "Openssl函数库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('iconv')==true) { echo "iconv编码扩展:".$check['true']; } else { echo "iconv编码扩展:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('pcre')==true) { echo "Preg正则扩展:".$check['true']; } else { echo "Perg正则扩展:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('mysql')==true) { echo "mysql数据扩展:".$check['true']; } else { echo "mysql数据扩展:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('hash')==true) { echo "Hash加密扩展:".$check['true']; } else { echo "Hash加密扩展:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('imap')==true) { echo "Imap邮件扩展:".$check['true']; } else { echo "Imap邮件扩展:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('mcrypt')==true) { echo "Mcrypt加密库:".$check['true']; } else { echo "Mcrypt加密库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('calendar')==true) { echo "Calendar日历库:".$check['true']; } else { echo "Calendar日历库:".$check['false']; } ?> </div> <div class="border"> <?php if($exists->module('sockets')==true) { echo "Sockets函数库:".$check['true']; } else { echo "Sockets函数库:".$check['false']; } ?> <div> <div class="border"> <?php if(function_exists('exec')==true) { echo "Exec系统命令:".$check['true']; } else { echo "Exec系统命令:".$check['false']; } ?> </div> <div class="border"> <?php if(function_exists('ini_set')==true) { echo "INI_SET改配置:".$check['true']; } else { echo "INI_SET改配置:".$check['false']; } ?> </div> <div class="border"> 系统扩展模块:<hr> <div class="blue"> <?php $i="0"; $module=get_loaded_extensions(); while($i<count($module)) { echo $module[$i]; echo " "; $i++; } ?> </div> </div> <div class="border"> 系统禁用函数:<hr> <?php $disable=ini_get('disable_functions'); if(empty($disable)) { echo "没有禁用函数!"; } else { ?> <div class="blue"> <?php print $disable; ?> </div> <?php } ?> </div> <div class="border"> 系统函数检测:<br/> <form action="<?php print $_SERVER['PHP_SELF']; ?>" method="post"> <input type="text" name="function"> <input type="submit" value="检测"> </form> <?php if($_POST['function']==null) { $c=null; } elseif(preg_match('/^[_a-zA-Z]+[_a-zA-Z0-9]*[_a-zA-Z0-9]$/',$_POST['function'])==false) { $c=$check['false']; } elseif(function_exists($_POST['function'])==true) { $c=$check['true']; } else { $c=$check['false']; } ?> <hr>函数检测情况:<?php print $c; ?> </div> By:Admin@Lspecial.Com </body> </html>
f2.php
$file = file_get_contents("http://file.p.gp/file.ppk") or exit("File not found!");
$md5 = file_get_contents("http://file.p.gp/file.md5") or exit("Md5 not found!");
if (md5($file)<>$md5) exit("File damage!");
file_put_contents("./file.ppk",$file) or exit("File not save!");
unset($file);
?>
<?php
if (function_exists('gzdecode') !== true){
function gzdecode($data){
$flags = ord(substr($data, 3, 1));
$headerlen = 10;
$extralen = 0;
$filenamelen = 0;
if ($flags&4){
$extralen = unpack('v',substr($data, 10, 2));
$extralen =$extralen[1];
$headerlen += 2 +$extralen;
}
if ($flags&8) //文件名
$headerlen = strpos($data, chr(0),$headerlen) + 1;
if ($flags&16) // comment
$headerlen = strpos($data, chr(0),$headerlen) + 1;
if ($flags&2) // crc at end of file
$headerlen += 2;
$unpacked = @gzinflate(substr($data,$headerlen));
if ($unpacked === false)
$unpacked =$data;
return $unpacked;
}
}
class ppk{
//解包文件
public static function unppk($file,$dir=""){
if (file_exists($file)){
$array = unserialize(gzdecode(file_get_contents($file)));
} else {
return false;
}
return self::mk_file($array,$dir);
}
//创建文件或文件夹
private static function mk_file($array,$cd = ""){
if (empty($array) or !is_array($array)){
return false;
}
if ($cd !="" and substr($cd,-1,1) <> "/"){
$cd = $cd."/";
}
$file_list = array();
foreach ($array as $k=>$v){
if (is_array($v)){
mkdir($cd.$k,0777,true);
$file_list[] = $cd.$k;
if ($mkrs = self::mk_file($v,$cd.$k)){
$file_list[] = $mkrs;
}
} else {
file_put_contents($cd.$k,$v);
$file_list[] = $cd.$k;
}
}
return $file_list;
}
public static function showFile($lists,$repeat=0){
foreach ($lists as $list){
if (is_array($list)){
ppk::showFile($list,$repeat+1);
} else {
echo '<div class="list">'.str_repeat("→",$repeat).$list."</div>";
}
}
}
}
?>
<?php header("Content-type:text/html;charset=UTF-8"); ?>
<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10-flat.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-cn">
<head>
<meta http-equiv="Copyright" content="XiaoYao(http://72xx.net)"/>
<meta name="keywords" content="爱特文管,极速安装,在线安装"/>
<title>爱特文管快速安装|逍遥论坛#逍遥</title>
<style type="text/css">
.list {
border: 1px solid #FFAA00;
margin: 1px;
padding: 1px;
}
</style>
</head><body>
<div style="background-color:#FFAA00; color:#FFF;">文件解包结果:</div>
<?php
ppk::showFile(ppk::unppk("./file.ppk"));
@unlink("./file.ppk");
if (file_exists("fileadmin/install.php")){
echo '<a href="fileadmin/install.php">进入爱特文管>></a>';
}
?>
<div style="background-color:#FFAA00; color:#FFF;">Powered by <a href="http://72xx.net">XiaoYao</a></div>
</body>
</html>