Plugin Directory

Changeset 1694828


Ignore:
Timestamp:
07/11/2017 10:40:24 PM (9 years ago)
Author:
bestiaweb
Message:

1.6 new version

Location:
wp-doctor
Files:
6 added
2 edited

Legend:

Unmodified
Added
Removed
  • wp-doctor/trunk/init.php

    r1541312 r1694828  
    44Plugin URI: http://www.bestiaweb.com/wpdoctor/
    55Description: Malware removal and security plugin. Perform a full scan for malware and security breaches. Periodically scan the files and send an email with the list of infected files. Very easy to use and configure: Settings->WP Doctor.
    6 Version: 1.5
     6Version: 1.6
    77Author: BestiaWeb S.C.P.
    88Author URI: http://www.bestiaweb.com
    99
    10 Copyright 2016  BestiaWeb S.C.P.
     10Copyright 2017  BestiaWeb S.C.P.
    1111
    1212This program is free software; you can redistribute it and/or modify
     
    717717            //The major blacklists
    718718            $blacklists = array(
    719              'zen.spamhaus.org',
    720              'multi.surbl.org'
     719             'dnsbl-1.uceprotect.net',
     720             'surbl.org',
     721             'uribl.com'
    721722            );
    722723
    723724            $isinblack="";
    724            
     725            $ipweb = gethostbyname($parsed['host']);
    725726            // Check against each black list, exit if blacklisted
    726727            foreach( $blacklists as $blacklist ) {
    727                 $domain = $parsed['host'] . '.' . $blacklist . '.';
    728                 $record = dns_get_record(trim($domain));       
    729                 if (count($record) > 0 ) {
     728                //$domain = $parsed['host'] . '.' . $blacklist . '.';
     729                //$record = dns_get_record(trim($domain)); 
     730                if( wpdoctor_dnsbl_check( $ipweb, $blacklist ) == true ) {
    730731                     $isinblack.=$blacklist." "; 
    731732                }
     
    10151016    }
    10161017
     1018    function wpdoctor_dnsbl_check( $ip_address = NULL, $dnsbl = NULL ) {
     1019        if( $ip_address == NULL )
     1020        {
     1021              /* No IP address given */
     1022              return false;
     1023        }
     1024
     1025        if( filter_var($ip_address, FILTER_VALIDATE_IP) === false )
     1026        {
     1027              /* IP address is invalid */
     1028              return false;
     1029        }
     1030
     1031        if( $dnsbl == NULL )
     1032        {
     1033              /* No DNSBL to check against */
     1034              return false;
     1035        }
     1036
     1037        /* Need to reverse the IP address */
     1038        $array = explode( ".", $ip_address );
     1039        $array = array_reverse( $array );
     1040        $reverse_ip = implode( ".", $array );
     1041
     1042        /* Perform the check */
     1043        $res = gethostbyname( $reverse_ip.".".$dnsbl );
     1044
     1045        if( $res == $reverse_ip.".".$dnsbl )
     1046        {
     1047              /* IP is not in given DNSBL */
     1048              return false;
     1049        }
     1050
     1051        /* No checks failed, hostname does not match request, IP is in DNSBL */
     1052        return true;
     1053  }
     1054
    10171055?>
  • wp-doctor/trunk/readme.txt

    r1541191 r1694828  
    44Tags: doctor, malware, antivirus, malware cleaner, antimalware, anti malware, malware scan, malware scanner, security, protection, virus, security, protection, permissions, htaccess, ip block, blacklist
    55Requires at least: 2.8.0
    6 Tested up to: 4.6.1
    7 Stable tag: 1.5
     6Tested up to: 4.8
     7Stable tag: 1.6
    88
    99Malware removal and security plugin. Periodically perform a full scan for malware, breaches security analysis and check if the domain is in blacklist.
     
    4141
    4242<ul>
    43 <li>spamhaus.org</li>
     43<li>dnsbl-1.uceprotect.net</li>
    4444<li>surbl.org</li>
    4545<li>uribl.com</li>
     
    115115== Changelog ==
    116116
     117= 1.6 =
     118* Add dnsbl-1.uceprotect.net scan blacklist.
     119
    117120= 1.5 =
    118121* New design.
Note: See TracChangeset for help on using the changeset viewer.