Code for litle checking $comand_line
Code:
<?php
// Vladimir Sinitsyn aka SenatoR
// Russia, Yekaterinburg
// Русские, привет! =)
#$command_line = "/aaa.php?bb=ccc&e";
$file_type = array('.php','.php4','.php5,'.cgi','.pl','.py'); //List of GOOD files ;-)
// only php, perl and python we let to execute
//Let`s start our work!
$flag = 0; //Use one thing!
foreach($file_type as $k=>$v) //Start
{
if(strpos($command_line,$v) == true) //Works fast!!! (its important)
{
$flag++; //Yeah! Its good!
$file = preg_replace("/(\\".$v.").*/i","\\1",$command_line); //CUT ALL!!! Only filename in $file!
break; //Stop
}
}
if($flag == 0) exit; //Nothing to do!
//Check something...
if(!file_exists($file)) exit; //No file!
if(!is_readable($file)) exit; //Wrong permissions!
if(strpos("cgi",$file) || strpos("pl",$file)) // only for cgi and pl and so..
{
if(!is_executable($file)) exit; //Wrong permissions!
}
?>
We can add thise simply checks to cronjobs_add.php & cronjobs_edit.php in future.
And now I go to testing hcrond-0.3.2.tar.gz
I do not know what is hcrond-nopid.