You are not logged in.

#1 2008-11-04 5:40 pm

diabolic.bg
Member
From: Bulgaria, Eastern Europe
Registered: 2008-11-03
Posts: 589
Website

A Nice Anti-spam mod for phpBB2

In my board this mod working very fine.

############################################################## 
## MOD Title: Block DNSBL Blacklisted Registrants
## MOD Author: TerraFrost < N/A > (Jim Wigginton) http://www.frostjedi.com/phpbb
## MOD Description: Prevents those whose IP address is listed on DNSBLs from registering.
## MOD Version: 1.0.1
##
## Installation Level: Easy
## Installation Time: 1 Minutes
##
## Files To Edit: 2
##      includes/usercp_register.php
##      language/lang_english/lang_main.php
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##   As explained by wikipedia.org, DNS-based Blackhole Lists (DNSBLs for short)
##   "are chiefly used to publish lists of addresses linked to spamming."  This
##   MOD checks the IP addresses of would-be registrants against varrious DNSBL's
##   and prevents their registration attempt if they show up on them.
##
##   The idea for this MOD and much of the code come from this WordPress plugin:
##   http://www.nikki-wongsokario.com/john/DNS-anti-spam.phps
##
##   More information on DNSBLs can be found here:
##   http://en.wikipedia.org/wiki/DNSBL
##
##   The latest version of this mod can be found here:
##   http://www.frostjedi.com/terra/scripts/phpbb/dnsbl.zip
##
##   For support / comments / whatever, visit here:
##   http://www.frostjedi.com/phpbb/viewforum.php?f=33
##
############################################################## 
## MOD History: 
##
##     1.0.1: - seperated from Block Open Proxy Registrants MOD.
##            - added more DNSBLs
##     1.0.0: - initial release
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#
$error = FALSE;
$page_title = ( $mode == 'editprofile' ) ? $lang['Edit_profile'] : $lang['Register'];

#
#-----[ AFTER, ADD ]------------------------------------
#

// Block DNSBL Blacklisted Registrants (by TerraFrost)
if ($mode == 'register' && isset($HTTP_POST_VARS['submit']))
{
    $address = $HTTP_SERVER_VARS['REMOTE_ADDR'];
    $rev = implode('.',array_reverse(explode('.', $address)));

    $lookup = "$rev.l1.spews.dnsbl.sorbs.net";
    if ($lookup != gethostbyname($lookup))
    {
        message_die(GENERAL_MESSAGE, strtr($lang['dsbl'],array('%url%' => "http://www.spews.org/ask.cgi?x=$address")));
    }

    $lookup = "$rev.sbl-xbl.spamhaus.org";
    if ($lookup != gethostbyname($lookup))
    {
        message_die(GENERAL_MESSAGE, strtr($lang['dsbl'],array('%url%' => "http://www.spamhaus.org/query/bl?ip=$address")));
    }

    $lookup = "$rev.list.dsbl.org";
    if ($lookup != gethostbyname($lookup))
    {
        message_die(GENERAL_MESSAGE, strtr($lang['dsbl'],array('%url%' => "http://dsbl.org/listing?$address")));
    }
}

#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php

#
#-----[ FIND ]------------------------------------------
#
$lang['A_critical_error'] = 'A Critical Error Occurred';

#
#-----[ AFTER, ADD ]------------------------------------
#
$lang['dsbl'] = 'Your IP address is on a <a href="%url%">DNS-based Blackhole List</a>. <p />Registration attempt blocked.';

#
#-----[    SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

And an idea - why don't you integrate your DB with http://cbl.abuseat.org/ or http://dnsbl.info/
I think it will be very useful.

Last edited by diabolic.bg (2008-11-05 5:33 pm)


Funiest jokes and pics

Offline

#2 2008-11-06 2:06 pm

pedigree
uıɐbɐ ʎɐqǝ ɯoɹɟ pɹɐoqʎǝʞ ɐ buıʎnq ɹǝʌǝu ɯ,ı
From: New Zealand
Registered: 2008-04-16
Posts: 7,104

Re: A Nice Anti-spam mod for phpBB2

Having looked at the RBLs provided by other email based spam filters, there doesnt seem to be a huge overlap of forum spam and email spam.  I personally wouldnt want to mirror other sites IP databases on this site but my mod for vbulletin will be adding surbl (for spamvertised links), spamhaus xbl and sorbs lists.

Offline

#3 2008-11-06 4:11 pm

diabolic.bg
Member
From: Bulgaria, Eastern Europe
Registered: 2008-11-03
Posts: 589
Website

Re: A Nice Anti-spam mod for phpBB2

Maybe you are right but I like security. wink
In my board \phpbb2\ I have installed a few mods - Textual confirmation, Stop_Spambot_Registration-1.0.2a and The Humanizer (if someone want I will give the links). More then 1.5 year I don't have spam but I hate spammers and fight them.
Yesterday I have installed phpBB2 mods for stopforumspam - very useful mod and works excellent. And I will send here every spammer who I catch. smile


Funiest jokes and pics

Offline

Board footer

Powered by FluxBB

Close
Close