mirror of
https://gh.wpcy.net/https://github.com/webguyio/dam-spam.git
synced 2026-05-26 03:13:58 +08:00
24 lines
No EOL
603 B
PHP
24 lines
No EOL
603 B
PHP
<?php
|
|
|
|
if ( !defined( 'ABSPATH' ) ) {
|
|
status_header( 404 );
|
|
exit;
|
|
}
|
|
|
|
class dam_spam_check_404s {
|
|
public function process( $ip, &$stats = array(), &$options = array(), &$post = array() ) {
|
|
if ( $options['check_404'] !== 'Y' ) {
|
|
return false;
|
|
}
|
|
$reason = dam_spam_load( 'check_404', $ip, $stats, $options, $post );
|
|
if ( $reason === false ) {
|
|
return;
|
|
}
|
|
dam_spam_log_bad( $ip, $reason, 'check_404' );
|
|
$reject_message = $options['reject_message'];
|
|
wp_die( esc_html( $reject_message ), esc_html__( 'Login Access Blocked', 'dam-spam' ), array( 'response' => 403 ) );
|
|
exit();
|
|
}
|
|
}
|
|
|
|
?>
|