4 Commits

Author SHA1 Message Date
bbcb72fecd version jump 2025-08-18 08:43:07 +00:00
e09bde4530 more meta removed 2025-08-18 08:41:30 +00:00
edb35ef576 Actualizar README.md 2025-06-26 08:03:12 +02:00
c6cfee9cc1 command force 2025-06-26 05:59:40 +00:00
2 changed files with 17 additions and 7 deletions

View File

@ -1,10 +1,9 @@
# Plugin for attacks mitigation # Plugin for attacks mitigation
## Install plugin and enable ## Install plugin and enable (force update also)
``` ```
wp plugin install --activate https://s.getcloud.info/n3storm/mitigation/archive/mitigation-0.03.zip wp plugin install --activate https://s.getcloud.info/nexos/mitigation/archive/mitigation-0.04.zip --force
``` ```
## Enable nginx mitigations ## Enable nginx mitigations
@ -23,6 +22,7 @@ server {
``` ```
## Remove "Server: nginx" at http headers ## Remove "Server: nginx" at http headers
``` ```
apt install libnginx-mod-http-headers-more-filter apt install libnginx-mod-http-headers-more-filter
``` ```
@ -36,6 +36,7 @@ http {
``` ```
Y después: Y después:
``` ```
service nginx reload service nginx reload
``` ```

View File

@ -2,7 +2,7 @@
/** /**
* Plugin Name: Mitigation * Plugin Name: Mitigation
* Description: A WordPress plugin with a main class for initialization methods. * Description: A WordPress plugin with a main class for initialization methods.
* Version: 1.0.0 * Version: 0.0.5
* Author: Your Name * Author: Your Name
* Text Domain: mitigation * Text Domain: mitigation
*/ */
@ -20,7 +20,7 @@ class Mitigation {
/** /**
* Plugin version * Plugin version
*/ */
const VERSION = '0.03'; const VERSION = '0.05';
/** /**
* Single instance of the class * Single instance of the class
@ -49,7 +49,8 @@ class Mitigation {
public function init() { public function init() {
// Hook into WordPress init // Hook into WordPress init
add_action('init', [$this, 'on_init']); add_action('init', [$this, 'on_init']);
add_action('wp_loaded', array($this, 'on_wp_loaded')); add_action('wp_loaded', [$this, 'on_wp_loaded']);
} }
public function run($actions) public function run($actions)
@ -82,6 +83,7 @@ class Mitigation {
'remove_wp_generator', 'remove_wp_generator',
]; ];
$this->run($actions); $this->run($actions);
add_filter('et_get_theme_version', [$this, 'remove_divi_version']);
} }
public function login_error_mask() public function login_error_mask()
@ -91,9 +93,16 @@ class Mitigation {
}); });
} }
public function remove_divi_version() {
return '';
}
public function remove_wp_generator() public function remove_wp_generator()
{ {
remove_action( 'wp_head', 'wp_generator' ); remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'wc_generator' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'rsd_link' );
} }
public function mitigation_remove_footer_shake() public function mitigation_remove_footer_shake()