Plugin Directory

Changeset 3232957


Ignore:
Timestamp:
02/01/2025 05:47:22 AM (14 months ago)
Author:
boomdevs
Message:

Fix: Security issues

Location:
safe-ai-malware-protection-for-wp
Files:
119 added
3 deleted
30 edited

Legend:

Unmodified
Added
Removed
  • safe-ai-malware-protection-for-wp/trunk/README.txt

    r3195416 r3232957  
    11=== Safe Ai Malware Protection for WP ===
    2 Contributors: boomdevs, wpmessiah, enamulwp
     2Contributors: boomdevs, enamulwp
    33Tags: security,malware,wordpress security,malware Cleaner
    44Requires at least: 5.0
    55Tested up to: 6.7
    6 Stable tag: 1.0.17
     6Stable tag: 1.0.18
    77Requires PHP: 7.4
    88License: GPLv2 or later
     
    6868== Support ==
    6969
    70 If you have any questions, please email us at **[contact@wpmessiah.com](mailto:contact@wpmessiah.com)**
     70If you have any questions, please email us at **[contact@boomdevs.com](mailto:contact@boomdevs.com)**
    7171
    7272== Screenshots ==
     
    139139= 1.0.17 =
    140140fix: some minor issues
     141
     142= 1.0.18 =
     143Fix: Security issues.
  • safe-ai-malware-protection-for-wp/trunk/admin/class-malware-virus-scanner-plugin-admin.php

    r3185543 r3232957  
    44 * The admin-specific functionality of the plugin.
    55 *
    6  * @link       https://wpmessiah.com
     6 * @link       https://boomdevs.com
    77 * @since      1.0.0
    88 *
     
    1919 * @package    Malware_Virus_Scanner_Plugin
    2020 * @subpackage Malware_Virus_Scanner_Plugin/admin
    21  * @author     BoomDevs <contact@wpmessiah.com>
     21 * @author     BoomDevs <contact@boomdevs.com>
    2222 */
    2323class Malware_Virus_Scanner_Plugin_Admin {
  • safe-ai-malware-protection-for-wp/trunk/admin/partials/malware-virus-scanner-plugin-admin-display.php

    r3185543 r3232957  
    66 * This file is used to markup the admin-facing aspects of the plugin.
    77 *
    8  * @link       https://wpmessiah.com
     8 * @link       https://boomdevs.com
    99 * @since      1.0.0
    1010 *
  • safe-ai-malware-protection-for-wp/trunk/changelog.txt

    r3156881 r3232957  
    5151= 1.0.17 =
    5252fix: some minor issues
     53
     54= 1.0.18 =
     55Fix: Security issues.
  • safe-ai-malware-protection-for-wp/trunk/helper/class-get-plugins.php

    r3126680 r3232957  
    11<?php
    2 
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
     5   
    36    class MVSP_Plugins_Info {
    47
  • safe-ai-malware-protection-for-wp/trunk/includes/class-deployment-script.php

    r3156881 r3232957  
    11<?php
    2 
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
    35    class MVSP_Deployment_Script {
    46        public function __construct($dynamicToken, $zip_file_link, $dir_name) {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-malware-virus-scanner-plugin-activator.php

    r3185543 r3232957  
    44 * Fired during plugin activation
    55 *
    6  * @link       https://wpmessiah.com
     6 * @link       https://boomdevs.com
    77 * @since      1.0.0
    88 *
     
    1919 * @package    Malware_Virus_Scanner_Plugin
    2020 * @subpackage Malware_Virus_Scanner_Plugin/includes
    21  * @author     BoomDevs <contact@wpmessiah.com>
     21 * @author     BoomDevs <contact@boomdevs.com>
    2222 */
    2323class Malware_Virus_Scanner_Plugin_Activator {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-malware-virus-scanner-plugin-deactivator.php

    r3185543 r3232957  
    44 * Fired during plugin deactivation
    55 *
    6  * @link       https://wpmessiah.com
     6 * @link       https://boomdevs.com
    77 * @since      1.0.0
    88 *
     
    1919 * @package    Malware_Virus_Scanner_Plugin
    2020 * @subpackage Malware_Virus_Scanner_Plugin/includes
    21  * @author     BoomDevs <contact@wpmessiah.com>
     21 * @author     BoomDevs <contact@boomdevs.com>
    2222 */
    2323class Malware_Virus_Scanner_Plugin_Deactivator {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-malware-virus-scanner-plugin-i18n.php

    r3185543 r3232957  
    77 * so that it is ready for translation.
    88 *
    9  * @link       https://wpmessiah.com
     9 * @link       https://boomdevs.com
    1010 * @since      1.0.0
    1111 *
     
    2323 * @package    Malware_Virus_Scanner_Plugin
    2424 * @subpackage Malware_Virus_Scanner_Plugin/includes
    25  * @author     BoomDevs <contact@wpmessiah.com>
     25 * @author     BoomDevs <contact@boomdevs.com>
    2626 */
    2727class Malware_Virus_Scanner_Plugin_i18n {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-malware-virus-scanner-plugin-loader.php

    r3185543 r3232957  
    44 * Register all actions and filters for the plugin
    55 *
    6  * @link       https://wpmessiah.com
     6 * @link       https://boomdevs.com
    77 * @since      1.0.0
    88 *
     
    2020 * @package    Malware_Virus_Scanner_Plugin
    2121 * @subpackage Malware_Virus_Scanner_Plugin/includes
    22  * @author     BoomDevs <contact@wpmessiah.com>
     22 * @author     BoomDevs <contact@boomdevs.com>
    2323 */
    2424class Malware_Virus_Scanner_Plugin_Loader {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-malware-virus-scanner-plugin.php

    r3185543 r3232957  
    77 * public-facing side of the site and the admin area.
    88 *
    9  * @link       https://wpmessiah.com
     9 * @link       https://boomdevs.com
    1010 * @since      1.0.0
    1111 *
     
    2626 * @package    Malware_Virus_Scanner_Plugin
    2727 * @subpackage Malware_Virus_Scanner_Plugin/includes
    28  * @author     BoomDevs <contact@wpmessiah.com>
     28 * @author     BoomDevs <contact@boomdevs.com>
    2929 */
    3030class Malware_Virus_Scanner_Plugin {
     
    7171            $this->version = MVSP_PLUGIN_VERSION;
    7272        } else {
    73             $this->version = '1.0.17';
     73            $this->version = '1.0.18';
    7474        }
    75         $this->plugin_name = 'malware-virus-scanner-plugin';
     75        $this->plugin_name = 'wpsafe-ai-malware-protection';
    7676
    7777        $this->load_dependencies();
     
    128128        require_once plugin_dir_path( dirname(__FILE__) ) . 'includes/class-mvsp-register-menu.php';
    129129        require_once plugin_dir_path( dirname(__FILE__) ) . 'includes/class-mvsp-ajax.php';
    130         require_once plugin_dir_path( dirname(__FILE__) ) . 'includes/class-mvsp-schedular.php';
    131130
    132131        $this->loader = new Malware_Virus_Scanner_Plugin_Loader();
     
    169168                ?>
    170169                <div class="error">
    171                     <p><?php echo esc_html__('Error: Authorization error please try again letter', 'malware-virus-scanner-plugin');?></p>
     170                    <p><?php echo esc_html__('Error: Authorization error please try again letter', 'wpsafe-ai-malware-protection');?></p>
    172171                </div>
    173172                <?php
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-ajax.php

    r3097987 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
     5   
    26    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-store-authorized-token.php';
    37    class MVSP_Ajax {
     
    1519                $return = array(
    1620                    'status' => false,
    17                     'message'  => esc_html__('Unauthorized user', 'malware-virus-scanner-plugin'),
     21                    'message'  => esc_html__('Unauthorized user', 'wpsafe-ai-malware-protection'),
    1822                );
    1923
     
    3741                $return = array(
    3842                    'status' => false,
    39                     'message' => esc_html__('Unauthorized user', 'malware-virus-scanner-plugin'),
     43                    'message' => esc_html__('Unauthorized user', 'wpsafe-ai-malware-protection'),
    4044                );
    4145
     
    5660                $return = array(
    5761                    'status' => false,
    58                     'message' => esc_html__('Something went wrong', 'malware-virus-scanner-plugin'),
     62                    'message' => esc_html__('Something went wrong', 'wpsafe-ai-malware-protection'),
    5963                );
    6064
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-check-php.php

    r3076790 r3232957  
    11<?php
    2 
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
    35// Check php version for wordpress
    46
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-encryption.php

    r3076790 r3232957  
    3434            return $data;
    3535        }
    36         public static function encrypt_file($inputFile, $outputFile, $token) {
    37             $data = MVSP_Encryption::download_file($inputFile);
    38             $iv = openssl_random_pseudo_bytes(openssl_cipher_iv_length('aes-256-cbc'));
    39             $encryptedData = openssl_encrypt($data, 'aes-256-cbc', $token, 0, $iv);
    40             file_put_contents($outputFile, $iv . $encryptedData);
    41         }
    42 
     36       
    4337        public static function decrypt_file($inputFile, $outputFile, $token) {
    4438            $data = file_get_contents($inputFile);
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-export-db.php

    r3156881 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
     5   
    26    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-mvsp-encryption.php';
    3     // require_once plugin_dir_path( __DIR__ ) . 'libs/updraftplus/updraftplus.php';
    4 
    57    class MVSP_Export_DB
    68    {
    7         public static function export_db()
    8         {
    9             require_once plugin_dir_path(dirname(__FILE__)) . 'libs/updraftplus/updraftplus.php';
    10             require_once plugin_dir_path(dirname(__FILE__)) . 'libs/updraftplus/backup.php';
    11             // require_once ABSPATH . 'wp-load.php';
    12             // global $wpdb;
    13             // $db_user = DB_USER;
    14             // $db_pass = DB_PASSWORD;
    15             // $db_name = DB_NAME;
    16             // $db_host = DB_HOST;
    17 
    18             $exported_db_filename = get_option('mvsp_auth_token');
    19             $exported_db_filename = substr($exported_db_filename, 0, 40);
    20             // // Create a connection to the database
    21             // $mysqli = new mysqli($db_host, $db_user, $db_pass, $db_name);
    22 
    23             // // Check the connection
    24             // if ($mysqli->connect_error) {
    25             //  die('Connection failed: ' . $mysqli->connect_error);
    26             // }
    27 
    28             // // Output file name and path
    29             // $output_file = $exported_db_filename.'.txt';
    30 
    31             // // Open the output file for writing
    32             // $file = fopen($output_file, 'w');
    33 
    34             // // Write the SQL dump header
    35             // fwrite($file, "-- phpMyAdmin SQL Dump\n");
    36             // fwrite($file, "-- version 5.2.0\n");
    37             // fwrite($file, "-- https://www.phpmyadmin.net/\n");
    38             // fwrite($file, "--\n");
    39             // fwrite($file, "-- Host: $db_host\n");
    40             // fwrite($file, "-- Generation Time: " . date("M d, Y \a\\t H:i A") . "\n");
    41             // fwrite($file, "-- Server version: " . $mysqli->server_info . "\n");
    42             // fwrite($file, "-- PHP Version: " . phpversion() . "\n\n");
    43 
    44             // // Set SQL mode and start transaction
    45             // fwrite($file, "SET SQL_MODE = \"NO_AUTO_VALUE_ON_ZERO\";\n");
    46             // fwrite($file, "START TRANSACTION;\n");
    47             // fwrite($file, "SET time_zone = \"+00:00\";\n\n");
    48 
    49             // // Set character set settings
    50             // fwrite($file, "/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n");
    51             // fwrite($file, "/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;\n");
    52             // fwrite($file, "/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n");
    53             // fwrite($file, "/*!40101 SET NAMES utf8mb4 */;\n\n");
    54 
    55             // // Write database information
    56             // fwrite($file, "--\n-- Database: `$db_name`\n--\n\n");
    57 
    58             // // Iterate through each table and export structure and data
    59             // $result = $mysqli->query("SHOW TABLES");
    60             // while ($row = $result->fetch_row()) {
    61             //  $table = $row[0];
    62 
    63             //  // Export table structure
    64             //  $result_structure = $mysqli->query("SHOW CREATE TABLE $table");
    65             //  $table_structure = $result_structure->fetch_row()[1];
    66             //  fwrite($file, "$table_structure;\n\n");
    67 
    68             //  // Export table data
    69             //  $result_data = $mysqli->query("SELECT * FROM $table");
    70             //  while ($data_row = $result_data->fetch_assoc()) {
    71             //      $values = array_map([$mysqli, 'real_escape_string'], array_values($data_row));
    72             //      fwrite($file, "INSERT INTO $table VALUES ('" . implode("', '", $values) . "');\n");
    73             //  }
    74 
    75             //  fwrite($file, "\n");
    76             // }
    77 
    78             // // Close the output file and database connection
    79             // fclose($file);
    80             // $mysqli->close();
    81 
    82             // $sql_dump_file_path = ABSPATH . $output_file;
    83             // $sql_dump_content = file_get_contents($sql_dump_file_path);
    84            
    85             // // Check if the string exists in the file content
    86             // if (strpos($sql_dump_content, 'COLLATE=utf8mb4_unicode_520_ci') !== false) {
    87             //     // Perform the replacement
    88             //     $sql_dump_content = str_replace('COLLATE=utf8mb4_unicode_520_ci', 'COLLATE=utf8mb4_unicode_ci', $sql_dump_content);
    89             //     // Write the modified content back to the SQL dump file
    90             //     file_put_contents($sql_dump_file_path, $sql_dump_content);
    91             // }
    92            
    93             // return $output_file;
    94 
    95 
    96             $updraft_backup_obj = new UpdraftPlus_Backup('no', ABSPATH, $exported_db_filename, -1);
    97             return $updraft_backup_obj->backup_db();
    98         }
    99 
    1009        public static function get_db_config()
    10110        {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-generate-token.php

    r3076790 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
     5   
    26    class MVSP_Generate_Token {
    37        public static function generate_token($string) {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-register-menu.php

    r3097987 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
     5   
    26    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-store-authorized-token.php';
    37    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-mvsp-templates.php';
     
    1519            $menu_slug = 'malware-virus-scanner';
    1620            $add_site_menu_slug = 'safe-ai-malware-connect';
    17             add_menu_page( esc_html__('WPSafe.AI', 'malware-virus-scanner-plugin'), esc_html__('WPSafe.AI', 'malware-virus-scanner-plugin'), 'read', $add_site_menu_slug, false );
    18             add_submenu_page( $add_site_menu_slug, esc_html__('Connect site', 'malware-virus-scanner-plugin'), esc_html__('Connect site', 'malware-virus-scanner-plugin'), 'manage_options', $add_site_menu_slug, [$this, 'site_add'] );
    19             // add_submenu_page( $add_site_menu_slug, esc_html__('Report', 'malware-virus-scanner-plugin'), esc_html__('Report', 'malware-virus-scanner-plugin'), 'manage_options', 'malware-virus-scanner-site-report', [$this, 'site_report'] );
     21            add_menu_page( esc_html__('WPSafe.AI', 'wpsafe-ai-malware-protection'), esc_html__('WPSafe.AI', 'wpsafe-ai-malware-protection'), 'read', $add_site_menu_slug, false );
     22            add_submenu_page( $add_site_menu_slug, esc_html__('Connect site', 'wpsafe-ai-malware-protection'), esc_html__('Connect site', 'wpsafe-ai-malware-protection'), 'manage_options', $add_site_menu_slug, [$this, 'site_add'] );
     23            // add_submenu_page( $add_site_menu_slug, esc_html__('Report', 'wpsafe-ai-malware-protection'), esc_html__('Report', 'wpsafe-ai-malware-protection'), 'manage_options', 'malware-virus-scanner-site-report', [$this, 'site_report'] );
    2024        }
    2125
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-rest-api.php

    r3156881 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
     5
    26    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-mvsp-wp-info.php';
    37    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-mvsp-check-php.php';
     
    1115    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-plugins-info.php';
    1216    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-mvsp-theme-lists.php';
     17    require_once plugin_dir_path(dirname(__FILE__)) . 'helper/class-get-plugins.php';
     18
     19    require_once plugin_dir_path(dirname(__FILE__)) . 'vendor/autoload.php';
     20    use Firebase\JWT\JWT;
     21    use Firebase\JWT\Key;
    1322
    1423    /**
     
    2635                ));
    2736
    28                 register_rest_route('mvsp/v1', '/export-db', array(
    29                     'methods' => 'POST',
    30                     'callback' => array($this, 'export_db'),
    31                     // 'permission_callback' => array($this, 'check_user_authenticated'),
    32                     'permission_callback' => '__return_true',
    33                 ));
    34 
    3537                register_rest_route('mvsp/v1', '/delete-exported-db', array(
    3638                    'methods' => 'POST',
     
    249251                    // 'permission_callback' => '__return_true',
    250252                ));
     253               
     254                register_rest_route('mvsp/v1', '/technical-assessment', array(
     255                    'methods' => 'POST',
     256                    'callback' => array($this, 'technical_assessment'),
     257                    'permission_callback' => array($this, 'check_user_authenticated'),
     258                //  'permission_callback' => '__return_true',
     259                ));
     260
     261                register_rest_route('mvsp/v1', '/free-plugins', array(
     262                    'methods' => 'POST',
     263                    'callback' => array($this, 'free_plugins'),
     264                    'permission_callback' => array($this, 'check_user_authenticated'),
     265                //  'permission_callback' => '__return_true',
     266                ));
     267               
     268                register_rest_route('mvsp/v1', '/premium-plugins', array(
     269                    'methods' => 'POST',
     270                    'callback' => array($this, 'premium_plugins'),
     271                    'permission_callback' => array($this, 'check_user_authenticated'),
     272                //  'permission_callback' => '__return_true',
     273                ));
     274               
     275                register_rest_route('mvsp/v1', '/free-themes', array(
     276                    'methods' => 'POST',
     277                    'callback' => array($this, 'free_themes'),
     278                    'permission_callback' => array($this, 'check_user_authenticated'),
     279                //  'permission_callback' => '__return_true',
     280                ));
     281               
     282                register_rest_route('mvsp/v1', '/premium-themes', array(
     283                    'methods' => 'POST',
     284                    'callback' => array($this, 'premium_themes'),
     285                    'permission_callback' => array($this, 'check_user_authenticated'),
     286                //  'permission_callback' => '__return_true',
     287                ));
    251288            });
     289        }
     290       
     291        // Free themes callback
     292        public function free_themes() {
     293            if ( ! function_exists( 'themes_api' ) ) {
     294                require_once( ABSPATH . 'wp-admin/includes/theme.php' );
     295            }
     296           
     297            $response = [MVSP_Themes_List::themes_list()];
     298            $active_theme = wp_get_theme()->get('Name');
     299            $free_themes_response = [];
     300           
     301            if(count($response[0]['free_themes'])> 0) {
     302                 foreach($response[0]['free_themes'] as $single_theme){
     303                     $request = themes_api('theme_information', array(
     304                        'slug'   => $single_theme['slug'],
     305                        'fields' => array(
     306                            'version' => true,
     307                        ),
     308                    ));
     309                   
     310                    $latest_version  = null;
     311                   
     312                    if (!is_wp_error($request)) {
     313                        $latest_version  = $request->version;
     314                    }
     315                   
     316                    $free_themes_response[] = array(
     317                        'name' => $single_theme['Name'],
     318                        'version' => $single_theme['Version'],
     319                        'new_version' => $latest_version,
     320                        'activated' => $active_theme === $single_theme['Name']
     321                    );
     322                 }
     323            }
     324           
     325            return new WP_REST_Response(
     326                array(
     327                    'status' => true,
     328                    'data' => $free_themes_response
     329                ), 200);
     330        }
     331       
     332        // Premium themes callback
     333        // Free themes callback
     334        public function premium_themes() {
     335            if ( ! function_exists( 'themes_api' ) ) {
     336                require_once( ABSPATH . 'wp-admin/includes/theme.php' );
     337            }
     338           
     339            $response = [MVSP_Themes_List::themes_list()];
     340            $active_theme = wp_get_theme()->get('Name');
     341            $premium_themes_response = [];
     342           
     343            if(count($response[0]['premium_themes'])> 0) {
     344                 foreach($response[0]['premium_themes'] as $single_theme){
     345                    $premium_themes_response[] = array(
     346                        'name' => $single_theme['Name'],
     347                        'version' => $single_theme['Version'],
     348                        'new_version' => null,
     349                        'activated' => $active_theme === $single_theme['Name']
     350                    );
     351                 }
     352            }
     353           
     354            return new WP_REST_Response(
     355                array(
     356                    'status' => true,
     357                    'data' => $premium_themes_response
     358                ), 200);
     359        }
     360
     361        // Free plugins callback
     362        public function free_plugins() {
     363            global $wpdb, $wp_rewrite;
     364            if ( ! function_exists( 'get_plugins' ) ) {
     365                require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     366            }
     367           
     368           
     369            $all_plugins = get_plugins();
     370            $plugins_info = MVSP_Plugins_Info::plugins_info($all_plugins);
     371           
     372           
     373            $response = [];
     374           
     375            if (count($plugins_info) > 0) {
     376                foreach ($plugins_info as $single_plugin) {
     377                    if ($single_plugin->download_link !== null) {
     378                        $response[] = [
     379                            'name' => $single_plugin->Name,
     380                            'varsion' => $single_plugin->Version,
     381                            'new_version' => $single_plugin->new_version,
     382                            'activated' => is_plugin_active($single_plugin->plugin)
     383                        ];
     384                    }
     385                }
     386            }
     387           
     388            return new WP_REST_Response(
     389                array(
     390                    'status' => true,
     391                    'data' => $response
     392                ), 200
     393            );
     394        }
     395       
     396        // Premium plugins handler
     397        public function premium_plugins() {
     398            global $wpdb, $wp_rewrite;
     399            if ( ! function_exists( 'get_plugins' ) ) {
     400                require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     401            }
     402           
     403           
     404            $all_plugins = get_plugins();
     405            $plugins_info = MVSP_Plugins_Info::plugins_info($all_plugins);
     406           
     407            $response = [];
     408           
     409            if (count($plugins_info) > 0) {
     410                $active_plugins = get_option( 'active_plugins' );
     411               
     412                foreach ($plugins_info as $single_plugin) {
     413                    if ($single_plugin->download_link === null) {
     414                        // var_dump($single_plugin);
     415                       
     416                        $found = false;  // Flag to track if the plugin is found
     417
     418                        foreach ( $active_plugins as $plugin ) {
     419                            if ( strpos( $plugin, $single_plugin->folder_name ) !== false ) {
     420                                $found = true;
     421                            }
     422                        }
     423                       
     424                        $response[] = array(
     425                           'name' => $single_plugin->Name,
     426                            'varsion' => $single_plugin->Version,
     427                            'new_version' => $single_plugin->new_version,
     428                            'activated' => $found
     429                        );
     430                    }
     431                }
     432            }
     433           
     434            return new WP_REST_Response(
     435                array(
     436                    'status' => true,
     437                    'data' => $response
     438                ), 200
     439            );
     440        }
     441       
     442        public function technical_assessment() {
     443             // Get the list of all installed plugins
     444            global $wpdb, $wp_rewrite;
     445           
     446            if ( ! function_exists( 'get_plugins' ) ) {
     447                require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
     448            }
     449           
     450            $all_plugins = get_plugins();
     451           
     452            $response = [
     453                'automatic_update' => true,
     454                'free_plugins_updated' => true,
     455                'premium_plugins_updated' => true,
     456                'disable_search_engine' => false,
     457                'file_editing_enabled' => true,
     458                'admin_user_exists' => false,
     459                'frontend_edit_enabled' => false,
     460                'deactivated_plugins' => false,
     461                'akismet_plugin_activated' => false,
     462                'vulnerabilities' => false,
     463                'protect_wp_config' => false,
     464                'protect_readme_html' => false,
     465                'disable_directory_access' => false,
     466                'protect_install_php' => false,
     467                'disabled_debug_mode' => false,
     468                'deactivated_themes' => false,
     469                'protect_upgrade_php' => false,
     470                'admin_accounts' => true,
     471                'stable_wordpress_version' => false,
     472                'wordpress_version_hide' => false,
     473                'revision_posts' => false,
     474                'user_friendly_permalink' => false,
     475                'timezone_settings' => true,
     476                'sample_page' => false,
     477                'sample_post' => false,
     478                'sample_comment' => false
     479            ];
     480           
     481            // Get the list of plugins with auto-update enabled
     482            $auto_update_plugins = get_site_option('auto_update_plugins', []);
     483            $all_have_auto_update = true;
     484           
     485            foreach ($all_plugins as $plugin_file => $plugin_data) {
     486                if (!in_array($plugin_file, $auto_update_plugins)) {
     487                    $all_have_auto_update = false;
     488                }
     489            }
     490           
     491            $response['automatic_update'] = $all_have_auto_update;
     492           
     493            // Autometic update end
     494           
     495            // Get premium and free plugins
     496            // Load all installed plugins
     497           
     498            $plugins_info = MVSP_Plugins_Info::plugins_info($all_plugins);
     499            $updates = get_site_transient('update_plugins');
     500           
     501            $need_update = [];
     502           
     503            if (!empty($updates->response)) {
     504                foreach ($updates->response as $plugin_file => $plugin_data) {
     505                    $need_update[] = $plugin_data->slug;
     506                }
     507            }
     508           
     509           
     510            if (count($plugins_info) > 0) {
     511                foreach ($plugins_info as $single_plugin) {
     512                    // Check if the plugin is premium (no download link) or free
     513                    if ($single_plugin->download_link === null) {
     514                        if(in_array($single_plugin->slug, $need_update)) {
     515                            $response['premium_plugins_updated'] = false;
     516                            $response['vulnerabilities'] = true;
     517                        }
     518                    } else {
     519                        if(in_array($single_plugin->slug, $need_update)) {
     520                            $response['free_plugins_updated'] = in_array($single_plugin->slug, $need_update) ? false : true;
     521                            $response['vulnerabilities'] = true;
     522                        }
     523                    }
     524                }
     525            }
     526           
     527            // Check if file editing is disabled
     528            if (defined('DISALLOW_FILE_EDIT') && DISALLOW_FILE_EDIT) {
     529                $response['file_editing_enabled'] = false;
     530            }
     531           
     532            // Check if an admin user with username 'admin' exists
     533            $user = get_user_by('login', 'admin');
     534           
     535            if ($user && in_array('administrator', $user->roles)) {
     536                $response['admin_user_exists'] = true;
     537            }
     538           
     539            $blog_public = get_option('blog_public');
     540           
     541            if ($blog_public === '0') {
     542                $response['disable_search_engine'] = true;
     543            }
     544           
     545            if (is_admin_bar_showing()) {
     546                $response['frontend_edit_enabled'] = true;
     547            }
     548           
     549           
     550            // Get the list of active plugins
     551            $active_plugins = get_option('active_plugins');
     552           
     553            // Check if any plugin is deactivated
     554            foreach ($all_plugins as $plugin_file => $plugin_data) {
     555                if (!in_array($plugin_file, $active_plugins)) {
     556                    $response['deactivated_plugins'] = true;
     557                    break;
     558                }
     559            }
     560           
     561            if(is_plugin_active('akismet/akismet.php')) {
     562                $response['akismet_plugin_activated'] = true;
     563            }
     564           
     565            $url = home_url('/wp-config.php');
     566            $headers = get_headers($url);
     567           
     568            if (strpos($headers[0], '403') || strpos($headers[0], '404')) {
     569                $response['protect_wp_config'] = true;
     570            }
     571           
     572            $url = home_url('/readme.html');
     573            $headers = get_headers($url);
     574           
     575            if (strpos($headers[0], '403') || strpos($headers[0], '404')) {
     576                $response['protect_readme_html'] = true;
     577            }
     578           
     579            $url = home_url('/install.php');
     580            $headers = get_headers($url);
     581           
     582            if (strpos($headers[0], '403') || strpos($headers[0], '404')) {
     583                $response['protect_install_php'] = true;
     584            }
     585           
     586            $directory_path = ABSPATH . 'wp-content/uploads';
     587           
     588            if(!opendir($directory_path)) {
     589                $response['disable_directory_access'] = true;
     590            }
     591           
     592            $response['disabled_debug_mode'] = defined('WP_DEBUG') && WP_DEBUG === false;
     593           
     594           
     595            $deactivated_themes = [];
     596            $all_themes = wp_get_themes();
     597            $active_theme = wp_get_theme()->get_stylesheet();
     598           
     599            foreach ($all_themes as $theme_name => $theme_obj) {
     600                if ($theme_name !== $active_theme) {
     601                    $deactivated_themes[] = $theme_obj->get('Name');
     602                }
     603            }
     604           
     605           
     606            if(count($deactivated_themes) > 0) {
     607                $response['deactivated_themes'] = true;
     608                $response['vulnerabilities'] = true;
     609            }
     610           
     611            $url = home_url('/upgrade.php');
     612            $headers = get_headers($url);
     613           
     614            if (strpos($headers[0], '403') || strpos($headers[0], '404')) {
     615                $response['protect_upgrade_php'] = true;
     616            }
     617           
     618            // Get the installed WordPress version
     619            $installed_version = get_bloginfo('version');
     620           
     621            // Fetch the latest version information from WordPress.org API
     622            $latest_version_data = file_get_contents('https://api.wordpress.org/core/version-check/1.7/');
     623            $latest_version_info = json_decode($latest_version_data, true);
     624            $latest_stable_version = $latest_version_info['offers'][0]['current'];
     625           
     626            if (version_compare($installed_version, $latest_stable_version, '>=')) {
     627                $response['stable_wordpress_version'] = true;
     628            }
     629           
     630            $response['wordpress_version_hide'] = !has_action('wp_head', 'wp_generator');
     631
     632            // The ID of the post you want to check
     633            $post_id = 123; // Replace with the actual post ID
     634           
     635            // SQL query to check for revisions
     636            $query = "
     637                SELECT COUNT(*)
     638                FROM {$wpdb->posts}
     639                WHERE post_type = 'revision'
     640            ";
     641           
     642            $revision_count = $wpdb->get_var( $wpdb->prepare( $query ) );
     643            if(intval($revision_count) > 0) {
     644                $response['revision_posts'] = true;
     645            }
     646           
     647            $permalink_structure = $wp_rewrite->permalink_structure;
     648            if (strpos($permalink_structure, '%postname%') !== false) {
     649                $response['user_friendly_permalink'] = true;
     650            }
     651           
     652            // Query for pages with the title 'Sample Page'
     653            $args = array(
     654                'post_title' => 'Sample Page',
     655                'post_type'  => 'page',
     656                'posts_per_page' => 1
     657            );
     658           
     659            $query = new WP_Query( $args );
     660           
     661            // Check if the page exists
     662            if ( $query->have_posts() ) {
     663                $response['sample_page'] = true;
     664            }
     665           
     666            $args = array(
     667                'post_type' => 'post',           // We're looking for posts
     668                'post_title' => 'Hello World!',  // The default sample post title
     669                'posts_per_page' => 1            // Limit to 1 post
     670            );
     671           
     672            $query = new WP_Query( $args );
     673           
     674            if ( $query->have_posts() ) {
     675                $response['sample_post'] = true;
     676            }
     677           
     678            $args = array(
     679                'post_type'    => 'post',      // We're looking for comments on posts
     680                'number'       => 1,           // Limit to 1 comment
     681                'search'       => 'This is a sample comment',  // Search for a specific sample comment text
     682            );
     683           
     684            $comments = get_comments( $args );
     685           
     686            if ( ! empty( $comments ) ) {
     687                $response['sample_comment'] = true;
     688            }
     689           
     690            return new WP_REST_Response(
     691                array(
     692                    'status' => true,
     693                    'data' => $response
     694                ), 200
     695            );
     696               
    252697        }
    253698
     
    283728                    array(
    284729                        'status' => false,
    285                         'error' => esc_html__($archive->errorInfo(true), 'malware-virus-scanner-plugin')
     730                        'error' => esc_html__($archive->errorInfo(true), 'wpsafe-ai-malware-protection')
    286731                    ), 400);
    287732            }
     
    292737        public static function check_user_authenticated(WP_REST_Request $request){
    293738
    294             $check_env = plugin_dir_path(dirname(__FILE__)) . '.env';
    295 
    296             $debug = false;
    297             if(file_exists($check_env)) {
    298                 $debug = getenv('DEBUG_MODE');
    299             }
    300 
    301             if($debug === true) {
    302                 return true;
    303             }
    304739
    305740            $header = $request->get_headers();
     741
     742            // User verify using nonce
     743            if (!isset($header['nonce'][0]) || !wp_verify_nonce($header['nonce'][0], 'verify_user_authorized')) {
     744                return false;
     745            }
     746
     747            // JWT Authentication with role
     748            $auth_header = $request->get_header('authorization');
     749
     750            if (!$auth_header) {
     751                return false;
     752            }
     753
    306754            $token = get_option('mvsp_auth_token');
     755
     756            // Extract token from "Bearer {token}"
     757            list(, $access_token) = explode(' ', $auth_header, 2);
     758
     759            try {
     760                $get_user = JWT::decode($access_token, new Key($token, 'HS256'));
     761            } catch (Exception $e) {
     762                return false;
     763            }
     764
     765            // Check if the user is an administrator
     766            if ($get_user->role !== 'administrator') {
     767                return new WP_REST_Response(
     768                    array('status' => false, 'error' => 'Unauthorized access'),
     769                    403
     770                );
     771            }
     772
     773            // User verify using token
    307774            if (isset($header['auth_token']) && count($header['auth_token']) > 0 && $header['auth_token'][0] !== '') {
    308775                if ($header['auth_token'][0] === $token) {
     
    312779                return false;
    313780            }
    314 
    315781        }
    316782
     
    328794                    array(
    329795                        'status' => false,
    330                         'error' =>esc_html__('Authentication failed', 'malware-virus-scanner-plugin')
     796                        'error' =>esc_html__('Authentication failed', 'wpsafe-ai-malware-protection')
    331797                    ),401
    332798                );
     
    340806                    array(
    341807                        'status' => false,
    342                         'error' => esc_html__('You don`t have permission.', 'malware-virus-scanner-plugin')
     808                        'error' => esc_html__('You don`t have permission.', 'wpsafe-ai-malware-protection')
    343809                    ), 401);
    344810            }
    345 
     811           
     812           
    346813            // Generate hash token for authentication
    347814            $token = get_option('mvsp_auth_token');
     
    353820            }
    354821
     822            // Generate JWT Token with role
     823            $payload = [
     824                'iss' => get_site_url(),
     825                'iat' => time(),
     826                'exp' => time() + 3600, // Token expires in 1 hour
     827                'user_id' => $user->ID,
     828                'role' => $user_role_member
     829            ];
     830           
     831            $access_token = JWT::encode($payload, $token, 'HS256');
     832
    355833            $response = [
     834                'access_token' => $access_token,
    356835                'token' => $token,
     836                'nonce' => wp_create_nonce('verify_user_authorized'),
    357837                'theme_uri' => wp_get_theme(get_option('stylesheet'))->get('ThemeURI'),
    358838                'screenshot_url' => wp_get_theme(get_option('stylesheet'))->get_screenshot(),
     
    368848        }
    369849
    370         public function export_db()
    371         {
    372             $db_url = MVSP_Export_DB::export_db();
    373             return new WP_REST_Response(
    374                 array(
    375                     'status' => true,
    376                     'data' => site_url() . '/' . $db_url
    377                 ), 200);
    378         }
    379 
    380850        public function delete_exported_db(WP_REST_Request $request) {
    381851            $filename = $request->get_param('filename');
     
    387857                array(
    388858                    'status' => true,
    389                     'message' => esc_html__('Exported sql file deleted successfully.', 'malware-virus-scanner-plugin')
     859                    'message' => esc_html__('Exported sql file deleted successfully.', 'wpsafe-ai-malware-protection')
    390860                ), 200);
    391861        }
     
    8241294                    array(
    8251295                        'status' => true,
    826                         'message' => esc_html__('Verified', 'malware-virus-scanner-plugin')
     1296                        'message' => esc_html__('Verified', 'wpsafe-ai-malware-protection')
    8271297                    ),
    8281298                    200
     
    8321302                    array(
    8331303                        'status' => false,
    834                         'error' => esc_html__('This token not verified.', 'malware-virus-scanner-plugin')
     1304                        'error' => esc_html__('This token not verified.', 'wpsafe-ai-malware-protection')
    8351305                    ),
    8361306                    400
     
    8461316                    array(
    8471317                        'status' => false,
    848                         'error' => esc_html__('File name is required.', 'malware-virus-scanner-plugin')
     1318                        'error' => esc_html__('File name is required.', 'wpsafe-ai-malware-protection')
    8491319                    ),
    8501320                    400
     
    8581328                array(
    8591329                    'status' => true,
    860                     'message' => esc_html__('File is deleted successfully.', 'malware-virus-scanner-plugin')
     1330                    'message' => esc_html__('File is deleted successfully.', 'wpsafe-ai-malware-protection')
    8611331                ), 200);
    8621332        }
     
    8871357                    array(
    8881358                        'status' => false,
    889                         'message' => esc_html__('File path is required.', 'malware-virus-scanner-plugin')
     1359                        'message' => esc_html__('File path is required.', 'wpsafe-ai-malware-protection')
    8901360                    ),
    8911361                    400
     
    8991369                    array(
    9001370                        'status' => false,
    901                         'message' => esc_html__('Directory name is required.', 'malware-virus-scanner-plugin')
     1371                        'message' => esc_html__('Directory name is required.', 'wpsafe-ai-malware-protection')
    9021372                    ),
    9031373                    400
     
    9461416                        array(
    9471417                            'status' => true,
    948                             'message' => __('Successfully removed the deployment script', 'malware-virus-scanner-plugin')
     1418                            'message' => __('Successfully removed the deployment script', 'wpsafe-ai-malware-protection')
    9491419                        ), 200);
    9501420                }
     
    9541424                array(
    9551425                    'status' => false,
    956                     'message' => __('Deployment script not found', 'malware-virus-scanner-plugin')
     1426                    'message' => __('Deployment script not found', 'wpsafe-ai-malware-protection')
    9571427                ), 400);
    9581428        }
     
    11081578                        array(
    11091579                            'status' => false,
    1110                             'message' => __('Token is not valid', 'malware-virus-scanner-plugin')
     1580                            'message' => __('Token is not valid', 'wpsafe-ai-malware-protection')
    11111581                        ), 400);
    11121582                } else {
     
    11161586                        array(
    11171587                            'status' => true,
    1118                             'message' => esc_html__('Site disconnected', 'malware-virus-scanner-plugin')
     1588                            'message' => esc_html__('Site disconnected', 'wpsafe-ai-malware-protection')
    11191589                        ), 200);
    11201590                }
     
    11231593                    array(
    11241594                        'status' => false,
    1125                         'message' => __('Token not found', 'malware-virus-scanner-plugin')
     1595                        'message' => __('Token not found', 'wpsafe-ai-malware-protection')
    11261596                    ), 400);
    11271597            }
     
    13401810                        array(
    13411811                            'status' => false,
    1342                             'message' => __('Error: Unable to open file.', 'malware-virus-scanner-plugin')
     1812                            'message' => __('Error: Unable to open file.', 'wpsafe-ai-malware-protection')
    13431813                        ), 400);
    13441814                } else {
     
    13481818                            array(
    13491819                                'status' => false,
    1350                                 'message' => __('Error: Unable to write to file.', 'malware-virus-scanner-plugin')
     1820                                'message' => __('Error: Unable to write to file.', 'wpsafe-ai-malware-protection')
    13511821                            ), 400);
    13521822                    } else {
     
    13661836                array(
    13671837                    'status' => false,
    1368                     'message' => __('.htaccess file not found.', 'malware-virus-scanner-plugin')
     1838                    'message' => __('.htaccess file not found.', 'wpsafe-ai-malware-protection')
    13691839                ), 400);
    13701840        }
     
    13931863                        array(
    13941864                            'status' => false,
    1395                             'message' => __('Token is not valid', 'malware-virus-scanner-plugin')
     1865                            'message' => __('Token is not valid', 'wpsafe-ai-malware-protection')
    13961866                        ), 400);
    13971867                } else {
     
    14151885                array(
    14161886                    'status' => false,
    1417                     'message' => __('Please pass token.', 'malware-virus-scanner-plugin')
     1887                    'message' => __('Please pass token.', 'wpsafe-ai-malware-protection')
    14181888                ), 400);
    14191889        }
     
    16992169                    array(
    17002170                        'status' => false,
    1701                         'message' => __('The files variable is either not an array or it is empty.', 'malware-virus-scanner-plugin')
     2171                        'message' => __('The files variable is either not an array or it is empty.', 'wpsafe-ai-malware-protection')
    17022172                    ), 400
    17032173                );
     
    17262196                    array(
    17272197                        'status' => false,
    1728                         'message' => __('Those files does not exist: ' . implode(', ', $files), 'malware-virus-scanner-plugin')
     2198                        'message' => __('Those files does not exist: ' . implode(', ', $files), 'wpsafe-ai-malware-protection')
    17292199                    ), 400
    17302200                );
     
    17332203                    array(
    17342204                        'status' => true,
    1735                         'message' => __('All files are deleted successfully.', 'malware-virus-scanner-plugin')
     2205                        'message' => __('All files are deleted successfully.', 'wpsafe-ai-malware-protection')
    17362206                    ), 200
    17372207                );
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-templates.php

    r3097987 r3232957  
    11<?php
    2 
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
     5   
    36    class MVSP_Templates {
    47        public static function menu_add_site($authorized, $token) {
     
    912                    <div class="mvsp_title_wrapper title">
    1013                        <h6 class="title">
    11                             <?php echo esc_html__('Your site connected', 'malware-virus-scanner-plugin'); ?>
     14                            <?php echo esc_html__('Your site connected', 'wpsafe-ai-malware-protection'); ?>
    1215                        </h6>
    1316                        <div class="mvsp_button_outter_wrapper">
    1417                            <button type="button" id="disConnectSite" class="disconnect_btn">
    15                                 <?php echo esc_html__('Disconnect', 'malware-virus-scanner-plugin'); ?>
     18                                <?php echo esc_html__('Disconnect', 'wpsafe-ai-malware-protection'); ?>
    1619                            </button>
    1720                            <div class="mvsp_loader_wrapper">
     
    2124                    </div>
    2225                    <div class="formWrapper">
    23                         <div class="mvsp_site_status"><?php echo esc_url(site_url());?> <span class="mvsp_connected"><?php echo esc_html__('Connected', 'malware-virus-scanner-plugin');?></span></div>
     26                        <div class="mvsp_site_status"><?php echo esc_url(site_url());?> <span class="mvsp_connected"><?php echo esc_html__('Connected', 'wpsafe-ai-malware-protection');?></span></div>
    2427                    </div>
    2528                <?php else: ?>
    26                     <h6 class="title"><?php echo esc_html__('Connect your site', 'malware-virus-scanner-plugin'); ?></h6>
     29                    <h6 class="title"><?php echo esc_html__('Connect your site', 'wpsafe-ai-malware-protection'); ?></h6>
    2730                    <div class="formWrapper">
    28                         <form target="_blank" id="mvspSiteConnectForm" action="<?php echo $app_url;?>/connect" method="get">
     31                        <form target="_blank" id="mvspSiteConnectForm" action="<?php echo esc_url($app_url);?>/connect" method="get">
    2932                            <input type="hidden" name="site" value="<?php echo esc_url(site_url()); ?>" />
    3033                            <input type="hidden" id="mvspToken" name="token" />
    31                             <input class="input" id="mvspUserEmail" type="email" name="email" placeholder="<?php echo esc_html__('Your personal email', 'malware-virus-scanner-plugin'); ?>" value="<?php echo get_option( 'admin_email' ); ?>" />
     34                            <input class="input" id="mvspUserEmail" type="email" name="email" placeholder="<?php echo esc_attr__('Your personal email', 'wpsafe-ai-malware-protection'); ?>" value="<?php echo esc_attr( get_option( 'admin_email' ) ); ?>" />
    3235                            <div class="mvsp_button_outter_wrapper">
    3336                                <button type="button" id="mvspConnectSite" class="submitButton">
    34                                     <?php echo esc_html__('Submit', 'malware-virus-scanner-plugin'); ?>
     37                                    <?php echo esc_html__('Submit', 'wpsafe-ai-malware-protection'); ?>
    3538                                </button>
    3639                                <div class="mvsp_loader_wrapper">
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-theme-lists.php

    r3102680 r3232957  
    11<?php
    2 
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
    35class MVSP_Themes_List {
    46    public static function themes_list() {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-mvsp-wp-info.php

    r3129170 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
    25    require_once plugin_dir_path(dirname(__FILE__)) . 'helper/class-get-plugins.php';
    36    class MVSP_WP_Info {
     
    178181            return $response;
    179182        }
    180 
    181         public function encrypt_file($inputFile, $outputFile, $token)
    182         {
    183             $inputData = file_get_contents($inputFile);
    184 
    185             // Encrypt the data using AES encryption
    186             $encryptedData = openssl_encrypt($inputData, 'aes-256-cbc', $token, 0, $token);
    187 
    188             // Save the encrypted data to the output file
    189             file_put_contents($outputFile, $encryptedData);
    190 
    191             return $outputFile;
    192         }
    193 
    194         // Function to send the encrypted file to another API
    195         public static function send_encrypted_file($encryptedFile, $apiEndpoint)
    196         {
    197             // Create a Guzzle HTTP client
    198             $client = new \GuzzleHttp\Client();
    199 
    200             try {
    201                 // Send a POST request with the encrypted file
    202                 $response = $client->post($apiEndpoint, [
    203                     'multipart' => [
    204                         [
    205                             'name'     => 'encrypted_file',
    206                             'contents' => fopen($encryptedFile, 'r'),
    207                             'filename' => basename($encryptedFile),
    208                         ],
    209                     ],
    210                 ]);
    211 
    212                 // Print the response from the API
    213                 echo $response->getBody();
    214             } catch (\Exception $e) {
    215                 // Handle exceptions
    216                 echo 'Error: ' . $e->getMessage();
    217             }
    218         }
    219183    }
  • safe-ai-malware-protection-for-wp/trunk/includes/class-plugins-info.php

    r3118027 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
    25require_once plugin_dir_path(dirname(__FILE__)) . 'helper/class-get-plugins.php';
    36class MVSP_Plugins_List_Info {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-scan-db.php

    r3076790 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
    25    class MVSP_DB_Scanner {
    36
  • safe-ai-malware-protection-for-wp/trunk/includes/class-store-authorized-token.php

    r3102680 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
    25    require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-mvsp-generate-token.php';
    36    class MVSP_Store_Authorized_Token {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-uploads-scanner.php

    r3076790 r3232957  
    11<?php
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
    25    class MVSP_Uploads_Scanner {
    36        public static function check_uploads_folder_files() {
  • safe-ai-malware-protection-for-wp/trunk/includes/class-utls.php

    r3076790 r3232957  
    11<?php
    2 
     2    if (!defined('ABSPATH')) {
     3        die("What you are doing here man.");
     4    }
     5   
    36    class Translator
    47    {
  • safe-ai-malware-protection-for-wp/trunk/malware-virus-scanner-plugin.php

    r3185543 r3232957  
    99 * that starts the plugin.
    1010 *
    11  * @link              https://wpmessiah.com
     11 * @link              https://boomdevs.com
    1212 * @since             1.0.2
    1313 * @package           Wpsafe_Ai_Malware_Protection
     
    1717 * Plugin URI:        https://wpsafe.ai/
    1818 * Description:       WP Safe AI - Stress-Free WordPress Malware Cleaner.
    19  * Version:           1.0.17
    20  * Author:            WP Messiah
    21  * Author URI:        https://wpmessiah.com/
     19 * Version:           1.0.18
     20 * Author:            BoomDevs
     21 * Author URI:        https://boomdevs.com/
    2222 * License:           GPL-2.0+
    2323 * License URI:       http://www.gnu.org/licenses/gpl-2.0.txt
     
    3636 * Rename this for your plugin and update it as you release new versions.
    3737 */
    38 define( 'MVSP_PLUGIN_VERSION', '1.0.17' );
     38define( 'MVSP_PLUGIN_VERSION', '1.0.18' );
    3939
    4040/**
     
    4343define( 'MVSP_PATH', plugin_dir_path( __FILE__ ) );
    4444define( 'MVSP_URL', plugin_dir_url( __FILE__ ) );
    45 define( 'MVSP_SLUG', 'malware-virus-scanner-plugin' );
     45define( 'MVSP_SLUG', 'wpsafe-ai-malware-protection' );
    4646define( 'MVSP_SHORT_NAME', 'Safe Ai Malware Protection for WP' );
    4747define( 'MVSP_FULL_NAME', 'Safe Ai Malware Protection for WP' );
     
    8282require plugin_dir_path( __FILE__ ) . 'includes/class-malware-virus-scanner-plugin.php';
    8383
    84 // Load env file
    85 require plugin_dir_path( __FILE__ ) . 'helper/class-mvsp-env.php';
    86 
    8784/**
    8885 * Begins execution of the plugin.
     
    9996}
    10097mvsp_malware_virus_scanner_plugin_run();
    101 
    102 //  $plugin_updates = get_plugin_updates();
    103 //  $outdated_plugins_count = count($plugin_updates);
    104 //
    105 //  var_dump($outdated_plugins_count);
  • safe-ai-malware-protection-for-wp/trunk/public/class-malware-virus-scanner-plugin-public.php

    r3185543 r3232957  
    44 * The public-facing functionality of the plugin.
    55 *
    6  * @link       https://wpmessiah.com
     6 * @link       https://boomdevs.com
    77 * @since      1.0.0
    88 *
     
    1919 * @package    Malware_Virus_Scanner_Plugin
    2020 * @subpackage Malware_Virus_Scanner_Plugin/public
    21  * @author     BoomDevs <contact@wpmessiah.com>
     21 * @author     BoomDevs <contact@boomdevs.com>
    2222 */
    2323class Malware_Virus_Scanner_Plugin_Public {
  • safe-ai-malware-protection-for-wp/trunk/public/partials/malware-virus-scanner-plugin-public-display.php

    r3185543 r3232957  
    66 * This file is used to markup the public-facing aspects of the plugin.
    77 *
    8  * @link       https://wpmessiah.com
     8 * @link       https://boomdevs.com
    99 * @since      1.0.0
    1010 *
  • safe-ai-malware-protection-for-wp/trunk/uninstall.php

    r3185543 r3232957  
    2020 * https://github.com/tommcfarlin/WordPress-Plugin-Boilerplate/pull/123#issuecomment-28541913
    2121 *
    22  * @link       https://wpmessiah.com
     22 * @link       https://boomdevs.com
    2323 * @since      1.0.0
    2424 *
Note: See TracChangeset for help on using the changeset viewer.