Plugin Directory

Changeset 1194834


Ignore:
Timestamp:
07/08/2015 03:48:17 PM (11 years ago)
Author:
yorman
Message:

Fixed. Disable DNS lookups programmatically for now

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sucuri-scanner/trunk/sucuri.php

    r1194820 r1194834  
    751751    public static function is_behind_cloudproxy( $verbose = false ){
    752752        $http_host = self::get_top_level_domain();
    753         $host_by_addr = @gethostbyname( $http_host );
    754         $host_by_name = @gethostbyaddr( $host_by_addr );
    755         $status = (bool) preg_match( '/^cloudproxy[0-9]+\.sucuri\.net$/', $host_by_name );
     753
     754        if (
     755            defined( 'NOT_USING_CLOUDPROXY' )
     756            && NOT_USING_CLOUDPROXY === true
     757        ) {
     758            $status = false;
     759        } else {
     760            $host_by_addr = @gethostbyname( $http_host );
     761            $host_by_name = @gethostbyaddr( $host_by_addr );
     762            $status = (bool) preg_match( '/^cloudproxy[0-9]+\.sucuri\.net$/', $host_by_name );
     763        }
    756764
    757765        /*
Note: See TracChangeset for help on using the changeset viewer.