News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Bots, bots, bots

Started by MrMike, December 31, 2008, 04:19:56 PM

Previous topic - Next topic

Atomic Blaze

Quote from: MrMike on January 06, 2009, 08:57:52 AM
Quote from: Atomic Blaze on January 06, 2009, 07:36:06 AM
According to my logic there are 4,228,250,625 possible IP combinations, chance that a bot and a real user might be sharing the same IP, 1/4.2 billion.

And the chance that they'd stumble across my forum and want to sign up: 1/600 billion, lol. ;)

and the combined possibility is 1/2.52 trillion
Trick number one, looketh over there. Doth endeth the trick.

Follow me on Twitter!

Party Llama || GitHub

CueBurn

Thanks MrMike, this mod looks great...  I've managed to install the first set of instructions but am a bit stumped with the second... When I try to register a test account is comes back with a template parse error.  I've got a feeling it's to do with the following code in the register.php file:

////////////////////////////////////////
// Begin BOT-STOPPER 1.2 by MrMike
//
// Detect earlier registration attempts by a
// bot by matching names in the smf_failed_reg table

    $fakefield='';
    $fakephone='';
    $botmail='';
    $botname='';
    $remote_ip='';
    $regfailquery='';
    $regfailresult='';

if(isset($_POST['name'])){$fakefield = preg_replace("/[^0-9a-z]/i",'', $_POST['name']);}
if(isset($_POST['age'])){$fakefield = preg_replace("/[^0-9a-z]/i",'', $_POST['age']);}
if(isset($_POST['color'])){$fakefield = preg_replace("/[^0-9a-z]/i",'', $_POST['color']);}
if(isset($_POST['country'])){$fakefield = preg_replace("/[^0-9a-z]/i",'', $_POST['country']);}
if(isset($_POST['street'])){$fakefield = preg_replace("/[^0-9a-z]/i",'', $_POST['street']);}
if( isset($_POST['email']) ){$botmail = preg_replace("/[^0-9a-z@.]/i",'', $_POST['email']);}
if( isset($_POST['user']) ){$botname = preg_replace("/[^0-9a-z]/i",'', $_POST['user']);}

    ////////////////////////////////////////


Is there any chance someone could have a quick look through please and see if it's something obvious?  Would be really appreciated as all this spam is starting to send me mad!  Thanks in advance for the help, and again for such a great sounding mod  :)

MrMike

Quote from: CueBurn on January 13, 2009, 05:16:46 PM
When I try to register a test account is comes back with a template parse error.  I've got a feeling it's to do with the following code in the register.php file
If you haven't modified the code, I'm fairly sure it's okay. It may be in the section where you added the hidden field.



Quote from: CueBurn on January 13, 2009, 05:16:46 PM
Is there any chance someone could have a quick look through please and see if it's something obvious?  Would be really appreciated as all this spam is starting to send me mad!  Thanks in advance for the help, and again for such a great sounding mod  :)
You're welcome. But hang tight- I have something even better on the way that I'll announce later today or tomorrow.. Less code, virtually no file modifications, and no database changes. :)

CueBurn

Quote from: MrMike on January 13, 2009, 05:54:54 PM
I have something even better on the way that I'll announce later today or tomorrow.. Less code, virtually no file modifications, and no database changes. :)

Top man!!  Looking forward to it mate - cheers again!  :D

Advertisement: