有人试图破解我的 Wordpress 网站,所以我会惹恼他们。他们使用脚本将密码猜测直接发布到 wp-login.php 页面。我可以用我的 .htaccess 文件轻松地阻止它:
<limit POST>
order deny,allow
deny from 188.213.49.210
</limit>
ErrorDocument 403 /fakelogin.php
但是 POST 不会重定向到我的 403 错误页面。对于那些好奇的人来说,fakelogin 页面会在他们每次猜测密码时强制下载整个乐高电影:
<?php
$file_url = '/rsc/The.Lego.Movie.2014.m4v';
header('Content-Type: application/octet-stream');
header("Content-Transfer-Encoding: Binary");
header("Content-disposition: attachment; filename=\"" . basename($file_url) . "\"");
echo "Fake page";
readfile($file_url);
?>
我对php的了解有限。当他对 wp-login.php 进行 POST 时,我该如何执行上述任务?如果需要,我愿意编辑 wp-login.php。
www说
largeQ
随时随地看视频慕课网APP