Diff
8 years ago
dashboard
7 years ago
rest-api
7 years ago
.htaccess
7 years ago
Diff.php
14 years ago
GeoLite2-Country.mmdb
7 years ago
IPTraf.php
8 years ago
IPTrafList.php
7 years ago
WFLSPHP52Compatability.php
7 years ago
compat.php
8 years ago
conntest.php
7 years ago
cronview.php
8 years ago
dbview.php
8 years ago
diffResult.php
8 years ago
email_genericAlert.php
7 years ago
email_newIssues.php
7 years ago
email_unlockRequest.php
8 years ago
email_unsubscribeRequest.php
7 years ago
flags.php
7 years ago
live_activity.php
8 years ago
menu_dashboard.php
7 years ago
menu_dashboard_options.php
7 years ago
menu_firewall.php
7 years ago
menu_firewall_blocking.php
7 years ago
menu_firewall_blocking_options.php
8 years ago
menu_firewall_waf.php
7 years ago
menu_firewall_waf_options.php
7 years ago
menu_options.php
7 years ago
menu_scanner.php
7 years ago
menu_scanner_credentials.php
8 years ago
menu_scanner_options.php
8 years ago
menu_support.php
7 years ago
menu_tools.php
7 years ago
menu_tools_diagnostic.php
7 years ago
menu_tools_importExport.php
7 years ago
menu_tools_livetraffic.php
7 years ago
menu_tools_twoFactor.php
7 years ago
menu_tools_whois.php
8 years ago
menu_wordfence_central.php
7 years ago
noc1.key
7 years ago
sysinfo.php
8 years ago
unknownFiles.php
8 years ago
viewFullActivityLog.php
8 years ago
wf503.php
7 years ago
wfAPI.php
7 years ago
wfActivityReport.php
7 years ago
wfAdminNoticeQueue.php
8 years ago
wfArray.php
7 years ago
wfBrowscap.php
8 years ago
wfBrowscapCache.php
7 years ago
wfBulkCountries.php
7 years ago
wfCache.php
9 years ago
wfCentralAPI.php
7 years ago
wfConfig.php
7 years ago
wfCrawl.php
8 years ago
wfCredentialsController.php
7 years ago
wfCrypt.php
7 years ago
wfDB.php
7 years ago
wfDashboard.php
7 years ago
wfDateLocalization.php
8 years ago
wfDiagnostic.php
7 years ago
wfDict.php
8 years ago
wfDirectoryIterator.php
7 years ago
wfHelperBin.php
11 years ago
wfHelperString.php
11 years ago
wfIPWhitelist.php
7 years ago
wfImportExportController.php
7 years ago
wfIssues.php
7 years ago
wfJWT.php
7 years ago
wfLockedOut.php
7 years ago
wfLog.php
7 years ago
wfMD5BloomFilter.php
8 years ago
wfModuleController.php
7 years ago
wfNotification.php
8 years ago
wfOnboardingController.php
7 years ago
wfPersistenceController.php
8 years ago
wfRESTAPI.php
7 years ago
wfScan.php
7 years ago
wfScanEngine.php
7 years ago
wfSchema.php
7 years ago
wfStyle.php
7 years ago
wfSupportController.php
7 years ago
wfUnlockMsg.php
7 years ago
wfUpdateCheck.php
8 years ago
wfUtils.php
7 years ago
wfVersionCheckController.php
8 years ago
wfView.php
10 years ago
wfViewResult.php
8 years ago
wordfenceClass.php
7 years ago
wordfenceConstants.php
7 years ago
wordfenceHash.php
7 years ago
wordfenceScanner.php
7 years ago
wordfenceURLHoover.php
7 years ago
conntest.php
87 lines
| 1 | <?php if (!defined('WORDFENCE_VERSION')) { exit; } ?> |
| 2 | <?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"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> |
| 4 | <head> |
| 5 | <title>Wordfence Connectivity Tester</title> |
| 6 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 7 | <body> |
| 8 | <h1>Wordfence connectivity tester</h1> |
| 9 | <br /><br /> |
| 10 | DNS lookup for noc1.wordfence.com returns: <?php echo gethostbyname('noc1.wordfence.com'); ?><br /><br /> |
| 11 | <?php |
| 12 | $curlContent = ""; |
| 13 | function curlWrite($h, $d){ |
| 14 | global $curlContent; |
| 15 | $curlContent .= $d; |
| 16 | return strlen($d); |
| 17 | } |
| 18 | function doWPostTest($protocol){ |
| 19 | echo "<br /><b>Starting wp_remote_post() test</b><br />\n"; |
| 20 | $cronURL = admin_url('admin-ajax.php'); |
| 21 | $cronURL = preg_replace('/^(https?:\/\/)/i', '://noc1.wordfence.com/scanptest/', $cronURL); |
| 22 | $cronURL .= '?action=wordfence_doScan&isFork=0&cronKey=47e9d1fa6a675b5999999333'; |
| 23 | $cronURL = $protocol . $cronURL; |
| 24 | $result = wp_remote_post($cronURL, array( |
| 25 | 'timeout' => 10, //Must be less than max execution time or more than 2 HTTP children will be occupied by scan |
| 26 | 'blocking' => true, //Non-blocking seems to block anyway, so we use blocking |
| 27 | // This causes cURL to throw errors in some versions since WordPress uses its own certificate bundle ('CA certificate set, but certificate verification is disabled') |
| 28 | // 'sslverify' => false, |
| 29 | 'headers' => array() |
| 30 | )); |
| 31 | if( (! is_wp_error($result)) && $result['response']['code'] == 200 && strpos($result['body'], "scanptestok") !== false){ |
| 32 | echo "wp_remote_post() test to noc1.wordfence.com passed!<br />\n"; |
| 33 | } else if(is_wp_error($result)){ |
| 34 | echo "wp_remote_post() test to noc1.wordfence.com failed! Response was: " . $result->get_error_message() . "<br />\n"; |
| 35 | } else { |
| 36 | echo "wp_remote_post() test to noc1.wordfence.com failed! Response was: " . $result['response']['code'] . " " . $result['response']['message'] . "<br />\n"; |
| 37 | echo "This likely means that your hosting provider is blocking requests to noc1.wordfence.com or has set up a proxy that is not behaving itself.<br />\n"; |
| 38 | echo "This additional info may help you diagnose the issue. The response headers we received were:<br />\n"; |
| 39 | foreach($result['headers'] as $key => $value){ |
| 40 | echo "$key => $value<br />\n"; |
| 41 | } |
| 42 | } |
| 43 | } |
| 44 | function doCurlTest($protocol){ |
| 45 | if(! function_exists('curl_init')){ |
| 46 | echo "<br /><b style='color: #F00;'>CURL is not installed</b>. Asking your hosting provider to install and enable CURL may improve any connection problems.</b><br />\n"; |
| 47 | return; |
| 48 | } |
| 49 | echo "<br /><b>STARTING CURL $protocol CONNECTION TEST....</b><br />\n"; |
| 50 | global $curlContent; |
| 51 | $curlContent = ""; |
| 52 | $curl = curl_init($protocol . '://noc1.wordfence.com/'); |
| 53 | if(defined('WP_PROXY_HOST') && defined('WP_PROXY_PORT') && wfUtils::hostNotExcludedFromProxy('noc1.wordfence.com') ){ |
| 54 | curl_setopt($curl, CURLOPT_HTTPPROXYTUNNEL, 0); |
| 55 | curl_setopt($curl, CURLOPT_PROXY, WP_PROXY_HOST . ':' . WP_PROXY_PORT); |
| 56 | if(defined('WP_PROXY_USERNAME') && defined('WP_PROXY_PASSWORD')){ |
| 57 | curl_setopt($curl, CURLOPT_PROXYUSERPWD, WP_PROXY_USERNAME . ':' . WP_PROXY_PASSWORD); |
| 58 | } |
| 59 | } |
| 60 | |
| 61 | curl_setopt ($curl, CURLOPT_TIMEOUT, 900); |
| 62 | curl_setopt ($curl, CURLOPT_USERAGENT, "Wordfence.com UA " . (defined('WORDFENCE_VERSION') ? WORDFENCE_VERSION : '[Unknown version]') ); |
| 63 | curl_setopt ($curl, CURLOPT_RETURNTRANSFER, TRUE); |
| 64 | curl_setopt ($curl, CURLOPT_HEADER, 0); |
| 65 | curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, false); |
| 66 | curl_setopt ($curl, CURLOPT_SSL_VERIFYHOST, false); |
| 67 | curl_setopt ($curl, CURLOPT_WRITEFUNCTION, 'curlWrite'); |
| 68 | curl_exec($curl); |
| 69 | $httpStatus = curl_getinfo($curl, CURLINFO_HTTP_CODE); |
| 70 | if(strpos($curlContent, 'Your site did not send a license key') !== false){ |
| 71 | echo "Curl connectivity test passed.<br /><br />\n"; |
| 72 | } else { |
| 73 | $curlErrorNo = curl_errno($curl); |
| 74 | $curlError = curl_error($curl); |
| 75 | echo "Curl connectivity test failed with response: <pre>$curlContent</pre>"; |
| 76 | echo "<br />Curl HTTP status: $httpStatus<br />Curl error code: $curlErrorNo<br />Curl Error: $curlError<br /><br />\n"; |
| 77 | } |
| 78 | } |
| 79 | doCurlTest('http'); |
| 80 | doCurlTest('https'); |
| 81 | doWPostTest('http'); |
| 82 | doWPostTest('https'); |
| 83 | ?> |
| 84 | </body> |
| 85 | </html> |
| 86 | |
| 87 |