<?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>