wordfence
Last commit date
css
13 years ago
images
13 years ago
js
13 years ago
lib
13 years ago
tmp
13 years ago
.htaccess
13 years ago
readme.txt
13 years ago
screenshot-1.png
14 years ago
screenshot-2.png
14 years ago
screenshot-3.png
14 years ago
screenshot-4.png
14 years ago
screenshot-5.png
14 years ago
visitor.php
13 years ago
wfscan.php
13 years ago
wordfence.php
13 years ago
visitor.php
34 lines
| 1 | <?php |
| 2 | define('WORDFENCE_VERSIONONLY_MODE', true); //So that we can include wordfence.php and get the version constant |
| 3 | ignore_user_abort(true); |
| 4 | if ( !defined('ABSPATH') ) { |
| 5 | /** Set up WordPress environment */ |
| 6 | if($_SERVER['SCRIPT_FILENAME']){ |
| 7 | $wfBaseDir = preg_replace('/[^\/]+\/[^\/]+\/[^\/]+\/visitor\.php$/', '', $_SERVER['SCRIPT_FILENAME']); |
| 8 | require_once($wfBaseDir . 'wp-load.php'); |
| 9 | global $wp_version; |
| 10 | global $wordfence_wp_version; |
| 11 | require($wfBaseDir . 'wp-includes/version.php'); |
| 12 | $wordfence_wp_version = $wp_version; |
| 13 | } else { |
| 14 | require_once('../../../wp-load.php'); |
| 15 | require_once('../../../wp-includes/version.php'); |
| 16 | } |
| 17 | |
| 18 | } |
| 19 | require_once('wordfence.php'); |
| 20 | require_once('lib/wfUtils.php'); |
| 21 | require_once('lib/wfDB.php'); |
| 22 | function wfVisitor(){ |
| 23 | $hid = $_GET['hid']; |
| 24 | $hid = wfUtils::decrypt($hid); |
| 25 | if(! preg_match('/^\d+$/', $hid)){ exit(); } |
| 26 | $db = new wfDB(); |
| 27 | global $wpdb; $p = $wpdb->base_prefix; |
| 28 | $db->query("update $p"."wfHits set jsRun=1 where id=%d", $hid); |
| 29 | exit(); |
| 30 | } |
| 31 | wfVisitor(); |
| 32 | |
| 33 | ?> |
| 34 |