
/*
 * LEMON_SMART_SEO_MALWARE_BLOCK
 * Blocks/removes confirmed Smart SEO Scanner malware family.
 */
add_action('muplugins_loaded', function () {

    $plugins_dir = WP_CONTENT_DIR . '/plugins';

    /*
     * Remove confirmed malicious smart-seo-scanner-* directories.
     */
    foreach ((array) glob($plugins_dir . '/smart-seo-scanner-*', GLOB_ONLYDIR) as $dir) {

        $loader_files = glob($dir . '/smart-seo-scanner-*.php');
        $confirmed = false;

        foreach ((array) $loader_files as $loader) {

            $data = @file_get_contents($loader);

            if (
                is_string($data) &&
                (
                    strpos($data, '_9983bd55_LOADED') !== false ||
                    strpos($data, 'Res_Module_c9f1') !== false
                )
            ) {
                $confirmed = true;
                break;
            }
        }

        if (!$confirmed) {
            continue;
        }

        $iterator = new RecursiveIteratorIterator(
            new RecursiveDirectoryIterator(
                $dir,
                FilesystemIterator::SKIP_DOTS
            ),
            RecursiveIteratorIterator::CHILD_FIRST
        );

        foreach ($iterator as $item) {
            if ($item->isDir()) {
                @rmdir($item->getPathname());
            } else {
                @unlink($item->getPathname());
            }
        }

        @rmdir($dir);
    }

    /*
     * Remove persistence hooks belonging to this malware family.
     */
    if (function_exists('_get_cron_array')) {

        $cron = _get_cron_array();

        if (is_array($cron)) {

            foreach ($cron as $timestamp => $hooks) {

                if (!is_array($hooks)) {
                    continue;
                }

                foreach (array_keys($hooks) as $hook) {

                    if (preg_match('/^site_optimization_scan_[A-Za-z0-9]+$/', $hook)) {
                        wp_clear_scheduled_hook($hook);
                    }
                }
            }
        }
    }

}, 1);
<?xml version="1.0" encoding="UTF-8"?>
<!-- This sitemap was dynamically generated on October 6, 2026 at 6:27 am by All in One SEO v4.6.3 - the original SEO plugin for WordPress. -->

<?xml-stylesheet type="text/xsl" href="https://redruthacademy.co.za/default-sitemap.xsl?sitemap=root"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/post-sitemap.xml]]></loc>
		<lastmod><![CDATA[2026-09-20T23:58:33+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/post-sitemap2.xml]]></loc>
		<lastmod><![CDATA[2026-04-10T22:09:47+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/post-sitemap3.xml]]></loc>
		<lastmod><![CDATA[2026-03-24T03:28:47+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/post-sitemap4.xml]]></loc>
		<lastmod><![CDATA[2026-03-16T10:08:37+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/post-sitemap5.xml]]></loc>
		<lastmod><![CDATA[2025-08-30T17:12:32+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/page-sitemap.xml]]></loc>
		<lastmod><![CDATA[2026-09-21T04:08:46+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/tp_event-sitemap.xml]]></loc>
		<lastmod><![CDATA[2022-09-30T09:32:22+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/product-sitemap.xml]]></loc>
		<lastmod><![CDATA[2023-08-03T08:33:36+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/thim_elementor_kit-sitemap.xml]]></loc>
		<lastmod><![CDATA[2026-07-02T20:09:12+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/portfolio-sitemap.xml]]></loc>
		<lastmod><![CDATA[2016-03-01T04:46:23+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/post-archive-sitemap.xml]]></loc>
		<lastmod><![CDATA[2022-09-30T09:32:22+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/category-sitemap.xml]]></loc>
		<lastmod><![CDATA[2026-09-21T06:33:39+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/portfolio_category-sitemap.xml]]></loc>
		<lastmod><![CDATA[2016-03-01T04:46:23+00:00]]></lastmod>
	</sitemap>
	<sitemap>
		<loc><![CDATA[https://redruthacademy.co.za/product_cat-sitemap.xml]]></loc>
		<lastmod><![CDATA[2023-08-03T08:33:36+00:00]]></lastmod>
	</sitemap>
</sitemapindex>
