</table> </div> </div> </dd> </dl> </div> <div style="margin: 0 auto; width:200px"><a href="javascript:startScan();"><img src="images/btn_scan.gif" width="154" height="46" /></a></div> <script type="text/javascript"> $ = jQuery; var log = "<?php foreach ($allPath as $key => $val) { if (is_dir(DEDEROOT . $key)) { echo $key; ?> |<?php $rs = TestExecuteable(DEDEROOT . $key, $cfg_basehost, $cfg_cmspath); if ($rs === -1) { echo "<font color='red'>无法判断</font>"; } else { if ($val['execute'] == true) { echo $rs != $val['execute'] ? "<font color='red'>错误(不可执行)</font>" : "<font color='green'>正常(可执行)</font>"; } else { echo $rs != $val['execute'] ? "<font color='red'>错误(可执行)</font>" : "<font color='green'>正常(不可执行)</font>"; } } ?> |<?php if ($val['read'] == true) { echo is_readable(DEDEROOT . $key) != $val['read'] ? "<font color='red'>错误(不可读)</font>" : "<font color='green'>正常(可读)</font>"; } else { echo is_readable(DEDEROOT . $key) != $val['read'] ? "<font color='red'>错误(可读)</font>" : "<font color='green'>正常(不可读)</font>";
return false; } } //@chmod($pathfile,0777); $fp = @fopen($pathfile, 'ab'); if ($fp === false) { return false; } fclose($fp); $isDir && @unlink($pathfile); return true; } } // 检测权限 $safeMsg = array(); if (TestExecuteable(DEDEROOT . '/data', $cfg_basehost) || TestExecuteable(DEDEROOT . '/uploads', $cfg_basehost)) { $helpurl = "http://help.dedecms.com/install-use/server/2011/1109/2124.html"; $safeMsg[] = '目前data、uploads有执行.php权限,非常危险,需要立即取消目录的执行权限! <a href="testenv.php" title="全面检测"><img src="images/btn_fullscan.gif" /></a> <a href="' . $helpurl . '" style="color:blue;text-decoration:underline;" target="_blank">查看如何取消</a>'; } $dirname = str_replace('index_body.php', '', strtolower($_SERVER['PHP_SELF'])); if (preg_match("#[\\|/]dede[\\|/]#", $dirname)) { $safeMsg[] = '默认管理目录为dede,需要立即将它更名;'; } if (IsWritable(DEDEDATA . '/common.inc.php')) { $safeMsg[] = '强烈建议data/common.inc.php文件属性设置为644(Linux/Unix)或只读(NT);'; } $rs = TestAdminPWD(); if ($rs < 0) { $linkurl = "<a href='sys_admin_user.php' style='color:blue;text-decoration:underline;'>马上修改</a>";