/home/altere25/infinet.finance/wp-content/plugins/ninjafirewall/lib
NameSizeModeActions
share/-0755rm
.htaccess3780644editdlrm
anti_malware.php26510644editdlrm
custom_firewall.php19440644editdlrm
custom_plugin.php19400644editdlrm
dashboard.php236880644editdlrm
dashboard_about.php27270644editdlrm
dashboard_statistics.php73490644editdlrm
email_sodium.php71630644editdlrm
events.php114230644editdlrm
event_notifications.php194280644editdlrm
event_updates.php93580644editdlrm
firewall.php633850644editdlrm
firewall_options.php172620644editdlrm
firewall_policies.php719870644editdlrm
fw_centlog.php24220644editdlrm
fw_fileguard.php36890644editdlrm
fw_livelog.php56840644editdlrm
help.php485860644editdlrm
i18n-extra.php310210644editdlrm
index.html830644editdlrm
init_update.php75410644editdlrm
install.php123810644editdlrm
install_default.php105260644editdlrm
loader.php5470644editdlrm
login_protection.php231210644editdlrm
logs.php33540644editdlrm
logs_firewall_log.php117970644editdlrm
logs_live_log.php202850644editdlrm
monitoring.php31560644editdlrm
monitoring_file_check.php291850644editdlrm
monitoring_file_guard.php62180644editdlrm
network.php34470644editdlrm
nfw_log.php42250644editdlrm
scheduled_tasks.php55990644editdlrm
security_rules.php28590644editdlrm
security_rules_editor.php73150644editdlrm
security_rules_update.php203090644editdlrm
sign.pub8010644editdlrm
thickbox.php207990644editdlrm
utils.php576700644editdlrm
widget.php48280644editdlrm
wpplus.php175210644editdlrm
Edit: /home/altere25/infinet.finance/wp-content/plugins/ninjafirewall/lib/event_updates.php (9358B)
$v ) { // No name or no version (unlike plugins, we're dealing with objects here) if ( $v->Name == '' || $v->Version == '' ) { continue; } $hash = hash( 'sha256', $k ); if ( isset( $list['themes'][$hash] ) && version_compare( $v->Version, $list['themes'][$hash]['version'], '<' ) ) { // Make sure we didn't inform the user yet if (! isset( $nfw_checked['themes'][$k] ) || version_compare( $nfw_checked['themes'][$k]['version'], $list['themes'][$hash]['version'], '<' ) ) { // Mark as checked: $nfw_checked['themes'][$k]['version'] = $list['themes'][$hash]['version']; $found['themes'][$k]['name'] = $v->Name; $found['themes'][$k]['cur_version'] = $v->Version; $found['themes'][$k]['new_version'] = $list['themes'][$hash]['version']; $found['themes'][$k]['level'] = $list['themes'][$hash]['level']; } } } // Check plugins updates if ( ! function_exists( 'get_plugins' ) ) { require_once ABSPATH .'wp-admin/includes/plugin.php'; } $plugins = get_plugins(); foreach( $plugins as $k => $v ) { // No name or no version (unlike themes, we're dealing with arrays here) if ( empty( $v['Name'] ) || empty( $v['Version'] ) ) { continue; } $hash = hash( 'sha256', $k ); if ( isset( $list['plugins'][$hash] ) && version_compare( $v['Version'], $list['plugins'][$hash]['version'], '<' ) ) { // Make sure we didn't inform the user yet if (! isset( $nfw_checked['plugins'][$k] ) || version_compare( $nfw_checked['plugins'][$k]['version'], $list['plugins'][$hash]['version'], '<' ) ) { // Mark as checked $nfw_checked['plugins'][$k]['version'] = $list['plugins'][$hash]['version']; $found['plugins'][$k]['name'] = $v['Name']; $found['plugins'][$k]['cur_version'] = $v['Version']; $found['plugins'][$k]['new_version'] = $list['plugins'][$hash]['version']; $found['plugins'][$k]['level'] = $list['plugins'][$hash]['level']; } } } // Nothing to do if ( empty( $found ) ) { return; } // Warn the user nfw_alert_security_updates( $found ); // Update checked list nfw_update_option( 'nfw_checked', $nfw_checked, false ); return; } // --------------------------------------------------------------------- // Send an email alert to the admin function nfw_alert_security_updates( $found = array() ) { $nfw_options = nfw_get_option('nfw_options'); $subject = __('[NinjaFirewall] Warning: Security update available', 'ninjafirewall'); $message = __('NinjaFirewall has detected that there are security updates available for your website:', 'ninjafirewall') . "\n\n". __('Date:', 'ninjafirewall') .' '. ucfirst( date_i18n('F j, Y @ H:i:s T') ) . "\n"; if ( is_multisite() ) { $message .= sprintf( __('Blog: %s', 'ninjafirewall'), network_home_url('/') ) ."\n\n"; } else { $message .= sprintf( __('Blog: %s', 'ninjafirewall'), home_url('/') ) ."\n\n"; } // WordPress if (! empty( $found['wordpress'] ) ) { $message .= "WordPress:\n" . sprintf( __('Your version: %s', 'ninjafirewall'), $found['wordpress']['cur_version'] ) ."\n". sprintf( __('New version: %s', 'ninjafirewall'), $found['wordpress']['new_version'] ) ."\n"; if ( $found['wordpress']['level'] == 2 ) { $message .= __('Severity: This is an important security update', 'ninjafirewall') ."\n"; } elseif ( $found['wordpress']['level'] == 3 ) { $message .= __('Severity: **This is a critical security update**', 'ninjafirewall') ."\n"; } $message .= "\n"; } // Plugins if (! empty( $found['plugins'] ) ) { foreach( $found['plugins'] as $k => $v ) { $message .= sprintf( __('Plugin: %s', 'ninjafirewall'), $found['plugins'][$k]['name'] ) ."\n". sprintf( __('Your version: %s', 'ninjafirewall'), $found['plugins'][$k]['cur_version'] ) ."\n". sprintf( __('New version: %s', 'ninjafirewall'), $found['plugins'][$k]['new_version'] ) ."\n"; if ( $found['plugins'][$k]['level'] == 2 ) { $message .= __('Severity: This is an important security update', 'ninjafirewall') ."\n"; } elseif ( $found['plugins'][$k]['level'] == 3 ) { $message .= __('Severity: **This is a critical security update**', 'ninjafirewall') ."\n"; } $message .= "\n"; } } // Themes if (! empty( $found['themes'] ) ) { foreach( $found['themes'] as $k => $v ) { $message .= sprintf( __('Theme: %s', 'ninjafirewall'), $found['themes'][$k]['name'] ) ."\n". sprintf( __('Your version: %s', 'ninjafirewall'), $found['themes'][$k]['cur_version'] ) ."\n". sprintf( __('New version: %s', 'ninjafirewall'), $found['themes'][$k]['new_version'] ) ."\n"; if ( $found['themes'][$k]['level'] == 2 ) { $message .= __('Severity: This is an important security update', 'ninjafirewall') ."\n"; } elseif ( $found['themes'][$k]['level'] == 3 ) { $message .= __('Severity: **This is a critical security update**', 'ninjafirewall') ."\n"; } $message .= "\n"; } } $message .= __("Don't leave your blog at risk, make sure to update as soon as possible.", 'ninjafirewall') . "\n\n"; $message.= __('This notification can be turned off from NinjaFirewall "Event Notifications" page.', 'ninjafirewall') . "\n\n"; $message .= NF_PG_SIGNATURE ."\n\n"; $message .= NF_PG_MORESEC; nfw_mail( $subject, $message, 'unsubscribe'); } // --------------------------------------------------------------------- // Download list from remote server function nfw_fetch_security_updates( $url ) { global $wp_version; $res = wp_remote_get( $url, array( 'timeout' => 20, 'httpversion' => '1.1' , 'user-agent' => 'Mozilla/5.0 (compatible; NinjaFirewall/'. NFW_ENGINE_VERSION .'; WordPress/'. $wp_version . ')', 'sslverify' => true ) ); if ( is_wp_error( $res ) ) { nfw_log_error( __('Cannot download security rules: connection error. Will try again later', 'ninjafirewall') ); return false; } if ( $res['response']['code'] != 200 ) { nfw_log_error( sprintf( __('Cannot download security rules: HTTP response error %s. Will try again later', 'ninjafirewall'), $res['response']['code'] ) ); return false; } return json_decode( $res['body'], true ); } // --------------------------------------------------------------------- // EOF