Exemple #1
0
    $failedRules = $waf->getFailedRules();
} catch (wfWAFBlockXSSException $e) {
    $result = '<strong class="error">Blocked For XSS</strong>';
    $failedRules = $waf->getFailedRules();
}
?>
<!doctype html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title><?php 
echo esc_html($title);
?>
</title>
	<link rel="stylesheet" href="<?php 
echo wfUtils::getBaseURL() . 'css/main.css';
?>
">
	<style>
		html {
			font-family: "Open Sans", Helvetica, Arial, sans-serif;
		}
		h1, h2, h3, h4, h5 {
			margin: 20px 0px 8px;
		}
		pre, p {
			8px 0px 20px;
		}
		pre.request-debug {
			padding: 12px;
			background: #fafafa;
Exemple #2
0
<?php

if (!wfUtils::isAdmin()) {
    exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  dir="ltr" lang="en-US">
<head>
<title>Wordfence System Info</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel='stylesheet' id='wordfence-main-style-css'  href='<?php 
echo wfUtils::getBaseURL();
?>
/css/phpinfo.css?ver=<?php 
echo WORDFENCE_VERSION;
?>
' type='text/css' media='all' />
<body>
<?php 
ob_start();
phpinfo(INFO_ALL);
$out = ob_get_clean();
$out = str_replace('width="600"', 'width="900"', $out);
$out = preg_replace('/<hr.*?PHP Credits.*?<\\/h1>/s', '', $out);
$out = preg_replace('/<a [^>]+>/', '', $out);
$out = preg_replace('/<\\/a>/', '', $out);
$out = preg_replace('/<title>[^<]*<\\/title>/', '', $out);
echo $out;
?>
<div class="diffFooter">&copy;&nbsp;2011 Wordfence &mdash; Visit <a href="http://wordfence.com/">Wordfence.com</a> for help, security updates and more.</a>
Exemple #3
0
 public static function addDashboardWidget()
 {
     if (wfUtils::isAdmin() && (is_network_admin() || !is_multisite()) && wfConfig::get('email_summary_dashboard_widget_enabled')) {
         wp_enqueue_style('wordfence-activity-report-widget', wfUtils::getBaseURL() . 'css/activity-report-widget.css', '', WORDFENCE_VERSION);
         $report_date_range = 'week';
         switch (wfConfig::get('email_summary_interval')) {
             case 'biweekly':
                 $report_date_range = '2 weeks';
                 break;
             case 'monthly':
                 $report_date_range = 'month';
                 break;
         }
         wp_add_dashboard_widget('wordfence_activity_report_widget', 'Wordfence activity in the past ' . $report_date_range, array('wfActivityReport', 'outputDashboardWidget'));
     }
 }
$pageTitle = "Audit the Strength of your Passwords";
$helpLink = "http://docs.wordfence.com/en/Wordfence_Password_Auditing";
$helpLabel = "Learn more about Password Auditing";
include 'pageTitle.php';
?>
	<?php 
if (!wfConfig::get('isPaid')) {
    ?>
		<div class="wordfenceRightRail">
			<ul>
				<li><a href="https://www.wordfence.com/gnl1rightRailGetPremium/wordfence-signup/" target="_blank"><img src="<?php 
    echo wfUtils::getBaseURL() . 'images/rr_premium.png';
    ?>
" alt="Upgrade your protection - Get Wordfence Premium"></a></li>
				<li><a href="https://www.wordfence.com/gnl1rightRailSiteCleaning/wordfence-site-cleanings/" target="_blank"><img src="<?php 
    echo wfUtils::getBaseURL() . 'images/rr_sitecleaning.jpg';
    ?>
" alt="Have you been hacked? Get help from Wordfence"></a></li> 
				<li>
					<p class="center"><strong>Would you like to remove these ads?</strong><br><a href="https://www.wordfence.com/gnl1rightRailBottomUpgrade/wordfence-signup/" target="_blank">Get Premium</a></p>
				</li>
			</ul>
		</div>
	<?php 
}
?>
	<?php 
if (!wfConfig::get('isPaid')) {
    ?>
		<div class="wf-premium-callout" style="margin: 20px 0 20px 20px; width: 700px;">
			<h3>Password Auditing is only available to Premium Members</h3>
				<div data-bind="if: !groupBy()">
					<div id="wf-lt-listings" data-bind="foreach: listings">
						<div data-bind="attr: { id: ('wfActEvent_' + id()), 'class': cssClasses }">
							<table border="0" cellpadding="1" cellspacing="0">
								<tr>
									<td>
										<span data-bind="if: action() != 'loginOK' && user()">
											<span data-bind="html: user.avatar" class="wfAvatar"></span>
											<a data-bind="attr: { href: user.editLink }, text: user().display_name"
											   target="_blank"></a>
										</span>
										<span data-bind="if: loc()">
											<span data-bind="if: action() != 'loginOK' && user()"> in</span>
											<img data-bind="attr: { src: '<?php 
echo wfUtils::getBaseURL() . 'images/flags/';
?>
' + loc().countryCode.toLowerCase() + '.png',
												alt: loc().countryName, title: loc().countryName }" width="16"
											     height="11"
											     class="wfFlag"/>
											<a data-bind="text: (loc().city ? loc().city + ', ' : '') + loc().countryName,
												attr: { href: 'http://maps.google.com/maps?q=' + loc().lat + ',' + loc().lon + '&z=6' }"
											   target="_blank"></a>
										</span>
										<span data-bind="if: !loc()">
											<span
												data-bind="text: action() != 'loginOK' && user() ? 'at an' : 'An'"></span> unknown location at IP <a
												data-bind="text: IP, attr: { href: WFAD.makeIPTrafLink(IP()) }"
												target="_blank"></a>
										</span>
 public static function admin_menus()
 {
     if (!wfUtils::isAdmin()) {
         return;
     }
     $warningAdded = false;
     if (get_option('wf_plugin_act_error', false)) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::activation_warning');
         } else {
             add_action('admin_notices', 'wordfence::activation_warning');
         }
         $warningAdded = true;
     }
     if (!wfConfig::get('apiKey')) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::noKeyError');
         } else {
             add_action('admin_notices', 'wordfence::noKeyError');
         }
         $warningAdded = true;
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && !wfConfig::get('autoUpdate') && !wfConfig::get('autoUpdateChoice')) {
             $warningAdded = true;
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::autoUpdateNotice');
             } else {
                 add_action('admin_notices', 'wordfence::autoUpdateNotice');
             }
         }
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && !wfConfig::get('alertEmails')) {
             $warningAdded = true;
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::adminEmailWarning');
             } else {
                 add_action('admin_notices', 'wordfence::adminEmailWarning');
             }
         }
     }
     add_submenu_page("Wordfence", "Scan", "Scan", "activate_plugins", "Wordfence", 'wordfence::menu_scan');
     add_menu_page('Wordfence', 'Wordfence', 'activate_plugins', 'Wordfence', 'wordfence::menu_scan', wfUtils::getBaseURL() . 'images/wordfence-logo-16x16.png');
     add_submenu_page("Wordfence", "Live Traffic", "Live Traffic", "activate_plugins", "WordfenceActivity", 'wordfence::menu_activity');
     /* add_submenu_page('Wordfence', 'Site Performance', 'Site Performance', 'activate_plugins', 'WordfenceSitePerfStats', 'wordfence::menu_sitePerfStats'); */
     add_submenu_page('Wordfence', 'Performance Setup', 'Performance Setup', 'activate_plugins', 'WordfenceSitePerf', 'wordfence::menu_sitePerf');
     add_submenu_page('Wordfence', 'Blocked IPs', 'Blocked IPs', 'activate_plugins', 'WordfenceBlockedIPs', 'wordfence::menu_blockedIPs');
     add_submenu_page("Wordfence", "Cellphone Sign-in", "Cellphone Sign-in", "activate_plugins", "WordfenceTwoFactor", 'wordfence::menu_twoFactor');
     add_submenu_page("Wordfence", "Country Blocking", "Country Blocking", "activate_plugins", "WordfenceCountryBlocking", 'wordfence::menu_countryBlocking');
     add_submenu_page("Wordfence", "Scan Schedule", "Scan Schedule", "activate_plugins", "WordfenceScanSchedule", 'wordfence::menu_scanSchedule');
     add_submenu_page("Wordfence", "Whois Lookup", "Whois Lookup", "activate_plugins", "WordfenceWhois", 'wordfence::menu_whois');
     add_submenu_page("Wordfence", "Advanced Blocking", "Advanced Blocking", "activate_plugins", "WordfenceRangeBlocking", 'wordfence::menu_rangeBlocking');
     add_submenu_page("Wordfence", "Options", "Options", "activate_plugins", "WordfenceSecOpt", 'wordfence::menu_options');
 }
								<?php 
        $stripe = wfHelperString::cycle('odd', 'even');
        ?>
								<tr class="<?php 
        echo $stripe;
        ?>
" style="font-size: 100%; vertical-align: baseline; margin: 0; padding: 0; border: 0;">
									<td style="font-size: 100%; vertical-align: baseline; font-weight: normal; text-align: left; border-collapse: collapse; margin: 0; padding: 6px 4px; border: 1px solid #cccccc;<?php 
        echo $bg_colors[$stripe];
        ?>
" align="left" valign="baseline">
										<?php 
        if ($row->countryCode) {
            ?>
											<img src="<?php 
            echo wfUtils::getBaseURL() . 'images/flags/' . strtolower($row->countryCode);
            ?>
.png" class="wfFlag" height="11" width="16" style="font-size: 100%; vertical-align: baseline; -ms-interpolation-mode: bicubic; outline: none; text-decoration: none; margin: 0; padding: 0; border: 0;">
											&nbsp;
											<?php 
            echo esc_html($row->countryCode);
            ?>
										<?php 
        } else {
            ?>
											(Unknown)
										<?php 
        }
        ?>
									</td>
									<td style="font-size: 100%; vertical-align: baseline; font-weight: normal; text-align: left; border-collapse: collapse; margin: 0; padding: 6px 4px; border: 1px solid #cccccc;<?php 
<?php 
    if ($v['user']) {
        ?>
<tr><th>User:</th><td><a href="<?php 
        echo $v['user']['editLink'];
        ?>
" target="_blank"><?php 
        echo $v['user']['avatar'] . ' ' . $v['user']['display_name'];
        ?>
</a></td></tr>
<?php 
    }
    if ($v['loc']) {
        ?>
<tr><th>Location:</th><td><img src="<?php 
        echo wfUtils::getBaseURL() . 'images/flags/' . strtolower($v['loc']['countryCode']);
        ?>
.png" width="16" height="11" alt="<?php 
        echo $v['loc']['countryName'];
        ?>
" title="<?php 
        echo $v['loc']['countryName'];
        ?>
" class="wfFlag" />
	<?php 
        if ($v['loc']['city']) {
            echo $v['loc']['city'] . ', ';
        }
        ?>
	<?php 
        echo $v['loc']['countryName'];
Exemple #9
0
 public static function admin_menus()
 {
     if (!wfUtils::isAdmin()) {
         return;
     }
     $warningAdded = false;
     if (get_option('wf_plugin_act_error', false)) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::activation_warning');
         } else {
             add_action('admin_notices', 'wordfence::activation_warning');
         }
         $warningAdded = true;
     }
     if (!wfConfig::get('apiKey')) {
         if (wfUtils::isAdminPageMU()) {
             add_action('network_admin_notices', 'wordfence::noKeyError');
         } else {
             add_action('admin_notices', 'wordfence::noKeyError');
         }
         $warningAdded = true;
     }
     if (!$warningAdded) {
         if (wfConfig::get('tourClosed') == '1' && !wfConfig::get('alertEmails')) {
             if (wfUtils::isAdminPageMU()) {
                 add_action('network_admin_notices', 'wordfence::adminEmailWarning');
             } else {
                 add_action('admin_notices', 'wordfence::adminEmailWarning');
             }
         }
     }
     /*
     if(is_plugin_active('w3-total-cache/w3-total-cache.php') && wfConfig::get('liveTrafficEnabled')){
     	wfConfig::set('liveTrafficEnabled', 0);
     	if(wfUtils::isAdminPageMU()){
     		add_action('network_admin_notices', 'wordfence::liveTrafficW3TCWarning');
     	} else {
     		add_action('admin_notices', 'wordfence::liveTrafficW3TCWarning');
     	}
     }
     if(is_plugin_active('wp-super-cache/wp-cache.php') && wfConfig::get('liveTrafficEnabled')){
     	wfConfig::set('liveTrafficEnabled', 0);
     	if(wfUtils::isAdminPageMU()){
     		add_action('network_admin_notices', 'wordfence::liveTrafficSuperCacheWarning');
     	} else {
     		add_action('admin_notices', 'wordfence::liveTrafficSuperCacheWarning');
     	}
     }
     */
     add_submenu_page("Wordfence", "Scan", "Scan", "activate_plugins", "Wordfence", 'wordfence::menu_scan');
     add_menu_page('Wordfence', 'Wordfence', 'activate_plugins', 'Wordfence', 'wordfence::menu_scan', wfUtils::getBaseURL() . 'images/wordfence-logo-16x16.png');
     if (wfConfig::get('liveTrafficEnabled')) {
         add_submenu_page("Wordfence", "Live Traffic", "Live Traffic", "activate_plugins", "WordfenceActivity", 'wordfence::menu_activity');
     }
     add_submenu_page('Wordfence', 'Blocked IPs', 'Blocked IPs', 'activate_plugins', 'WordfenceBlockedIPs', 'wordfence::menu_blockedIPs');
     add_submenu_page("Wordfence", "Cellphone Sign-in", "Cellphone Sign-in", "activate_plugins", "WordfenceTwoFactor", 'wordfence::menu_twoFactor');
     add_submenu_page("Wordfence", "Country Blocking", "Country Blocking", "activate_plugins", "WordfenceCountryBlocking", 'wordfence::menu_countryBlocking');
     add_submenu_page("Wordfence", "Scan Schedule", "Scan Schedule", "activate_plugins", "WordfenceScanSchedule", 'wordfence::menu_scanSchedule');
     add_submenu_page("Wordfence", "Whois Lookup", "Whois Lookup", "activate_plugins", "WordfenceWhois", 'wordfence::menu_whois');
     add_submenu_page("Wordfence", "Advanced Blocking", "Advanced Blocking", "activate_plugins", "WordfenceRangeBlocking", 'wordfence::menu_rangeBlocking');
     add_submenu_page("Wordfence", "Options", "Options", "activate_plugins", "WordfenceSecOpt", 'wordfence::menu_options');
 }
Exemple #10
0
<?php if(! wfUtils::isAdmin()){ exit(); } ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  dir="ltr" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel='stylesheet' id='wordfence-main-style-css'  href='<?php echo wfUtils::getBaseURL(); ?>/css/iptraf.css?ver=<?php echo WORDFENCE_VERSION; ?>' type='text/css' media='all' />
<body>
<h1>Wordfence: All recent hits for IP address <?php echo wp_kses($IP, array()); if($reverseLookup){ echo '[' . wp_kses($reverseLookup, array()) . ']'; } ?></h1>
<table border="0" cellpadding="2" cellspacing="0" style="width: 900px;">
<?php foreach($results as $key => $v){ ?>
<tr><th>Time:</th><td><?php echo $v['timeAgo'] ?> ago -- <?php echo date(DATE_RFC822, $v['ctime']); ?> -- <?php echo $v['ctime']; ?> in Unixtime</td></tr>
<?php if($v['timeSinceLastHit']){ echo '<th>Secs since last hit:</th><td>' . $v['timeSinceLastHit'] . '</td></tr>'; } ?>
<?php if(wfUtils::hasXSS($v['URL'])){ ?>
<tr><th>URL:</th><td><span style="color: #F00;">Possible XSS code filtered out for your security</span></td></tr>
<?php } else { ?>
<tr><th>URL:</th><td><a href="<?php echo wp_kses($v['URL'], array()); ?>" target="_blank"><?php echo $v['URL']; ?></a></td></tr>
<?php } ?>
<tr><th>Type:</th><td><?php if($v['type'] == 'hit'){ echo 'Normal request'; } else if($v['type'] == '404'){ echo '<span style="color: #F00;">Page not found</span>'; } ?></td></tr>
<?php if($v['referer']){ ?><tr><th>Referrer:</th><td><a href="<?php echo $v['referer']; ?>" target="_blank"><?php echo $v['referer']; ?></a></td></tr><?php } ?>
<tr><th>Full Browser ID:</th><td><?php echo wp_kses($v['UA'], array()); ?></td></tr>
<?php if($v['user']){ ?>
<tr><th>User:</th><td><a href="<?php echo $v['user']['editLink']; ?>" target="_blank"><?php echo $v['user']['avatar'] . ' ' . $v['user']['display_name']; ?></a></td></tr>
<?php } ?>
<?php if($v['loc']){ ?>
<tr><th>Location:</th><td><img src="http://www.wordfence.com/images/flags/<?php echo strtolower($v['loc']['countryCode']); ?>.png" width="16" height="11" alt="<?php echo $v['loc']['countryName']; ?>" title="<?php echo $v['loc']['countryName']; ?>" class="wfFlag" />
	<?php if($v['loc']['city']){ echo $v['loc']['city'] . ', '; } ?>
	<?php echo $v['loc']['countryName']; ?>
	</td></tr>
<?php } ?>
<tr><td colspan="2"><hr></td></tr>
<?php } ?>