The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vbSpamBuster v0.2 Details »» | |||||||||||||||||||||||||
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:
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:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
Show Your Support
|
Comments |
#42
|
|||
|
|||
UK Jimbo; would love to see a 3.5.2 version
|
#43
|
||||
|
||||
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 |
#44
|
||||
|
||||
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! |
#45
|
|||
|
|||
Here you go....
In spambuster-libs.php, look for this at the bottom of the file: Code:
?> 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); } } 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); Code:
// 11-26-2005: see if message passes spam trap filters if ( sb_test2( $title, $message, implode(' ', array_keys($sendto) ) ) ) { // fails spam test } else { Code:
} $url = "private.php?$session[sessionurl]"; eval(print_standard_redirect('pm_messagesent')); 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'])); 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; } |
#46
|
|||
|
|||
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. |
#47
|
||||
|
||||
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.
|
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|