[RC] No more spambots

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.
Post Reply
User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

[RC] No more spambots

Post by jalaln » Tue Jun 19, 2007 2:41 pm

MOD Title: No more spambots.
MOD Description: Blocks registrations from timezone GMT-12 that is used by almost all spambots.
MOD Version: RC 1.0.0

MOD Download:

no_more_spambots.txt (Use with EasyMOD)

OR:

Code: Select all

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

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

			if ( !($row = $db->sql_fetchrow($result)) )
			{
				message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql);
			}
			$user_id = $row['total'] + 1;

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

			if( $user_timezone == '-12' )
			{
				die();
			}

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Notes:
DON'T WORRY ABOUT BLOCKING GMT-12, WHY?
No human habitations are in this time zone.

UTC-12 is a nautical time zone comprising the high seas between 180°W and 172°30'W longitude.
Subtract twelve hours from Coordinated Universal Time to obtain the time for this zone.
Ships using this time are the last to begin each calendar day.
But, why is it used by almost all spambots? Well, for they are coded to select the first option in any dropdown box.

PEOPLE CAN STILL FILL IN GMT-12 AFTER THEY REGISTER, IN THEIR PROFILES.

Now you can unban most of your blocked IPs, disallowed names, blocked domains, i.e., mail.ru, etc.

I've been using this MOD since 19 June 2007 and never even had a single spambot :). Before, spambots were increasing and posting. (I have no other anti-spambots MODs installed and visual confirmation turned off).

PS: Enjoy! ;)
Last edited by jalaln on Sat Mar 15, 2008 6:06 pm, edited 8 times in total.
No more spambots for phpBB2 and phpBB3.

cmcemd
Registered User
Posts: 67
Joined: Fri Jun 30, 2006 4:44 am
Location: USA

Re: [RC] No more spambots

Post by cmcemd » Mon Jun 25, 2007 5:32 pm

Anyway to use this to block registrations from multiple time zones?

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [RC] No more spambots

Post by jalaln » Mon Jun 25, 2007 6:18 pm

cmcemd wrote:Anyway to use this to block registrations from multiple time zones?
Yup, replace:

Code: Select all

if( $user_timezone == '-12' )
         {
            die();
         }
with:

Code: Select all

if( $user_timezone == '-12' || $user_timezone == '-11')
			{
				die();
			}
If you want to block more timezones, simply keep adding: || $user_timezone == 'TIMZEZONE'

Timezones are:

Code: Select all

-12 = GMT - 12 Hours
-11 = GMT - 11 Hours
-10 = GMT - 10 Hours
-9 = GMT - 9 Hours
-8 = GMT - 8 Hours
-7 = GMT - 7 Hours
-6 = GMT - 6 Hours
-5 = GMT - 5 Hours
-4 = GMT - 4 Hours
-3.5 = GMT - 3.5 Hours
-3 = GMT - 3 Hours
-2 = GMT - 2 Hours
-1 = GMT - 1 Hours
0 = GMT
1 = GMT + 1 Hour
2 = GMT + 2 Hours
3 = GMT + 3 Hours
3.5 = GMT + 3.5 Hours
4 = GMT + 4 Hours
4.5 = GMT + 4.5 Hours
5 = GMT + 5 Hours
5.5 = GMT + 5.5 Hours
6 = GMT + 6 Hours
6.5 = GMT + 6.5 Hours
7 = GMT + 7 Hours
8 = GMT + 8 Hours
9 = GMT + 9 Hours
9.5 = GMT + 9.5 Hours
10 = GMT + 10 Hours
11 = GMT + 11 Hours
12 = GMT + 12 Hours
13 = GMT + 13 Hours
PS: Working like a charm thus far ;) More than one week and I have never even had one spambot, I've even unbanned all domains, all IPs and all disallowed names :).
No more spambots for phpBB2 and phpBB3.

User avatar
3Di
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] No more spambots

Post by 3Di » Mon Jun 25, 2007 9:26 pm

As a matter of fact all the spammers registered at my board (that have not spam protection filters, despite I'm offering one of the bests) .. use -12. Well thanks for the hint, I'll use it (also) for some of my coding.

Regards.
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
dellsystem
Former Team Member
Posts: 3879
Joined: Sat Apr 09, 2005 8:54 pm
Location: Montreal
Name: Wendy
Contact:

Re: [RC] No more spambots

Post by dellsystem » Tue Jun 26, 2007 12:36 am

Awesome idea, never would have thought of GMT -12 being a habitation of choice for spambots, thanks :D

Question: would it be possible to make it seem as if it the registration had worked, in effect directing the user to the "your account has been created" page, without actually sending the information?
Former moderator and website team member | My MODs, and more (GitHub)

User avatar
.tRoubLe.
Registered User
Posts: 12
Joined: Tue Jun 27, 2006 7:44 pm

Re: [RC] No more spambots

Post by .tRoubLe. » Tue Jun 26, 2007 2:00 am

Where do i put this code?

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [RC] No more spambots

Post by jalaln » Tue Jun 26, 2007 6:47 am

dellsystem wrote:Question: would it be possible to make it seem as if it the registration had worked, in effect directing the user to the "your account has been created" page, without actually sending the information?
Why do you want that?
No one will choose GMT-12 but only bots, if a user chooses GMT-12 the page will stop loading (you will see a white page instead).

There's really no need to redirect it to anything.

But if you want, then here you go:

Replace:

Code: Select all

if( $user_timezone == '-12' )
         {
            die();
         }
With:

Code: Select all

if( $user_timezone == '-12' )
			{

$messagedie = $lang['Account_added'] . '<br /><br />' . sprintf($lang['Click_return_index'],  '<a href="' . append_sid("index.$phpEx") . '">', '</a>');

message_die(GENERAL_MESSAGE, $messagedie);

die();
			}
Replace the message with whatever you want ... or according your forum's activation system (Account_added - Account_inactive - Account_inactive_admin).

Also you can redirect it to another page (index.php, etc.):

Replace:

Code: Select all

if( $user_timezone == '-12' )
         {
            die();
         }
With:

Code: Select all

if( $user_timezone == '-12' )
			{
			redirect(append_sid('index.'.$phpEx));
			die();
			}
This will stop the registration and redirect to the index page. You can also create a .php file containing whatever (then you have to replace index with the new file name).
.tRoubLe. wrote:Where do i put this code?
It's very simple, you just need to update one file. open your {root}/includes/usercp_register.php and make the changes (read first post) then upload the file through FTP. (press OK when asking for overwriting, but please make a backup before).
If you use EasyMOD, please reply here.
Last edited by jalaln on Tue Jun 26, 2007 2:32 pm, edited 1 time in total.
No more spambots for phpBB2 and phpBB3.

Britisches_FreiKorps
Registered User
Posts: 7
Joined: Thu Jun 14, 2007 11:20 pm

Re: [RC] No more spambots

Post by Britisches_FreiKorps » Tue Jun 26, 2007 2:11 pm

How about redirecting to another website or url?

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [RC] No more spambots

Post by jalaln » Tue Jun 26, 2007 2:42 pm

Britisches_FreiKorps wrote:How about redirecting to another website or url?
Use this instead:

Code: Select all

if( $user_timezone == '-12' )
			{
			header("location:http://***");
			die();
			}

replace *** with the website or URL...
But within the same domain use the one I have written in the post above.

Also, there is no need to redirect to anything, but anyway...
No more spambots for phpBB2 and phpBB3.

Britisches_FreiKorps
Registered User
Posts: 7
Joined: Thu Jun 14, 2007 11:20 pm

Re: [RC] No more spambots

Post by Britisches_FreiKorps » Tue Jun 26, 2007 2:57 pm

jalaln wrote:there is no need to redirect to anything, but anyway...
Yes I know that......but. It might give me some satisfaction in maybe redirecting the spambots somewhere, like their own site!

User avatar
3Di
Registered User
Posts: 12893
Joined: Mon Apr 04, 2005 11:09 pm
Location: Milan (IT) Frankfurt (DE)
Name: Marco
Contact:

Re: [RC] No more spambots

Post by 3Di » Tue Jun 26, 2007 4:48 pm

Britisches_FreiKorps wrote:
jalaln wrote:there is no need to redirect to anything, but anyway...
Yes I know that......but. It might give me some satisfaction in maybe redirecting the spambots somewhere, like their own site!
What a idea :)
I'm just reading, don't care. :)
Want to compensate me for my interest? Donate
Please PM me only to request paid works. Thx.
Extensions, Scripts, MOD porting, Update/Upgrades
My development's activity º PhpStorm's proud user

User avatar
Datachip92
Registered User
Posts: 136
Joined: Thu Jun 07, 2007 1:58 am
Contact:

Re: [RC] No more spambots

Post by Datachip92 » Wed Jun 27, 2007 3:07 am

jalaln wrote:
dellsystem wrote:Question: would it be possible to make it seem as if it the registration had worked, in effect directing the user to the "your account has been created" page, without actually sending the information?
Why do you want that?
No one will choose GMT-12 but only bots, if a user chooses GMT-12 the page will stop loading (you will see a white page instead).

There's really no need to redirect it to anything.

But if you want, then here you go:

that is a good Idea for the peope making the spambots will have a hard time trying to work out whats wrong, and I love this idea to take this choice away from those bots

dtdgoomba
Registered User
Posts: 3
Joined: Wed Jun 27, 2007 4:56 pm

Re: [RC] No more spambots

Post by dtdgoomba » Wed Jun 27, 2007 4:59 pm

I haven't gotten a spambot registering since I implemented this yesterday, but I think they still get a Welcome email as I'm getting bounces back. I may wait a day or 2 as maybe they are from before I put the mod in and just long server delays on their end, but has anyone else noticed bounces continuing?

My settings are for administrator approval, so it's the email that tells them they registered but need me to activate them.

User avatar
jalaln
Registered User
Posts: 1076
Joined: Tue Jul 05, 2005 5:05 am

Re: [RC] No more spambots

Post by jalaln » Wed Jun 27, 2007 6:23 pm

dtdgoomba wrote:I haven't gotten a spambot registering since I implemented this yesterday, but I think they still get a Welcome email as I'm getting bounces back.
They won't get Welcome e-mails if failure-mails bounce back to you.
dtdgoomba wrote:I may wait a day or 2 as maybe they are from before I put the mod in and just long server delays on their end
Yup, that's it.
dtdgoomba wrote:but has anyone else noticed bounces continuing?
Nope ;)
dtdgoomba wrote:My settings are for administrator approval, so it's the email that tells them they registered but need me to activate them.
You could also remove the administrator approval (they will not receive any emails, they are spambots after all).

Also, you could turn off the visual confirmation.
No more spambots for phpBB2 and phpBB3.

dtdgoomba
Registered User
Posts: 3
Joined: Wed Jun 27, 2007 4:56 pm

Re: [RC] No more spambots

Post by dtdgoomba » Wed Jun 27, 2007 6:31 pm

Thanks, I'll wait it out and actually check the time/date of the bounced email, since they come back to me. And duh, I really phrased that incorrectly when I said they get bounces haha. Thanks again for this mod, it's been nice and quiet so far.

Post Reply

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

Who is online

Users browsing this forum: No registered users and 9 guests