[ABD] StopForumSpam.com automatted banning

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
microUgly
Registered User
Posts: 88
Joined: Sat Jun 02, 2007 5:35 am

[ABD] StopForumSpam.com automatted banning

Post by microUgly » Thu Dec 11, 2008 2:20 am

Modification Name: StopForumSpam.com automated banning
Author: microUgly

Modification Description::
Complements phpBB3's current banning system by checking a users username/email/ip against the StopForumSpam.com listing using its API. It will automatically ban current users and prevent registration.

Modification Version: 0.1

Requirements: phpBB 3.0.x
Features:
  • Can ban and prevent forum registration based on users IP, email, or username and enforce a ban on already registered users (each check is optional).
  • Can set your own tolerance (i.e. only ban username if it's been reported on StopForumSpam.com 5 or more times)
  • Can set your own ban end (i.e. allow an IP if it hasn't been reported for more than 10 days).
  • Logs identified spammers so you can track how well the system is working
Installation:
Sorry, I've never written a mod for distribution, and the system seems to complicated to be make the effort at this very moment. In any case, if you don't know how to follow what I write here then you shouldn't be using it anyway.
  1. Extract the files into a folder on your host.
  2. Open /includes/session.php
  3. In the function check_ban() find $db->sql_freeresult($result); (should be line 1117)
  4. AFTER that line include stopforumspam-ban.php. For example:

    Code: Select all

    include($_SERVER['DOCUMENT_ROOT'].'/mods/stopforumspam-ban.php');
Optionally, if you also want to block registrations based on the supplied username
  1. Open /includes/functions_user.php
  2. At the end of the validate_username function, before "return false" (should be line 1483) insert:

    Code: Select all

    $sfsReturn = include($_SERVER['DOCUMENT_ROOT'].'/mods/stopforumspam-disallow.php');
    if ($sfsReturn !== TRUE) return $sfsReturn;
    Make sure you get the path correct for your system.
[/s]
stopforumspam-disallow.php is not working.

You can customise the checks by editing the files. In stopforumspam-ban.php you can delete an entire array item from $banTriggers to not perform that check.

Log is created in the store/ folder. You can set the log details in each of the files.

Screenshots: n/a

MOD-Demo: None.
Modification Download: http://www.microugly.com/phpbb-mods/sto ... m-dev1.zip
Last edited by microUgly on Tue Jan 06, 2009 11:07 pm, edited 3 times in total.

User avatar
beggers
Registered User
Posts: 1257
Joined: Fri Nov 23, 2001 8:19 pm
Location: Las Vegas
Contact:

Re: [DEV] StopForumSpam.com automatted banning

Post by beggers » Thu Dec 11, 2008 6:53 am

Always good to see more anti-spamming capability. Thanks!

User avatar
DoYouSpeakWak
Registered User
Posts: 2307
Joined: Fri Jul 25, 2008 1:32 pm
Location: Island of Wak-Wak
Name: Hans Lassen
Contact:

Re: [DEV] StopForumSpam.com automatted banning

Post by DoYouSpeakWak » Thu Dec 11, 2008 7:48 am

Excellent
Image
Whatever you share comes back. Support the phpBB Communities
My Validated and Released Modifications
Offering paid phpBB help and System administrator services.

User avatar
thejdm
Registered User
Posts: 435
Joined: Sun Dec 21, 2003 4:18 pm
Location: pennsylvania
Contact:

Re: [DEV] StopForumSpam.com automatted banning

Post by thejdm » Mon Dec 22, 2008 6:14 am

something worth checking out.
thanks.
www.thejdm.com ...turn it on, y0

microUgly
Registered User
Posts: 88
Joined: Sat Jun 02, 2007 5:35 am

Re: [DEV] StopForumSpam.com automatted banning

Post by microUgly » Tue Jan 06, 2009 6:34 am

I finally got around to putting this on my live site. In the last hour 40 log entries have been recorded from 24 spammers. All of them were identified by their IP bar one who was identified by email address. One spammer was blocked from registration based on the chosen username--unfortunately the code I've uploaded here doesn't correctly log that event (doh!) so I don't know what username was supplied but he didn't come back.

I don't get that many spam posts, but I didn't realise spammers were hanging around so much. The captcha's would probably have blocked most of these guys anyway, but it's nice to have that second level of defense.

I think I need to extend the log to include what topics or forums they are looking at. I was tempted to log these into the user logs but I think there will be too many.

DiryHarry
Registered User
Posts: 3
Joined: Thu Sep 04, 2008 7:54 pm

Re: [DEV] StopForumSpam.com automatted banning

Post by DiryHarry » Sun Mar 01, 2009 10:03 pm

Hi,

if I'm getting it right, your mod consists of two parts
- a part with that I can prevent registration of spmmers autmaticallay
- a part in the ACP?

Perhaps you can describe the second part? Is there a "Check against Stopforumspam" Button or Link in the detail view of every registered user? Or how does it look like?

User avatar
thejdm
Registered User
Posts: 435
Joined: Sun Dec 21, 2003 4:18 pm
Location: pennsylvania
Contact:

Re: [DEV] StopForumSpam.com automatted banning

Post by thejdm » Fri Apr 17, 2009 10:33 am

has anyone else installed this mod?
the past week+ spam bots have been hitting my forum about 4-5 a day sometimes more.
www.thejdm.com ...turn it on, y0

PurpleOne
Registered User
Posts: 1
Joined: Thu Aug 06, 2009 9:09 am
Contact:

Re: [DEV] StopForumSpam.com automatted banning

Post by PurpleOne » Thu Aug 06, 2009 9:20 am

Just like to say this works brilliantly! I have been constantly fighting with spammers registering themselves on my forum, I have been getting as much as 15 a day! This is only from the ones who don't give a valid address and my default inbox gets bombarded with failed delivery status. The ones that do have a valid address, I get just as many!

This stops the spammers from even getting a chance to register, although I had to remove the username from the ban trigger as some smart cookie decided to use the 'Anonymous' username!

:D

User avatar
thejdm
Registered User
Posts: 435
Joined: Sun Dec 21, 2003 4:18 pm
Location: pennsylvania
Contact:

Re: [DEV] StopForumSpam.com automatted banning

Post by thejdm » Wed Aug 19, 2009 11:11 pm

i have this installed and had the 'PM me when spam registers' and well it says i had new PM's but when i went to the inbox i had 0, now i have 2 messages (so it says) but i dont have any. how the heck can i get that back to 0?
www.thejdm.com ...turn it on, y0

finnw
Registered User
Posts: 2
Joined: Thu Nov 12, 2009 1:41 am

Re: [DEV] StopForumSpam.com automatted banning

Post by finnw » Thu Nov 12, 2009 2:00 am

PurpleOne wrote:This stops the spammers from even getting a chance to register, although I had to remove the username from the ban trigger as some smart cookie decided to use the 'Anonymous' username!
:D
It's worse than that, it can trigger already-registered users who have logged out. They go to the front page, see the "you have been permanently banned" message and assume their IP has been blacklisted. It hasn't. It's because they had no valid login cookie and the current username defaults to 'Anonymous'. These users could have continued reading/posting if they had ignored the message and logged in, but understandably they assume they cannot log in and walk away.

For my installation I modified the code so that if the current username is 'Anonymous' it ignores it but any other username will be looked up in the database.

excentryk
Registered User
Posts: 1
Joined: Sun Nov 15, 2009 12:31 am

Re: [DEV] StopForumSpam.com automatted banning

Post by excentryk » Sun Nov 15, 2009 12:40 am

finnw wrote:
PurpleOne wrote:This stops the spammers from even getting a chance to register, although I had to remove the username from the ban trigger as some smart cookie decided to use the 'Anonymous' username!
:D
It's worse than that, it can trigger already-registered users who have logged out. They go to the front page, see the "you have been permanently banned" message and assume their IP has been blacklisted. It hasn't. It's because they had no valid login cookie and the current username defaults to 'Anonymous'. These users could have continued reading/posting if they had ignored the message and logged in, but understandably they assume they cannot log in and walk away.

For my installation I modified the code so that if the current username is 'Anonymous' it ignores it but any other username will be looked up in the database.
hello - please tell me how you modified the code to allow Anonymous users to view forum?
I have problem because all of my guests are banned.
Please answer thx ;)

finnw
Registered User
Posts: 2
Joined: Thu Nov 12, 2009 1:41 am

Re: [DEV] StopForumSpam.com automatted banning

Post by finnw » Fri Nov 20, 2009 1:57 am

excentryk wrote:hello - please tell me how you modified the code to allow Anonymous users to view forum?
I have problem because all of my guests are banned.
Please answer thx ;)
Here's the modified portion of the code:

Code: Select all

    // Unset any checks that we don't have values for.
    if (empty($user_id))
    {
      unset($banTriggers['username']);
    }
    elseif (isset($banTriggers['username']))
    {
      user_get_id_name($user_id, $user_name);

      if (!empty($user_name) && $user_name[1] != "Anonymous")
      {
        $banTriggers['username']['value'] = $user_name;
      }
      else
      {
        unset($banTriggers['username']);
      }
    }
    if (empty($user_email)) {
      unset($banTriggers['email']);
    } elseif (isset($banTriggers['email'])) {
      $banTriggers['email']['value'] = $user_email;
    }
    if (empty($user_ips)) {
      unset($banTriggers['ip']);
    } elseif (isset($banTriggers['ip'])) {
      $banTriggers['ip']['value'] = $user_ips;
    }

alexx_2010
Registered User
Posts: 1
Joined: Wed Nov 18, 2009 6:33 am

Re: [DEV] StopForumSpam.com automatted banning

Post by alexx_2010 » Fri Nov 20, 2009 7:07 am

I did installed this mod i faced the same problem but couldn't find any solution.

roger.meier
Registered User
Posts: 1
Joined: Mon Nov 23, 2009 6:04 pm

Re: [DEV] StopForumSpam.com automatted banning

Post by roger.meier » Mon Nov 23, 2009 6:06 pm

I installed the mod and I'm getting this error:

Code: Select all

[phpBB Debug] PHP Notice: in file /mods/stopforumspam-ban.php on line 100: curl_exec() has been disabled for security reasons
I made sure the permissions of both php files are set to 755.

Any ideas?

un4saken
Registered User
Posts: 39
Joined: Mon Apr 17, 2006 8:38 pm

Re: [DEV] StopForumSpam.com automatted banning

Post by un4saken » Wed Nov 25, 2009 1:11 pm

Someone please make this modx compatible

Locked

Return to “[3.0.x] Abandoned MODs”

Who is online

Users browsing this forum: Bing [Bot] and 13 guests