Ejemplo n.º 1
0
 public function handle_ajax_request($data)
 {
     if ('secure-site' === $data['method']) {
         require_once dirname(__FILE__) . '/scanner.php';
         ITSEC_Security_Check_Scanner::run();
     } else {
         if ('activate-network-brute-force' === $data['method']) {
             require_once dirname(__FILE__) . '/scanner.php';
             ITSEC_Security_Check_Scanner::activate_network_brute_force();
         }
     }
 }
Ejemplo n.º 2
0
 public static function run()
 {
     self::$available_modules = ITSEC_Modules::get_available_modules();
     self::enforce_activation('ban-users', __('Banned Users', 'better-wp-security'));
     self::enforce_setting('ban-users', 'enable_ban_lists', true, __('Enabled the Enable Ban Lists setting in Banned Users.', 'better-wp-security'));
     self::enforce_activation('backup', __('Database Backups', 'better-wp-security'));
     self::enforce_activation('brute-force', __('Local Brute Force Protection', 'better-wp-security'));
     self::enforce_activation('malware-scheduling', __('Malware Scan Scheduling', 'better-wp-security'));
     self::enforce_setting('malware-scheduling', 'email_notifications', true, __('Enabled the Email Notifications setting in Malware Scan Scheduling.', 'better-wp-security'));
     self::add_network_brute_force_signup();
     self::enforce_activation('strong-passwords', __('Strong Password Enforcement', 'better-wp-security'));
     self::enforce_activation('two-factor', __('Two-Factor Authentication', 'better-wp-security'));
     self::enable_all_two_factor_providers();
     self::enforce_activation('user-logging', __('User Logging', 'better-wp-security'));
     self::enforce_activation('wordpress-tweaks', __('WordPress Tweaks', 'better-wp-security'));
     self::enforce_setting('wordpress-tweaks', 'file_editor', true, __('Disabled the File Editor in WordPress Tweaks.', 'better-wp-security'));
     self::enforce_setting('wordpress-tweaks', 'allow_xmlrpc_multiauth', false, __('Changed the Multiple Authentication Attempts per XML-RPC Request setting in WordPress Tweaks to "Block".', 'better-wp-security'));
     self::enforce_setting('global', 'write_files', true, __('Enabled the Write to Files setting in Global Settings.', 'better-wp-security'));
     ob_start();
     echo implode("\n", self::$calls_to_action);
     echo implode("\n", self::$actions_taken);
     echo implode("\n", self::$confirmations);
     ITSEC_Response::set_response(ob_get_clean());
 }