This small python script scans for a number of variations on the PHP-CGI remote code execution vulnerability, includes “apache magica” and plesk paths, along with other misconfigurations.
You can download it from the following link: https://packetstormsecurity.com/files/download/125254/phpcgiscan.txt
Source: https://packetstormsecurity.com/files/125254/PHP-CGI-Remote-Code-Execution-Scanner.html