} } } parseArguments(); //get the object's info if (!file_exists($o2s)) { echo "The file/folder {$o2s} does not exist!\n"; exit(-1); } //init scanner if (is_dir($o2s)) { $scanner = new Scanner($scannerOptions); $scanner->getDirContents($o2s, true); } else { $scanner = new Scanner($scannerOptions); $scanner->addFileToScan($o2s); } //add steps include_once 'lib/step_simplestring.php'; $scanner->addStep(new StepSimplestring($scanner, $log)); include_once 'lib/step_simplepattern.php'; $scanner->addStep(new StepSimplepattern($scanner, $log)); include_once 'lib/step_preg.php'; $scanner->addStep(new StepPreg($scanner, $log)); include_once 'lib/step_wp.php'; $scanner->addStep(new StepWP($scanner, $log)); include_once 'lib/step_comments.php'; $scanner->addStep(new StepComments($scanner, $log)); //run scan $filenum = count($scanner->files); $log->logHeader();