Idiots signing up

for all net-related stuff
Post Reply
User avatar
faceless
Posts: 26468
Joined: Tue Apr 25, 2006 6:16 pm

Idiots signing up

Post by faceless »

Last night there was someone called "hindiboy22" who signed up and posted links to porn etc. This was an accident as the wee snider got round my "security"... Whenever I add new members I have to use a separate file than the normal "profile.php" to sign them up and I'd forgotten to change it back to the one that's in use normally. So it was my fault really, but it just goes to show that it's necessary.

It makes me wonder how many other arseholes like that have tried to sign up and then been hit with a wall they can't get through. It also makes me laugh though, haha. If anyone else running a phpbb forum wants to know how to do it, let me know and I'll show you. It does mean a bit of work manually creating the accounts, but it's a lot less work than having to clean up after spambots and tosspots like hindiboy22. Thanks to Skylace for cleaning up last night and banning the fool...
User avatar
Lostinthestates
admin
Posts: 646
Joined: Wed Feb 28, 2007 4:44 pm
Location: Bethlehem, USA

Post by Lostinthestates »

Thanks for that! I was wondering how you managed to avoid that happening more often.
User avatar
nekokate
admin
Posts: 2418
Joined: Wed Dec 13, 2006 5:13 pm
Location: West Yorkshire, UK
Contact:

Post by nekokate »

Actually I have a phpBB2 forum and I'd love to know how to do that, if it's not too much trouble, Face - I'm deleting about 5 or 6 SPAM accounts a day at the moment.
User avatar
faceless
Posts: 26468
Joined: Tue Apr 25, 2006 6:16 pm

Post by faceless »

ok, here's what to do -

1. open your profile.php in an editor but before you do anything else save it again as say "profile-open.php", as you will need two separate files for this.

2. go to line 84 where you'll see this:

else if ( $mode == 'editprofile' || $mode == 'register' )

you should edit it to just like this:

else if ($mode == 'editprofile')

then save the file as profile.php. Uppload both files to your FTP and it will now locked against new signups. To allow new signups you need to do this:

1. Change the register link that is in the file "overall_header.tpl" which is in your /templates/yourtheme folder at around line 270. As you can see when you click on the register link here it just goes to a simple page that I made which asks people to send an email from an ISP mail account to register.

2. Once people have done that and you want to allow their account, go to your FTP and rename the profile.php file to say "profile-closed.php" and rename the untouched "profile-open.php" file to "profile.php". You can then register the people (I usually do it once a week) pretty quickly by going to

Code: Select all

https://yoursite.com/profile.php?mode=register&agreed=true
. As soon as you've registered the new people rename the profile.php file back to something that you can recognise and rename the profile-closed.php file back to profile.php.

It might sound a bit tricky at first, but once you've got it sorted it's pretty easy (unless you forget to lock things up after you've sorted new accounts as I've done a few times now)

note: don't use the suggestions for filenames that I've mentioned here... pick your own for safety's sake.
User avatar
nekokate
admin
Posts: 2418
Joined: Wed Dec 13, 2006 5:13 pm
Location: West Yorkshire, UK
Contact:

Post by nekokate »

Very cool. Thanks, I'll have a toy around with that and see what happens :)
User avatar
major.tom
Macho Business Donkey Wrestler
Posts: 1970
Joined: Sun Jan 21, 2007 7:07 pm
Location: BC, Canada

Post by major.tom »

I like scripting, and since I hate renaming files manually (and it's subject to human error), I would create a couple scripts to achieve this without having to do so manually:

First, create a couple permanent backups of your current profile.php

Code: Select all

cp profile.php profile-with-register.php
cp profile.php profile-without-register.php
Then manually edit profile-without-register.php as faceless said...

Then create 2 scripts, something like this:

vi register-on.sh

Code: Select all

!/bin/sh
cp profile-with-regisher.php profile.php
vi rigister-off.sh

Code: Select all

!/bin/sh
cp profile-without-register.php register.php
...and make them executable (by you only):

Code: Select all

chmod 750 register-on.sh
chmod 750 register-off.sh
Then don't forget to run register-off.sh the 1st time.

Saves alot of manual editing. :D
Post Reply