Remote Code Execution in PHP Ping

Summary
php-ping is a simple php script executing the 'ping' command. A bug in this script allows users to execute arbitary commands. The problem is based upon the fact that not all user inputs are filtered correctly: although $host is filtered using preg_replace(), the $count variable is passed unfiltered to the system() command.