Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vbSpamBuster v0.2 Details »»
vbSpamBuster v0.2
Version: 0.2, by UK Jimbo UK Jimbo is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Version: 3.0.6 Rating:
Released: 02-16-2005 Last Update: 02-21-2005 Installs: 8
Is in Beta Stage  
No support by the author.

Following the release of vB SpamBuster v0.1 earlier in the week I've added some of the improvements based on the discussion about it.

This version is a complete rewrite over v0.1 and adds the major features:
  • Moves spam into the moderation queue rather than giving the user a "permission denied error"
  • Has a highly configurable scoring system

As you can see the ruleset is fairly small at the moment I still think that it will catch a lot of spam posts. Any help/feedback from people running the system and either getting "false positives" or want to add any better rules to the default list please let me know.

Installation instructions

Download spambuster-libs.php and spambuster-rules.php.

You may wish to edit the define values at the top of the spambuster-libs.php file. Later on you might want to edit the rules in spambuster-rules.php too.

Upload spambuster-libs.php and spambuster-rules.php into your includes directory.

In both newthread.php and newreply.php find:
PHP Code:
require_once('./includes/functions_bigthree.php'); 
after it add:
PHP Code:
require_once('./includes/spambuster-libs.php'); 
In newthread.php find:
PHP Code:
verify_forum_password($foruminfo['forumid'], $foruminfo['password']); 
after it add:
PHP Code:
// do a spambuster test
sb_test($_POST['subject'],$_POST['message'].$_POST['WYSIWYG_HTML']); 
Now in newreply.php find:
PHP Code:
$threadid intval($_REQUEST['threadid']); 
after it add:
PHP Code:
// do a spambuster test
sb_test($_POST['title'],$_POST['message'].$_POST['WYSIWYG_HTML']); 
As ever any feedback would be gratefully received.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 12-20-2005, 11:27 PM
-=Sniper=- -=Sniper=- is offline
 
Join Date: May 2002
Posts: 605
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

UK Jimbo; would love to see a 3.5.2 version
Reply With Quote
  #43  
Old 12-21-2005, 01:00 AM
UK Jimbo's Avatar
UK Jimbo UK Jimbo is offline
 
Join Date: Sep 2002
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sorry a v3.5.x version hasn't materialised yet.

I'm on an extended overseas trip at the moment and it's hard to find the time for it. It's definitely on my TODO list
Reply With Quote
  #44  
Old 12-21-2005, 11:34 AM
Ski-Whiz's Avatar
Ski-Whiz Ski-Whiz is offline
 
Join Date: May 2003
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can this sort of thing also be added to the PM system? We are getting people who are trying to be sneaky, and pm members through the pm system as well.

Unless members come forward and tell you, the site won't know about it.

So adding a checker in the pm system would be great!

Thanks!
Reply With Quote
  #45  
Old 12-21-2005, 01:33 PM
motorhaven motorhaven is offline
 
Join Date: Jul 2002
Posts: 56
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here you go....

In spambuster-libs.php, look for this at the bottom of the file:

Code:
?>
Above it, add:

Code:
	// used to perform the test on emails/pms
	function sb_test2($title,$body,$recip="")
    {
		$hits=array();

		// no need to worry about most posts
		if( $GLOBALS['bbuserinfo']['posts'] > SB_MIN_POSTS )
			return false;

		// parts of the post
		$req['title'] = $title;
		$req['body'] = $body;
		$req['any'] = $title ."\n". $body;

		// fetch the list of tests
		$tests = sb_parse_config(SB_CONFIG);

		// run each test
		foreach($tests as $test) {

			$test_pass=false;
			// regular expression test
			if( $test['type'] == 'regexp' ) {
				$test_pass=preg_match($test['data'][0],$req[ $test['field'] ]);
			}

			// record the test if it was a hit
			if( $test_pass ) {
				$hits[ $test['name'] ] = $test['score'];
				$hits['total'] += $test['score'];
			}
		}

		// it isn't spam
		if( $hits['total'] < SB_TRIGGER )
			return false;

		$ret=array();
		$ret['hits'] = $hits;

		// build a pretty string of the scores
		$pairs=array();
		foreach($hits as $k => $v) {
			if( $k == 'total' )
				continue;

			$pairs[] = "$k=$v";
		}
		$ret['HITS_STR'] = implode(', ',$pairs);

		$ret['USER'] = $GLOBALS['bbuserinfo']['username'];
		$ret['MESSAGE_TITLE'] = $title;
		$ret['MESSAGE_BODY'] = $body;
        $ret['RECIP'] = $recip;

		// send alert emails
		sb_send_mail2($ret);

		return true;
	}


	function sb_send_mail2($vars) {

		$mail=array();
		$mail[] = "This is an automated email from vB SpamBuster";
		$mail[] = "";
		$mail[] = "The user <%USER%> has just tried to email or PM the following message to <%RECIP%>:";
		$mail[] = "";
		$mail[] = "***********************************************";
		$mail[] = "";
		$mail[] = "The vB SpamBuster system deemed it to be spam after it passed the following tests:";
		$mail[] = "<%HITS_STR%>";
		$mail[] = "";

		$msg = implode("\n",$mail);

		foreach($vars as $k => $v) {
			$msg = str_replace("<%$k%>",$v,$msg);
		}

		$emails = explode(' ',SB_ALERT_EMAILS);
		foreach($emails as $email) {
			vbmail($email,'vB SpamBuster PM or Email Alert',$msg);
		}
	}
(Note, I don't include the message title/body in the alert due to privacy issues.

In private.php, look for:

Code:
				$title = addslashes(htmlspecialchars_uni(fetch_censored_text($pm['title'])));
				$message = addslashes(fetch_censored_text($pm['message']));
				$signature = intval($pm['signature']);
				$iconid = intval($pm['iconid']);
				$disablesmilies = iif($pm['disablesmilies'], 0, 1);
Below that add:

Code:
                // 11-26-2005: see if message passes spam trap filters
                if ( sb_test2( $title, $message, implode(' ', array_keys($sendto) ) ) )
                {
				    // fails spam test
                }
                else
                {
Next, look for

Code:
			}

			$url = "private.php?$session[sessionurl]";
			eval(print_standard_redirect('pm_messagesent'));
Change it to

Code:
                         }
			}

			$url = "private.php?$session[sessionurl]";
			eval(print_standard_redirect('pm_messagesent'));

In sendmessage.php look for (towards the bottom of the file):

Code:
eval(fetch_email_phrases('usermessage', $destuserinfo['languageid']));
Below that add:
Code:
        // Test against spam trap filters
	    if ( sb_test2( $emailsubject,$message, $destuserinfo['email'] ) )
        {
            // Message fails filters...
	   // parse this next line with eval:
	  $sendtoname = $destuserinfo['username'];
	  eval(print_standard_redirect('redirect_sentemail'));
          return;
        }
Reply With Quote
  #46  
Old 01-02-2006, 12:54 PM
oldengine oldengine is offline
 
Join Date: Mar 2004
Posts: 257
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is a great idea, but needs one modification.

Spam traps are not a "one shoe fits all" word list. The type of spam we tolerate posted on the board may be different than the spam words tolerated in emails. Therefore, a different spambuster-rules.php will be needed for the email spam.

There are items placed in my spambuster-rules.php that I would rather users communicate by email to eachother instead of in the open for all board readers to see. Copying spambuster-rules.php to spambuster-mail-rules.php and altering the contents would get the job done.

Hey! I'm waiting to upgrade to 3.5 because of SpamBuster!
EDIT: No longer. 3.5.3 is installed.
Reply With Quote
  #47  
Old 02-28-2006, 01:01 AM
UK Jimbo's Avatar
UK Jimbo UK Jimbo is offline
 
Join Date: Sep 2002
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've finally found the time to sort this out. 90% of the code is ready now and there'll be a beta release that just uses plugins and admincp configuration in the next few days.
Reply With Quote
  #48  
Old 03-02-2006, 01:28 AM
UK Jimbo's Avatar
UK Jimbo UK Jimbo is offline
 
Join Date: Sep 2002
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Beta v3.5.x version here
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:55 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.06850 seconds
  • Memory Usage 2,300KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (8)bbcode_code
  • (6)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete