note 112257 added to function.exec

From: Date: Fri, 24 May 2013 02:47:56 +0000
Subject: note 112257 added to function.exec
Groups: php.notes 
Request: Send a blank email to php-notes+get-194891@lists.php.net to get a copy of this message
After trying extensively to make exec() work with various windows apache mysql php servers i found one that works flawlessly called ampps, and wrote this script that lets you run command prompt commands from a browser. You can essentially run ipconfig, ping, tasklist or any command you normally would sitting in front of your computer running command prompt (cmd). Im running this on a windows 7 32 box using Softaculous AMPPS <form action="" method="post"> <textarea name="code" cols="50" rows="10"></textarea><br> <input type="submit" name="submit" value="Execute"> </form> <?php if (isset($_POST['submit'])){ $code = $_POST['code']; exec("$code", $output); echo '<pre>'; print_r($output); echo '</pre>'; } ?> ---- Server IP: 69.147.83.199 Probable Submitter: 96.41.51.65 ---- Manual Page -- http://php.net/manual/en/function.exec.php Edit -- https://master.php.net/note/edit/112257 Del: integrated -- https://master.php.net/note/delete/112257/integrated Del: useless -- https://master.php.net/note/delete/112257/useless Del: bad code -- https://master.php.net/note/delete/112257/bad+code Del: spam -- https://master.php.net/note/delete/112257/spam Del: non-english -- https://master.php.net/note/delete/112257/non-english Del: in docs -- https://master.php.net/note/delete/112257/in+docs Del: other reasons-- https://master.php.net/note/delete/112257 Reject -- https://master.php.net/note/reject/112257 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#194891) next »