$source_file = realpath($t_args[0]); if ($source_file !== false && file_exists($source_file)) { if (is_file($source_file) && is_readable($source_file)) { $process_mode = 'file'; $target_file = $target; if ($target_file !== '' && file_exists($target_file)) { $x = realpath($target_file); if (is_dir($x)) { fprintf(STDERR, "Error:\tTarget file [%s] is a directory!%s", $x !== false ? $x : $target_file, PHP_EOL); exit(-1); } if (is_readable($x) && is_writable($x) && is_file($x)) { $fp = fopen($target_file, "r"); $y = fgets($fp); $y = fgets($fp) . fgets($fp) . fgets($fp) . fgets($fp) . fgets($fp); if ($y != $conf->get_comment()) { $x = realpath($target_file); fprintf(STDERR, "Error:\tTarget file [%s] exists and is not an obfuscated file!%s", $x !== false ? $x : $target_file, PHP_EOL); exit(-1); } fclose($fp); } } break; } if (is_dir($source_file)) { $process_mode = 'directory'; $source_directory = $source_file; $target_directory = $target; if ($target_directory == '' && isset($conf->target_directory)) { $target_directory = $conf->target_directory;