<? Php
/**
* Remotely start the computer
* Note: iis/apache requires windows/system/cmd.exe execution permission.
* Name: Xue rufei
* Qq: 6706250
* E-mail: xuerufei@163.com
* Blog: http://hi.baidu.com/apsara Stack
* Date: 08.08.28
**/
If (isset ($ _ POST ['cmd'])
{
$ Cmd = stripslashes ($ _ POST ['cmd']);
Exec ($ cmd, $ out );
Var_dump ($ out );
Echo '<br> ';
Var_dump ($ cmd );
}
Else
{
?>
<Meta http-equiv = "Content-Type" content = "text/html; charset = gb2312"/>
<Form action = "index. php" method = "post" name = "form0" id = "form0">
<P> </p>
<P align = "center"> CMD </p>
<Table width = "200" border = "0" align = "center">
<Tr>
<Td width = "81" height = "18"> options: </td>
<Td width = "109"> <select name = "cmd">
<Option value = "shutdown-r" selected = "selected"> restart the computer </option>
<Option value = "shutdown-s"> disable the computer </option>
<Option value = "shutdown-l"> log out of the current user </option>
</Select> </td>
</Tr>
<Tr>
<Td> </td>
<Td> <input type = "submit" name = "Submit" value = "submit"/> </td>
</Tr>
</Table>
<P> </p>
</Form>
<? Php
}
?>