[RC] Stop Advertisement bots

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Xpert
Translator
Posts: 114
Joined: Fri Feb 20, 2004 8:19 pm
Location: Moscow, Russia
Contact:

[RC] Stop Advertisement bots

Post by Xpert »

Code: Select all

############################################################## 
## MOD Title: Stop Advertisement bots
## MOD Author: Xpert < xpert@phpbbguru.net > (N/A) http://www.phpbbguru.net 
## MOD Description: 	This mod helps you to stop advertisement bots registering on
##			your board. 
## MOD Version: 	1.0.0 [phpBB 2.0.x] 
## 
## Installation Level: 	Easy 
## Installation Time: 	5 Minutes 
## Files To Edit (3): 	includes/usercp_register.php
##			language/lang_english/lang_main.php
##			templates/subSilver/profile_add_body.tpl
## Included Files: 	adv_bot.tpl
############################################################## 
## For Security Purposes, Please Check: http://www.phpbbguru.net/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: 
## 
############################################################## 
## MOD History:
## 
##   2004-11-07 - Version 1.0.0 
##      - Initial Release
## 
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

# 
#-----[ 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 -->

# 
#-----[ OPEN ]------------------------------------------ 
# 
includes/usercp_register.php

#
#-----[ FIND ]------------------------------------------
#
      $avatar_sql = user_avatar_gallery($mode, $error, $error_msg, $user_avatar_local); 
   } 

   if ( !$error ) 
   {

#
#-----[ AFTER ADD ]------------------------------------------
#
		// Start of Stop Advertisement bots code
		if ( $mode == 'register' && ($website != '') )
		{
			// That's advertisement bot... let's send a message with its registaration data to the board admin
			
			include($phpbb_root_path . 'includes/emailer.'.$phpEx);
			$emailer = new emailer($board_config['smtp_delivery']);

			$emailer->from($board_config['board_email']);
			$emailer->replyto($board_config['board_email']);

			$emailer->use_template('adv_bot', $board_config['default_lang']);
			$emailer->email_address($board_config['board_email']);
			$emailer->set_subject($lang['Adv_bot_reg']);

			$emailer->assign_vars(array(
				'SITENAME' => $board_config['sitename'],
				'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '',
				'USERNAME' => preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, substr(str_replace("\'", "'", $username), 0, 25)),
				'PASSWORD' => $password_confirm,
				'EMAIL_ADDRESS' => $email,
				'ICQ' => $icq,
				'AIM' => $aim,
				'YIM' => $yim,
				'MSN' => $msn,
				'WEB_SITE' => $website,
				'FROM' => $location,
				'OCC' => $occupation,
				'INTERESTS' => $interests));

			$emailer->send();
			$emailer->reset();

			// ... and die nice

			message_die(GENERAL_MESSAGE, $lang['Adv_bot_reg']);
		}
		// End of Stop Advertisement bots code

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

#
#-----[ FIND ]------------------------------------------
#

//
// That's all Folks!
// -------------------------------------------------

#
#-----[ BEFORE ADD ]------------------------------------------
# 

// Stop Advertisement bots
$lang['Adv_bot_reg'] = 'Advertisement bot registration attempt';

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
# EoM
language/lang_english/email/adv_bot.tpl
Subject: Advertisement bot registration attempt at {SITENAME}
Charset: iso-8859-1

There was an advertisement bot registration attempt at {SITENAME}. The registration data was:

Username: {USERNAME}
Password: {PASSWORD}
Email: {EMAIL_ADDRESS}

ICQ Number: {ICQ}
AIM Address: {AIM}
MSN Messenger: {MSN}
Yahoo Messenger: {YIM}
Web Site: {WEB_SITE}
From: {FROM}
Occupation: {OCC}
Interests: {INTERESTS}

{EMAIL_SIG}


This mod helps you to stop advertisement bots registering on your board. E-mail 'll be sent after bot registration attempt.

User avatar
onigumo
Registered User
Posts: 1755
Joined: Fri Oct 31, 2003 2:32 am
Contact:

Post by onigumo »

I still don't get it. What exactly will it do?
I write articles on community building
@ The Infinity Program.

Xpert
Translator
Posts: 114
Joined: Fri Feb 20, 2004 8:19 pm
Location: Moscow, Russia
Contact:

Post by Xpert »

It will disable website field at registration form (not at profile editing!) and catch users that will try to send data for the field, because advertisement bots use such algorythm. Bot will be sent away and board admin will receive a message with bot registration data.

BittenApple
Registered User
Posts: 297
Joined: Sun Dec 12, 2004 10:23 pm
Contact:

Post by BittenApple »

Wow, very sohpisticated! Heh.. nice one.
My forums:

http://bittenapple.bi.funpic.org/forum/

Sorry, but youll have to copy and paste!

deny
Registered User
Posts: 565
Joined: Wed May 14, 2003 9:14 am
Location: Find-Ip-Address.org
Contact:

Post by deny »

I have seen similair mods as your here on phpbb.Only different is that your mod send mail to admin and other one ban ip of bot automatically.
But it is always useful to have bot protecting mods.

Xpert
Translator
Posts: 114
Joined: Fri Feb 20, 2004 8:19 pm
Location: Moscow, Russia
Contact:

Post by Xpert »

My mod is better integrated with phpBB, imho :)

User avatar
Kalipo
Registered User
Posts: 551
Joined: Mon Dec 08, 2003 1:47 pm

Post by Kalipo »

The title of the mod does seem a little redundant in contrast to the features already resident in phpBB, albeit I do like the idea of being notified of an attempted registration.

Could you update your MOD to include the IP of the registrant?

Xpert
Translator
Posts: 114
Joined: Fri Feb 20, 2004 8:19 pm
Location: Moscow, Russia
Contact:

Post by Xpert »

Can you explain about the title in simple words?
IP? Good idea, i'll think about it.

da_badtz_one
Registered User
Posts: 376
Joined: Thu Jan 29, 2004 8:25 pm

Post by da_badtz_one »

Kalipo wrote: The title of the mod does seem a little redundant in contrast to the features already resident in phpBB, albeit I do like the idea of being notified of an attempted registration.

Could you update your MOD to include the IP of the registrant?


lol sounds like he's using the dictionary :P

Anyway it' seems to be a good mod, I'll do some testing on it tonight :)

danb00
Registered User
Posts: 1025
Joined: Sun Dec 15, 2002 9:41 pm
Location: Inside Mod:Extreme PHPBB
Contact:

Post by danb00 »

but im sure in phpBB 2.0.11 they have visual conferm which stops bots

so how would this compare to the phpBB 2.0.11 VC?
phpBBModded.com - Modding phpBB

User avatar
Kalipo
Registered User
Posts: 551
Joined: Mon Dec 08, 2003 1:47 pm

Post by Kalipo »

Xpert wrote: Can you explain about the title in simple words?


The title suggests stopping spam bots when phpBB's visual confirmation (as danb00 mentions) does exactly that.
Xpert wrote: IP? Good idea, i'll think about it.


Without it, all you'll be getting is almost worthless information beyond entertainment for the curious. I'd rather have an IP I can ban than use a username. Reguardless, thank you for considering it.
da_badtz_one wrote: lol sounds like he's using the dictionary


No need. Mommy also taught me how to count all the way up to five :wink:

Xpert
Translator
Posts: 114
Joined: Fri Feb 20, 2004 8:19 pm
Location: Moscow, Russia
Contact:

Post by Xpert »

Well, i've written this mod before the phpBB 2.0.11. And everyone has a choice now. :)

User avatar
defender-uk
Registered User
Posts: 380
Joined: Tue Jun 01, 2004 9:06 am
Location: London, UK
Contact:

Post by defender-uk »

Banning the IP is a bad idea, if the bot is using AOL's cache then you ban all 5 million users, same with Wanadoo etc.

Be notified and being able to deal with the situation is much better.

Nice mod (works well with my 'Inactive Members Mod' which does not show inactive members on the memberlist or last user information (as bots never seem to activate))

:)

Outlaw Josie
Registered User
Posts: 14
Joined: Mon Jan 10, 2005 6:50 pm

Post by Outlaw Josie »

Thanks for this!

I might not ban the IP address (should certainly do a lookup first), but certainly would like to capture it during the registration attempt.

Rapid Dr3am
Registered User
Posts: 198
Joined: Sun Jul 13, 2003 4:14 pm
Location: Incommunicado
Contact:

Post by Rapid Dr3am »

The Visual Confirmation in itself is not perfect.

When you take into account Optical charector Recognition, the script creates the image using GD.

The font used for this, is most proberly easily obtained for pattern sampling, as phpBB is free software I doubt they used a pay to use font.

So OCR, should in theory allow the confirmation to be bypassed.

Anything is possible if you try hard enough. ;)

Post Reply

Return to “[2.0.x] MODs in Development”