> All private information (email address, brute-force << | | >> protection user/password etc) will NOT be exported << | | | | Exported data CANNOT be reimported. Use this file for support only. | | | +=====================================================================+ | 1. Rename this file to "wp-support.php". | | 2. Upload it into your WordPress root folder. | | 3. Go to http://YOUR WEBSITE/wp-support.php | | 4. Delete it afterwards. | +=====================================================================+ */ @error_reporting(E_ALL); @ini_set('display_errors',1); // Load WP bootstrap : if ( file_exists(__DIR__ .'/wp-config.php') ) { require_once(__DIR__ .'/wp-config.php'); } else if ( file_exists( dirname(__DIR__) .'/wp-config.php') ) { require_once( dirname(__DIR__) .'/wp-config.php'); } else { die ('ERROR: cannot find wp-config.php'); } // Retrieve plugins list : if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH . 'wp-admin/includes/plugin.php'; } $all_plugins = get_plugins(); // Fetch options : if (! $nfw_options = get_option('nfw_options') ) { die('ERROR: cannot fetch [nfw_options]'); } // Fetch rules : if (! $nfw_rules = get_option('nfw_rules') ) { die('ERROR: cannot fetch [nfw_rules]'); } // Remove private information : $nfw_options['alert_email'] = 'someone@somewhere.com'; $nfw_options['logo'] = '/foo/bar/ninjafirewall_75.png'; $nfw_options['auth_name'] = 'username'; $nfw_options['auth_pass'] = 'userpass'; $nfw_options['bf_rand'] = 'random'; $nfw_options['auth_msg'] = 'message'; // Prepare output : $data = serialize($nfw_options) . "\n\n" . serialize($nfw_rules) . "\n\n"; foreach ($all_plugins as $name) { $data .= $name['Name'] . "\n"; } if (! defined( 'NFW_ENGINE_VERSION' ) ) { define( 'NFW_ENGINE_VERSION', 'x' ); } // Download : header('Content-Type: application/txt'); header('Content-Length: '. strlen( $data ) ); header('Content-Disposition: attachment; filename="nf_support.' . NFW_ENGINE_VERSION . '.txt"'); echo $data;