Known to be working with v2.0.6 and up
I implemented a system to ban the IP on spot if the bot tries to register such user. They only try to promote links to their own website. thats what this MOD will prevent. The back links spam bot is after can be in website field or signature field. I configured registration page not to display website and signature fields. They are activated only after user has 10 posts (configurable). (SCROLL down for simplier MOD - where signatures are not checked)
If bot tries to submit website or signature fields before that - instant ban.
after dude tried 12 different IP's he apparently removed my site from his list. No more porn spam. He was really *beep* me off. I think its one genius running this scam.
Code:
## MOD Title: Instant Ban - Spam Bots registration
## MOD Author: niekas
## MOD Description: prevents spam bots registering on your forum by
## removing website and signature fields in registration and profile form
##untill users reached certain amount of posts
## MOD Version: 1.0.1
##
## Installation Level: (Easy)
## Installation Time: ~5 minutes
## Files To Edit:
## /includes/usercp_register.php
## /templates/subSilver/profile_add_body.tpl
## Included Files: (n/a)
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$error = FALSE;
#
#-----[ AFTER, ADD ]------------------------------------------
#
$cut_off=10; //how many posts should user have before form fields are activated
// ---------------------------------------
if (($mode == 'register' && ($HTTP_POST_VARS['website'] != '' || $HTTP_POST_VARS['signature'] != '') ) || ($userdata['user_posts'] < $cut_off && $mode=='editprofile' && ($HTTP_POST_VARS['website'] != '' || $HTTP_POST_VARS['signature'] != '')))
{
$ban_this=encode_ip(getenv('REMOTE_ADDR'));
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip)
VALUES ('" . $ban_this . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_ip = '" . $ban_this . "'";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
}
message_die(GENERAL_MESSAGE, "banned", '', __LINE__, __FILE__);
}
#
#-----[ FIND ]------------------------------------------
#
if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
}
#
#-----[ REPLACE WITH ]------------------------------------------
#
if ( $mode == 'editprofile' )
{
$template->assign_block_vars('switch_edit_profile', array());
if ($userdata['user_posts'] >= $cut_off)
{
$template->assign_block_vars('switch_edit_website', array());
}
}
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_WEBSITE}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="website" size="25" maxlength="255" value="{WEBSITE}" />
</td>
</tr>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_edit_website -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- END switch_edit_website -->
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_SIGNATURE}:</span><br /><span class="gensmall">{L_SIGNATURE_EXPLAIN}<br /><br />{HTML_STATUS}<br />{BBCODE_STATUS}<br />{SMILIES_STATUS}</span></td>
<td class="row2">
<textarea name="signature"style="width: 300px" rows="6" cols="30" class="post">{SIGNATURE}</textarea>
</td>
</tr>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_edit_website -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- END switch_edit_website -->
Of course you can add a notice about this in your template - that website and signature field will be activated after certain amount of posts or ask them to contact administrator.
Let me know if it works for you
UPDATE - if you'd rather only check against website and leave signatures intact use this simplier code:
Code:
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$error = FALSE;
#
#-----[ AFTER, ADD ]------------------------------------------
#
// ---------------------------------------
if ($mode == 'register' && $HTTP_POST_VARS['website'] != '' )
{
$ban_this=encode_ip(getenv('REMOTE_ADDR'));
$sql = "INSERT INTO " . BANLIST_TABLE . " (ban_ip)
VALUES ('" . $ban_this . "')";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't insert ban_ip info into database", "", __LINE__, __FILE__, $sql);
}
$sql = "DELETE FROM " . SESSIONS_TABLE . "
WHERE session_ip = '" . $ban_this . "'";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't delete banned sessions from database", "", __LINE__, __FILE__, $sql);
}
message_die(GENERAL_MESSAGE, "banned", '', __LINE__, __FILE__);
}
#
#-----[ OPEN ]------------------------------------------
#
/templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<tr>
<td class="row1"><span class="gen">{L_WEBSITE}:</span></td>
<td class="row2">
<input type="text" class="post"style="width: 200px" name="website" size="25" maxlength="255" value="{WEBSITE}" />
</td>
</tr>
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_edit_profile -->
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- END switch_edit_profile -->
.
Keeps bots from registering by checking how long it took to fill out the registration form.
MOD Name: AntiSpam Mod
Author: deMone
MOD Description: Protects your forum from automatically dispatched spam
MOD Version: 1.0.3
Installation Level: Easy
Installation Time: ~ 3 Minutes
Download File:
antispam-1.0.3.modFile Size: 4682 Bytes
Security Score: 0
Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.
This MOD has only been tested by the phpBB MOD Team with the phpBB version in the topic title. It may not work in any other versions of phpBB.
This one adds the question "Are You Human?" To the registration. Seeing as it's a Mod, most bots will answer the default (No)
MOD Name: The humanizer
Author: Underhill
MOD Description: Changes the register form to prevent spam bots by a simple way
MOD Version: 1.1.0 (Updated 10/22/06)
Installation Level: Easy
Installation Time: ~ 5 Minutes
Tested on phpBB Version: 2.0.21
Download File:
thehumanizerve110.modFile Size: 7150 Bytes
Support for this MOD needs to be asked within this topic. The phpBB Teams are not responsible or required to give anyone support for this MOD. By installing this MOD, the phpBB Support Team or phpBB MODifications Team may not be able to provide support.
This MOD has only been tested by the phpBB MOD Team with the phpBB version listed in the topic. It may not work in any other versions of phpBB.