Plugin Directory

Changeset 1000804


Ignore:
Timestamp:
10/02/2014 05:40:49 PM (12 years ago)
Author:
davidmerinas
Message:

New IP List

Location:
wp-maltor/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-maltor/trunk/readme.txt

    r988203 r1000804  
    1313== Description ==
    1414
    15 This plugin "hides" the WordPress site if traffic is coming from malicious IP or Tor Network. IP list is updated every 30 minutes calling 2 free services: https://www.dan.me.uk/torlist/ for Tor Exit Nodes and http://myip.ms/files/blacklist/csf/latest_blacklist.txt for malicious IP list.
     15This plugin "hides" the WordPress site if traffic is coming from malicious IP or Tor Network. IP list is updated every 30 minutes from http://iprep.wpmaltor.com/ and http://torlist.wpmaltor.com/ which are using 2 free services: https://www.dan.me.uk/torlist/ for Tor Exit Nodes and http://myip.ms/files/blacklist/csf/latest_blacklist.txt for malicious IP list.
    1616
    1717## **When a malicious IP is detected the plugin will act in one of these ways:**
     
    3737== Changelog ==
    3838
     39= 0.1.4 =
     40*New URL to download IP list
     41
    3942= 0.1.3 =
    4043*Fixed some problems determining real IP
  • wp-maltor/trunk/wpmaltor.php

    r988203 r1000804  
    44Plugin URI: http://wordpress.org/plugins/wp-maltor/
    55Description: This plugin bans Tor Network's and malicious IPs from visiting the site.
    6 Version: 0.1.3
     6Version: 0.1.4
    77Author: davidmerinas,miguel.arroyo
    88Author URI: http://www.davidmerinas.com
     
    1515    if($active)
    1616    {
    17         $urls=array("https://www.dan.me.uk/torlist/","http://myip.ms/files/blacklist/csf/latest_blacklist.txt");
     17        //$urls=array("https://www.dan.me.uk/torlist/","http://myip.ms/files/blacklist/csf/latest_blacklist.txt");
     18        $urls=array("http://torlist.wpmaltor.com/","http://iprep.wpmaltor.com/");
    1819        WP_MalTor_refreshIPs($urls);
    1920        $ip=WP_MalTor_getuserIP();
     
    3233        $streamoptions = stream_context_create(array(
    3334                'http' => array(
    34                         'timeout' => 5
     35                        'timeout' => 10
    3536                )
    3637            )
     
    7172function WP_MalTor_checkip($ip){
    7273    $iplist = get_option("WP_MalTor_iplist");
    73     if(in_array($ip,$iplist))
     74    if(is_array($iplist)&&in_array($ip,$iplist))
    7475    {
    7576        $blocked = get_option("WP_MalTor_blockedlist");
     
    9192                break;
    9293            case "redirection":
    93                 $url = get_option("WP_MalTor_redirect_url");
     94                $url = str_replace(array('&','<','>'), array('&','<','>'),htmlspecialchars(get_option("WP_MalTor_redirect_url"),ENT_QUOTES));
    9495                if(!isset($url)||$url==null||trim($url)=="")
    9596                {
     
    167168        <tr style="width:420px" valign="top">
    168169        <th scope="row">Redirection URL (http://...)</th>
    169         <td><input style="width:320px" type="text" name="WP_MalTor_redirect_url" value="<?php echo get_option('WP_MalTor_redirect_url'); ?>" /></td>
     170        <td><input style="width:320px" type="text" name="WP_MalTor_redirect_url" value="<?php echo str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'),htmlspecialchars(get_option('WP_MalTor_redirect_url'),ENT_QUOTES)); ?>" /></td>
    170171        </tr>
    171172       
Note: See TracChangeset for help on using the changeset viewer.