ARGUS WordPress Defence 1.0.0 — first production release
Automatic WordPress security: local firewall, malware and file-integrity scanning, vulnerability protection, quarantine, scheduled backups, an optional page cache, and automatic global threat intelligence. See README.md for installation, update, and uninstall instructions.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
$heartbeat_option = 'argus_wpd_mu_core_heartbeat';
|
||||
if ( time() - (int) get_option( $heartbeat_option, 0 ) > 300 ) {
|
||||
update_option( $heartbeat_option, time(), false );
|
||||
}
|
||||
|
||||
$plugin_dir = WP_PLUGIN_DIR . '/argus-wordpress-defence/includes/';
|
||||
|
||||
if ( ! file_exists( $plugin_dir . 'class-argus-db.php' ) ) {
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
require_once $plugin_dir . 'class-argus-request-inputs.php';
|
||||
require_once $plugin_dir . 'class-argus-waf-rules.php';
|
||||
require_once $plugin_dir . 'class-argus-db.php';
|
||||
require_once $plugin_dir . 'class-argus-settings.php';
|
||||
require_once $plugin_dir . 'class-argus-events.php';
|
||||
require_once $plugin_dir . 'class-argus-findings.php';
|
||||
require_once $plugin_dir . 'class-argus-explain.php';
|
||||
require_once $plugin_dir . 'class-argus-ban-engine.php';
|
||||
require_once $plugin_dir . 'class-argus-challenge.php';
|
||||
require_once $plugin_dir . 'class-argus-policy-engine.php';
|
||||
require_once $plugin_dir . 'class-argus-waf.php';
|
||||
require_once $plugin_dir . 'class-argus-anis-client.php';
|
||||
|
||||
Argus_ANIS_Client::init();
|
||||
|
||||
$is_ajax_or_post_endpoint = wp_doing_ajax() || ( isset( $_SERVER['SCRIPT_NAME'] ) && false !== strpos( $_SERVER['SCRIPT_NAME'], 'admin-post.php' ) ); // phpcs:ignore
|
||||
if ( ( is_admin() && ! $is_ajax_or_post_endpoint ) || ( defined( 'WP_CLI' ) && WP_CLI ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
Argus_WAF::inspect_and_enforce();
|
||||
} catch ( \Throwable $e ) {
|
||||
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user