PDA

View Full Version : Add-On Releases - SpamBuster: Identify, log and remove spam posts on your forum


UK Jimbo
08-13-2007, 10:00 PM
This is the v3.6 version of SpamBuster (https://vborg.vbsupport.ru/showthread.php?t=109258) that I wrote for vBulletin v3.5.x This version is mainly bug fixes.

What does it do?
It spots posts that could potentially be spam then (depending on option settings) creates a thread alerting site admin/moderators about the post and/or hides the post from view.

How does it identify the spam?
All off the posts for users with a post count of less than 10 (configurable) have their posts checked against a number of rules. Each rule has a different "score". If the total score for the post exceeds a specified limit then the post is deemed to be spam.

Can I add my own rules?
The installer file has a default rule set with it, you may wish to customise the rules in the options section of the AdminCP. The rules system is fairly simple to add to, in simple terms each rule is a perl regular expression and a score.

How do I install it?
Import the product via the Product Manager in the AdminCP. The options group and plugins will be added to your system. Now would be a good time to click the install (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=155242) link on here to record the fact that you've installed it.

How do I configure it?
Head to the "SpamBuster" option group in the "vBulletin Options" section of your AdminCP. Fill in the relevant fields. Further documentation will follow but it should be obvious what each setting does for the moment.

How do I upgrade?
Just run a regular install. It's worth backing up your settings particluarly the rules before performing the upgrade. If you have any problems I recommend removing the product then installing it from scratch.

How can I test it?
Try posting a new thread/post with some trigger values in it. The string cialis should do the trick.

Help it's broken my forum!
Erm, that's not an intended feature. Disable all six of the plugins that are part of the product "SpamBuster" and post an error report to this thread. The forum will work fine.

Why doesn't it do x,y or z?
Because I've either not thought about it yet or I've not written it yet. Please drop a post into this thread with any (sensible!) suggestions.

Can I use it commercially?
You're free to use it for whatever purpose comercially/privately as long as you don't resell the code. It's released under the LGPL, see the link below for futher info. If you find this plugin useful and you'd like to make a donation please use the "donate" button below.

https://vborg.vbsupport.ru/external/2010/02/12.gif
click to donate (https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=james%2epaypal%40jump%2daround%2ecom&item_name=SpamBuster%20Hack&no_shipping=0&no_note=1&tax=0&currency_code=GBP&bn=PP%2dDonationsBF&charset=UTF%2d8)

https://vborg.vbsupport.ru/external/2010/02/66.png (http://creativecommons.org/licenses/LGPL/2.1/)
This software is licenced under the CC-GNU LGPL (http://creativecommons.org/licenses/LGPL/2.1/).


Changelog

8th November 2007 - v1.1.2 - New thread redirect bug fixed
14th August 2007 - v1.1.1 - Multiple post bug fix
13th August 2007 - v1.1.0 - Important bug fixes, updated rules file
15th June 2006 - v1.0.1 - Updated list of rules uploaded as a text file
6th April 2006 - v1.0.0 - Stable release: code remains the same but the rules file has changed.

TheBlackPoet
08-14-2007, 09:29 PM
thanks for this... while i have been lucky to not have the spam problem... it never hurts to have this gatekeeper in place... installed...

Michael Biddle
08-14-2007, 11:37 PM
Thanks for the release :D

COBRAws
08-15-2007, 12:41 AM
Thanks for this update jimbo! Ill give some forward later

edit:

so far no bugs, working as supposed to work

Zaiaku
08-15-2007, 02:11 AM
I was wonderig if the other version would for on the newer vb. thaks for the update. Will have to try this on my new site.

gforce75
08-15-2007, 02:15 AM
it's awesome. Ill have to give this a crack. had some spam bots just hit me up

UK Jimbo
08-15-2007, 05:41 AM
I was wonderig if the other version would for on the newer vb. thaks for the update. Will have to try this on my new site.

It does but with some critical bugs in it that:
- don't allow you to use the "moderation" section of the admincp
- doesn't update thread/post counters
- doesn't allow report threads to be created if you have post flood detection enabled
- doesn't have a rules file that's as good as this one

Hornstar
08-15-2007, 07:14 AM
This version is looking very nice. Thanks for the update.

UK Jimbo
08-15-2007, 07:40 AM
The v1.1.0 release introduced a new bug which means that if you have thread reporting turned on you'll get a load of reported threads instead of just one.

I've fixed the problem in v1.1.1 which has just been (hastily!) released.

Mecho
08-15-2007, 09:28 AM
omg ! such a great mod . installed and works like charm in vb 3.6.8 :up:

awesome . strongly recommended to all . thanks for release it UK Jimbo :)

brad_irc
08-15-2007, 02:25 PM
The v1.1.0 release introduced a new bug which means that if you have thread reporting turned on you'll get a load of reported threads instead of just one.

I've fixed the problem in v1.1.1 which has just been (hastily!) released.

LOL, Ooops! :) .. I'm pruning 1510 threads right now. I installed it last night! No problem though; Thanks for the quick fix!

UK Jimbo
08-15-2007, 02:28 PM
Oops! Sorry about that.

Quarterbore
08-15-2007, 03:57 PM
Can you add an option in the settings to ignore a list of forumids?

I have a couple "private" forums where we allow contributors to post pretty much anything and while most of these members have more then "10" posts I really don't want the rest of the staff to get an eyeful if they happen to catch the "SPAMBUSTER" post in the staff forums.

If you want advise, I would just add a new setting for "Ignored Forums" and have users list the forum IDs with a space between them. Then, have the pluggin verify if the post is in one of the ignored forums and if it is do not moderate.

I can help you code this addition if you would like and if you don't add it I will modify the code for my own site as I really need this.

Thanks!

tpearl5
08-15-2007, 06:41 PM
Nice! Any chance of this automatically moving the suspected spam to a 'trash' forum?

COBRAws
08-16-2007, 08:17 PM
Can you add an option in the settings to ignore a list of forumids?
(...)
If you want advise, I would just add a new setting for "Ignored Forums" and have users list the forum IDs with a space between them. Then, have the pluggin verify if the post is in one of the ignored forums and if it is do not moderate.

Same here, but I have 3 report forums and one archive for all of them. Would be great if someone can point me where can I extend the forumids to be ignored appart from the default report forumid in vb settings.

COBRAws
08-17-2007, 02:18 PM
I am gettin spambuster reports from my vb default report forum aswell.

3.5 version running on my 3.6 worked as a charm, please take a look into my problem when you have some spare time. Thanks

WeBBy
08-18-2007, 04:21 AM
Will v.1.1.1 work with 3.5.7? It seems to be better and have more options than v1.0.0.0

Thanx

myadsl
08-20-2007, 05:18 AM
I installed it but nothing happens. I am running vb 3.6.8 and all six plugins are active. Tested it with a new user with 0 posts with a few things (including nokia, a URL etc) but the post was not hidden and no notification was created.

Any ideas?

UK Jimbo
08-20-2007, 07:43 AM
Will v.1.1.1 work with 3.5.7? It seems to be better and have more options than v1.0.0.0

Yup - it should work fine though I've not tested it.


I installed it but nothing happens. I am running vb 3.6.8 and all six plugins are active. Tested it with a new user with 0 posts with a few things (including nokia, a URL etc) but the post was not hidden and no notification was created.

Any ideas?

What settings do you have setup in the options section? screenshot?

UK Jimbo
08-20-2007, 07:46 AM
I am gettin spambuster reports from my vb default report forum aswell.

3.5 version running on my 3.6 worked as a charm, please take a look into my problem when you have some spare time. Thanks

Can you add an option in the settings to ignore a list of forumids?

I have a couple "private" forums where we allow contributors to post pretty much anything and while most of these members have more then "10" posts I really don't want the rest of the staff to get an eyeful if they happen to catch the "SPAMBUSTER" post in the staff forums.

If you want advise, I would just add a new setting for "Ignored Forums" and have users list the forum IDs with a space between them. Then, have the pluggin verify if the post is in one of the ignored forums and if it is do not moderate.

I can help you code this addition if you would like and if you don't add it I will modify the code for my own site as I really need this.

Thanks!

I'll sort this out guys.


Nice! Any chance of this automatically moving the suspected spam to a 'trash' forum?

Possibly :)

Mrdby
08-20-2007, 01:04 PM
but if i set this to yes..would this alert and remove all sites i have listed with.com? or even myspace?

UK Jimbo
08-20-2007, 01:07 PM
but if i set this to yes..would this alert and remove all sites i have listed with.com? or even myspace?

I have no idea what you're talking about! :)

Mrdby
08-20-2007, 01:09 PM
me either..let me test this..lol i mean..should i see both of the sections set at 10? because they stated if it equal or greater..it would be considered spam based on post right? because I want people with 5 or less post...that post links should be considered as spam.lol

UK Jimbo
08-20-2007, 01:58 PM
me either..let me test this..lol i mean..should i see both of the sections set at 10? because they stated if it equal or greater..it would be considered spam based on post right? because I want people with 5 or less post...that post links should be considered as spam.lol

nope. Still no idea.

Njm
08-20-2007, 02:02 PM
nice ......

UK Jimbo
08-20-2007, 02:04 PM
I've noticed that some of the URL based rules (.jp, .no, etc) need a bit of refining as they'll incorrectly match stuff like myimage.jpeg

It'll be a pretty easy regexp fix, I'll take a look when I get a chance.

BobbyBig
08-25-2007, 11:43 AM
Please integrate PM Spam too.
There are serios problems with people spaming URL via the PM System to other Users.

It also should be configurable for Usergroups and Forums.

regards

UK Jimbo
08-25-2007, 11:48 AM
PM spam is something I've luckily not seen to much of on the forum I work with. It's an interesting feature but begs some privacy issues if the moderators are able to read the users' "private" messages. I'd be interested to hear peoples' thoughts on this one. One idea I had was that if SpamBuster thought a PM was spam then it either put some text at the beginning of the PM making it easy for the user to report it or it kept a count of spam PMs per user and then flagged it up when they reached a threshold.

Worth nothing that if PM spam is a problem you could disable PM functionality until a user has reached a given number of posts on the forum.

I've seen the "configurable by forum" request which is something I'll build into a future release. Can you explain how or why you'd want it configurable by usergroup?

Mecho
08-25-2007, 04:51 PM
Hi ,
I think there is problem that u should fix it somehow . for example A*al is not allowed so if a user use Analog ! their post will be report ! is there anyway that we can set the Exact words or ... ???

thanks

jmottle
08-31-2007, 06:15 PM
I installed the plugin, but when you try to make a new post that triggers the spam filter you get this message:

Invalid Thread specified. If you followed a valid link, please notify the administrator

If you reply to an existing post then it just goes back to that thread and does nto show the post as it has been hidden. Is there a way to perhaps have the message say that their post has triggered a spam filter and will be reviewed by an administrator before it is posted?

Cheers,
Jeff

SuperTaz
09-04-2007, 04:46 AM
Installed. Thank you.

adc-arab
09-17-2007, 09:15 PM
installed worked like a charm great mod ;) it would be awesome if it autoban the users who reached a specific point like auto ban if the post score more than 10 or 20 something like that o.o
cuz after i installed the mod i add some spam words and woah a lot of spam replay got catch by this mod and I'd like to auto ban those spam users and have an option to auto delete the spam posts :)

BobbyBig
09-19-2007, 02:22 AM
Thank you installed.

We also want them to change Usergroup to 4 when Spam got found.

Tryed it with this in SpamBuster Libraries Plugin:
if ($GLOBALS['vbulletin']->userinfo['userid'] > 1) { $userdata->set('usergroupid', 4); }

but it doesnt work.

EDIT: This is really a very good dynamic spam protection.

What also could be added is:
Check PM's. If Found Spam, Just send PM to Admin that the User X has send a PM blocked by the Spamfilter.
Message that a Thread/Post will be moderatated when Spam is found.
Option to exclude Forums from Spam Protection
Option to exclude Usergroups from Spam Protection
Improve the Script: For what I see the regexp is executed everytime, regardless if the User is in the required Posting-Amount range or not.

smapdi
09-27-2007, 10:20 PM
Which version of this mod would be best with vB 3.6.4?

Thanks

Remi
09-30-2007, 05:43 PM
Hi

Can I use this hack to send an email as alert instead of posting a new thread.

Thanks

UK Jimbo
10-02-2007, 09:04 PM
Which version of this mod would be best with vB 3.6.4?

Thanks

This version :) v1.1.1

Hi

Can I use this hack to send an email as alert instead of posting a new thread.

Thanks

Not in its current form. It just posts new threads.

BobbyBig
10-03-2007, 11:19 AM
How about this UK Jimbo: Message that a Thread/Post will be moderatated when Spam is found.
Actually the Users just see nothing and they keep trying to post which results in many unmoderated Posts + angry Users.

We need that badly.
regards

j4ck455
10-08-2007, 09:23 AM
I've noticed that some of the URL based rules (.jp, .no, etc) need a bit of refining as they'll incorrectly match stuff like myimage.jpeg

It'll be a pretty easy regexp fix, I'll take a look when I get a chance.I'm considering changing the following:regexp:a_dotjapan:10:any:"/\.jp/i"to this:regexp:a_dotjapan:10:any:"/\.jp\b/i"the same \b word boundary could be applied to the analogue problem etc.

Do you foresee any problem with using \b in some of the rules?

El Orans
10-12-2007, 06:18 AM
*Clicks Install* :up:

I installed the plugin, but when you try to make a new post that triggers the spam filter you get this message:

Invalid Thread specified. If you followed a valid link, please notify the administrator

If you reply to an existing post then it just goes back to that thread and does nto show the post as it has been hidden. Is there a way to perhaps have the message say that their post has triggered a spam filter and will be reviewed by an administrator before it is posted?

Cheers,
JeffThat would be a nice addition.

mulesnx
10-18-2007, 09:48 PM
This has been fantastic for my forums!!! I have noticed occasionally when people post a thread that is suspected of being spam, it gives this weird error:

Fatal error: Existing data passed is not an array
Called set_existing in /home/usr/public_html/forums/includes/functions_databuild.php on line 200
Called build_forum_counters in /home/usr/public_html/forums/global.php(360) : eval()'d code on line 227
Called sb_post_thread in /home/usr/public_html/forums/includes/class_dm_threadpost.php(1547) : eval()'d code on line 3
Called eval in /home/usr/public_html/forums/includes/class_dm_threadpost.php on line 1547
Called post_save_each in /home/usr/public_html/forums/includes/class_dm_threadpost.php on line 1416
Called save in /home/usr/public_html/forums/includes/functions_newpost.php on line 438
Called build_new_post in /home/usr/public_html/forums/newthread.php on line 186
in /includes/class_dm.php on line 235

Any ideas on how to fix this?

BobbyBig
10-19-2007, 09:34 AM
Actually we feel very angry UK Jimbo, no support, no improvements.
Uninstalling.

j4ck455
10-19-2007, 01:58 PM
Actually we feel very angry UK Jimbo, no support, no improvements.
Uninstalling.While it would be nice if UK Jimbo could post a reply to previous posts at some point, I have to ask how much you are paying UK Jimbo to provide the support and improvements that you're angry about not receiving, also how much did you pay UK Jimbo to use SpamBuster?

My point being, that SpamBuster is provided free of charge, no need to throw a hissy fit bcos UK Jimbo has other things on his mind ATM.

lazytown
10-28-2007, 10:49 PM
I'm considering changing the following:regexp:a_dotjapan:10:any:"/\.jp/i"to this:regexp:a_dotjapan:10:any:"/\.jp\b/i"the same \b word boundary could be applied to the analogue problem etc.

Do you foresee any problem with using \b in some of the rules?

What does \b do? Did it solve some of your problems? I'm having problems with things like .no, .jp, etc where the user just forgot a space after saying .No way... And with jpegs.

-vissa

lazytown
10-28-2007, 10:53 PM
By the way, this is a a great mod!

Are there any directions as to the regular expressions we can use and what they do? I know standard regexp syntax but this one looks different -- what standard is it?

Being able to speficy a word boundary would be really nice (or at least spaces).

-vissa

archaosus
10-31-2007, 07:43 PM
I installed this (very easy) and within about 7 minutes it caught the first spammer - hid and moderator queued the thread, then added a message in my moderator forum about it. I love this product!

webghey
11-08-2007, 06:53 PM
I installed the plugin, but when you try to make a new post that triggers the spam filter you get this message:

Invalid Thread specified. If you followed a valid link, please notify the administrator

If you reply to an existing post then it just goes back to that thread and does nto show the post as it has been hidden. Is there a way to perhaps have the message say that their post has triggered a spam filter and will be reviewed by an administrator before it is posted?

Cheers,
Jeff

quoted for identical experience. Is this intended this way? The previous spambuster did not throw the error - about invalid thread.

Have other members who are running this tested this / getting this error?
I uninstalled the 3.5 one completely and tried a clean install - same.

thanks for any info from others

UK Jimbo
11-08-2007, 09:03 PM
How about this UK Jimbo: Message that a Thread/Post will be moderatated when Spam is found.
Actually the Users just see nothing and they keep trying to post which results in many unmoderated Posts + angry Users.

We need that badly.
regards

quoted for identical experience. Is this intended this way? The previous spambuster did not throw the error - about invalid thread.

Have other members who are running this tested this / getting this error?
I uninstalled the 3.5 one completely and tried a clean install - same.

thanks for any info from others


Hi guys - this has been sorted now in the latest release. It looks like some changes with the code and also some in the 3.6 codebase prevented this from working properly.


Actually we feel very angry UK Jimbo, no support, no improvements.
Uninstalling.

Bye :)

BobbyBig
11-08-2007, 09:04 PM
We allready fixed the redirecting bug for our forum 2 weeks ago ;)
thx for the update anyways, but i hope you will make it even better it is now.

regards

UK Jimbo
11-08-2007, 09:16 PM
We allready fixed the redirecting bug for our forum 2 weeks ago ;)
thx for the update anyways, but i hope you will make it even better it is now.

I can't help feeling that it's a bit of a shame you didn't share this with the other users of this modification.

Audentio
11-08-2007, 09:56 PM
Installed! Ill wait and see how good it works, I do indeed get spam at times on my board quite often so cant wait to see what this does :D.

FinalX-TeaM
11-09-2007, 04:54 AM
thanks!

Remi
11-11-2007, 02:43 AM
is it posible to add the mail function found here to this hack

https://vborg.vbsupport.ru/showpost.php?p=619202&postcount=10

I have set my "Alert forum" to send an email incase of a new thread or post but it is not working with "spam threads/posts alerts"

Thanks

BadgerDog
11-15-2007, 12:14 PM
Installed.... :up:

Tested and working great ... :)

Question: Why is it required to enter both a UserID and Username for that same ID in the AdminCP options for this mod? Is it just a check to make sure they match, or can a different Username be associated with the UserID one enters?

Thanks

Regards,
Badger

UK Jimbo
11-15-2007, 12:28 PM
Installed.... :up:

Tested and working great ... :)

I love it when a plan comes together :D

Question: Why is it required to enter both a UserID and Username for that same ID in the AdminCP options for this mod? Is it just a check to make sure they match, or can a different Username be associated with the UserID one enters?

The way the data is stored in the database (and that you add a new thread/post to the system) both the id and name are stored (instead of looking it up from the user table).

I could add something to the code to derive the username so you'd only need to specify the user id but I was feeling lazy and figured it's not too much extra effort to specify it that once in the configuration settings :)

BadgerDog
11-15-2007, 01:36 PM
The way the data is stored in the database (and that you add a new thread/post to the system) both the id and name are stored (instead of looking it up from the user table).

I could add something to the code to derive the username so you'd only need to specify the user id but I was feeling lazy and figured it's not too much extra effort to specify it that once in the configuration settings :)

Understood... :)

Thanks.....

Another question: I set the post count to 3 since most spammers on our forums jump right in and make their first (and only) post a piece of spam. When your mod places the spam in moderation, does it count that as a post to the user record? I ask because I wonder if I could reduce the count to one (1) and therefore even if a spammer decided to bang out several quick spams in a row, he'd still be stuck at a valid post count of one (1) and therefore he'd never get out of moderation. Does that make sense?

Regards,
Badger

UK Jimbo
11-15-2007, 01:54 PM
Understood... :)

Thanks.....

Another question: I set the post count to 3 since most spammers on our forums jump right in and make their first (and only) post a piece of spam. When your mod places the spam in moderation, does it count that as a post to the user record? I ask because I wonder if I could reduce the count to one (1) and therefore even if a spammer decided to bang out several quick spams in a row, he'd still be stuck at a valid post count of one (1) and therefore he'd never get out of moderation. Does that make sense?


It does, just! :)

Only visible posts count towards the post count so the posts moderated by spambuster will not increase the spammers posts count.

BadgerDog
11-15-2007, 02:02 PM
It does, just! :)

Only visible posts count towards the post count so the posts moderated by spambuster will not increase the spammers posts count.

Roger that .... :up:

Regards,
Badger

croft
11-16-2007, 03:00 AM
installed and was hoping i finally will get rid of lots of spammers. But no such luck for me. When i try to post a test spam post nothing happens. The post isn't hidden and its not posted in my moderator forum either.

trigger level. tested everything from 1 up to 10
post count. 5
enable post reporting. yes
correct forum id. yes
correct user id and name. yes
remove spam threads/posts. yes

Shouldn't those settings find the spam posts and post a notice in my mod forum ?

webghey
11-16-2007, 03:21 AM
installed and was hoping i finally will get rid of lots of spammers. But no such luck for me. When i try to post a test spam post nothing happens. The post isn't hidden and its not posted in my moderator forum either.

trigger level. tested everything from 1 up to 10
post count. 5
enable post reporting. yes
correct forum id. yes
correct user id and name. yes
remove spam threads/posts. yes

Shouldn't those settings find the spam posts and post a notice in my mod forum ?

http://img48.imageshack.us/img48/6818/spamof7.gif

does your screen resemble this?
obviously the user id and forum # would be based off your mod forum #.
it's working on my vb3.68 patch 2

croft
11-16-2007, 03:25 AM
edit. It started to work after a while ??? strange thing.

On another note. Would it be possible to add a user group setting to this spam buster so it doesn't check for spam on certain groups ?

webghey
11-16-2007, 03:36 AM
and you're logged in with an acct less than 10 posts? Not your own acct?

I went into the admincp - created a new user/login
log out of the admincp/site
log in as my test user - make a post about free ipods and viagra or something on sale..
log out..

log back in as admin - look at the post. Mine was invisible and caught by the program... and has caught quite a few spam threads.

I don't know what to tell you - the guy who wrote it will have to help maybe?

UK Jimbo
11-16-2007, 07:17 AM
and you're logged in with an acct less than 10 posts? Not your own acct?

I went into the admincp - created a new user/login
log out of the admincp/site
log in as my test user - make a post about free ipods and viagra or something on sale..
log out..

log back in as admin - look at the post. Mine was invisible and caught by the program... and has caught quite a few spam threads.

I don't know what to tell you - the guy who wrote it will have to help maybe?

A sound advice (pretty much what I would have recommended). Looking at his last post though it seems he has it sorted.

Re: usergroup inclusion/exclusion
It's something that will be in a future release. I think if you look back through the thread someone might have a hack that does it.

lazytown
11-21-2007, 10:30 AM
This is a great mod with only one major flaw.... That is the ability to specify whole words or boundaries. For example, if a person types the word "Virginia," the post will get flagged as spam (due to virgin in the rules). If they link to a jpeg (.jpg) it will get flagged as a link to japan (which is .jp). Without being able to detect spaces/etc or only matching a whole word, it becomes very difficult to make rules that work properly. I need a better understanding of the regular expressions used here.

As a side note -- is there a simple way to detect a link to any URL? Perhaps just the [url] BBcode?

-vissa

UK Jimbo
11-21-2007, 10:47 AM
This is a great mod with only one major flaw.... That is the ability to specify whole words or boundaries. For example, if a person types the work "Virginia," the post will get flagged as spam (due to virgin in the rules). If they link to a jpeg (.jpg) it will get flagged as a link to japan (which is .jp). Without being able to detect spaces/etc or only matching a whole word, it becomes very difficult to make rules that work properly. I need a better understanding of the regular expressions used here.

That's a limitation of the current set of rules not of the mod itself.

You're quite right - it's overly aggressive and needs to be reworked (I posted about this a couple of months back).

It shouldn't be too hard to look for those strings with regular expressions like:

"/\Wvirgin\W/"

That would search for virgin with non "word" characters either side of it.

As a side note -- is there a simple way to detect a link to any URL? Perhaps just the [url] BBcode?

vB does automatic URL parsing as well so http://www.google.com/ would end up being stored without the [url] tags but would appear as a link in the page.

I think your safest bet is to look for http:// (remember to escape the / so it'll read http:\/\/ ni the config)

James

BadgerDog
11-21-2007, 10:58 AM
This is a great mod with only one major flaw.... That is the ability to specify whole words or boundaries. For example, if a person types the work "Virginia," the post will get flagged as spam (due to virgin in the rules). If they link to a jpeg (.jpg) it will get flagged as a link to japan (which is .jp). Without being able to detect spaces/etc or only matching a whole word, it becomes very difficult to make rules that work properly. I need a better understanding of the regular expressions used here.

As a side note -- is there a simple way to detect a link to any URL? Perhaps just the [url] BBcode?

I agree ... :up:

It's a great mod that started out well on our forums, but it seems to be nailing an inordinate amount of posts that have nothing wrong with them, except things like your "Virginia" example....;)

Too bad.... :(

Have reduced post count check to "1" to see if that helps only nail those first time registration then immediately spam types...

Regards,
Badger

UK Jimbo
11-21-2007, 11:06 AM
It's a great mod that started out well on our forums, but it seems to be nailing an inordinate amount of posts that have nothing wrong with them, except things like your "Virginia" example....;)

I'd suggest reverting back to an older version of the rules and you shouldn't have these problems.


If anyone could do some refining of the rules that would be fantastic.

As and when I get the time I'd like to create a test setup where I can test the rules file against a set of known spam/geniune posts.

lazytown
11-21-2007, 11:09 AM
I'd suggest reverting back to an older version of the rules and you shouldn't have these problems.


If anyone could do some refining of the rules that would be fantastic.

As and when I get the time I'd like to create a test setup where I can test the rules file against a set of known spam/geniune posts.


Thanks for the tips in the last couple of posts... Where can we get a list of the regular expression rules that are available/possible?

-vissa

UK Jimbo
11-21-2007, 11:14 AM
Thanks for the tips in the last couple of posts... Where can we get a list of the regular expression rules that are available/possible?

The spambuster rules are all in the configuration/settings section of the admincp.

Google should show up some tutorials on perl regular expressions (which is the type of regular expression SpamBuster uses). Some of it can be a bit daunting though.

It should be fairly easy to modify the existing rules into the \Wvirgin\W style I described earlier.

BadgerDog
11-21-2007, 11:17 AM
I'd suggest reverting back to an older version of the rules and you shouldn't have these problems.


I didn't know we could do that.... :)

It might help.... :up:

While maintaining the current code version, could you post the "old" rule set you refer to so we can plug it into the appropriate area under our AdminCP options?

Thanks...

Regards,
Badger

UK Jimbo
11-21-2007, 11:25 AM
There's a text file at https://vborg.vbsupport.ru/showthread.php?t=109258 which you should be able to open then copy/paste into the settings section.

BadgerDog
11-21-2007, 11:31 AM
There's a text file at https://vborg.vbsupport.ru/showthread.php?t=109258 which you should be able to open then copy/paste into the settings section.

Thanks... :)

Will plug the contents of it into the current version here ... :up:

Regards,
Badger

BadgerDog
11-21-2007, 12:47 PM
There's a text file at https://vborg.vbsupport.ru/showthread.php?t=109258 which you should be able to open then copy/paste into the settings section.


I've opened and reviewed the other text file. It seems very sparse (only links) compared to the one in the current release. I assume it will most likely have the opposite effect and catch far less spam, even though the current one is too sensitive....

I guess it's a matter of trade-offs....

I wonder if just leaving the current one and jumping on first posts only might be the best answer for our site... (thinking out loud)....

Thanks again ... :)

Regards,
Badger

cyberws
11-26-2007, 07:15 PM
Thanks! Spambots and spammers r so annoying. So thanks once again for some ammo against them. Keep up the good work.

Shaheen
11-27-2007, 01:29 PM
works great **

corman420
11-29-2007, 02:50 PM
Great mod. Is there anyway to change the post that it makes? I would like it so it posted a link to the mod "One-touch ban & clean" so all I'd have to do is click the link within the post, and the user along with all thier posts will be deleted.

I tried looking for the template - couldn't find it.

UK Jimbo
11-29-2007, 03:08 PM
Hi - glad you like it :)

The contents of the post are contained within the code - ideally it should be a phrase but I never got round to that. To modify the post that it creates head to your admincp and look in "Plugins & Products" > "Plugin Manager" > "SpamBuster Libraries"

habbishfmforum
01-24-2008, 12:58 PM
Just installed ;)
It'll sure help my moderators keep track of spam :D

Hornbone
01-30-2008, 10:40 AM
very nice

corman420
02-07-2008, 11:49 PM
A tip for those having issues with .info and india domains. REMOVE the .info entry from the rules. When a .info domain is entered into a post, it gets scored from BOTH the .info and india rules. I have a .info domian and everytime somone used an internal link it got scored twice.

corman420
02-08-2008, 05:02 PM
Anyway of adding a feature to ignore certain forum ids?

Alibass
02-12-2008, 05:54 AM
Nice hack **installed**

I have a robot that post rss feeds on my site. It has a user id and over 10,000 posts and yet spambuster keeps flagging it when it post a new file that may trip the rules criteria. :confused:

A nice feature would be if you could exclude user id's or user groups of your choosing.

Koushukei
03-20-2008, 03:40 PM
Well done. Worked great. I have alot of spam so its definitely something I needed.

azjoe
04-04-2008, 11:12 PM
Thanks uk Jimbo... works great.

DeanoG
05-01-2008, 09:55 AM
Does anyone know if this works with VB3.7.0 Gold ?

thanks in advance

gim
05-01-2008, 10:41 PM
Great addon. Thankyou! :)

pike2k
05-02-2008, 06:39 AM
I don't know why, but it FEELS like this addon stopped working with 3.6.10 (maybe even with 3.6.9)

Be great if someone can put my mind at ease

webghey
05-07-2008, 02:35 PM
Does anyone know if this works with VB3.7.0 Gold ?

thanks in advance
did you happen to test it? the OP hasn't been on since December

Tony L
05-26-2008, 11:14 AM
I don't know why, but it FEELS like this addon stopped working with 3.6.10 (maybe even with 3.6.9)

Be great if someone can put my mind at ease

I've just tested it on 3.6.10 and it does indeed seem to be broken. Annoying as I'm getting spammed to death at the moment.

Tony.

Charlie98902
05-28-2008, 02:14 PM
I would like this updated to work on vBullettin 3.7.x as well please. I haven't tested this version since it doesn't work on 3.6.10 I doubt it'll work in the 3.7.x series.

myadsl
06-18-2008, 02:08 PM
Everything works, but when I draw in RSS feeds from my own username it 'moderates' it despite the fact that I have more posts than the threshold value...

Any ideas on how to solve this?

cdoyle
07-27-2008, 03:36 AM
I had this on my 3.5 forum, and we are about to upgrade to 3.7.
from what I'm reading this won't work with 3.7?

That really stinks, this is such a great hack, it worked wonderful on our forum.
I'm going to really miss it.

PossumX
07-31-2008, 02:22 AM
I am running 3.7.1 PL2 and it is still working fine. Upgraded from 3.6.x all the way through, and it's still working.

3.7.2 PL1 upgrade is next, so we'll see what happens.

Mecho
08-03-2008, 11:48 AM
I am running 3.7.1 PL2 and it is still working fine. Upgraded from 3.6.x all the way through, and it's still working.

3.7.2 PL1 upgrade is next, so we'll see what happens.

go for it , it works fine in 3.7.2 patch1 .

septimus
08-18-2008, 03:49 PM
EXCELLENT Mod, using it on two forums and am very happy with it.

One issue: It seem to sporadically fail to post up the report post. I can make it put up the report post with a test spam thread or post, but occasionally it just up and doesn't. I'm not sure exactly why, but I suspect that when there's a post that contains a massive number of keywords it might be choking on it?

For now we're just keeping an eye on the moderation queue, but it really would be more convenient to be able to have the report thread posting work reliably.

Any ideas how I can go about troubleshooting this?

gr8dude
10-21-2009, 07:16 AM
Hi everyone, I've been using SpamBuster for a while and it made my life significantly easier. I thought of an improvement, I implemented it on my forum but the results are not as expected.

My idea was simple - add a regular expression that detects any string that has at least 3 URLs in it.

The regexp I'm using is

regexp:a_not_too_many_links:15:any:"/(http:\/\/.*){3,}/i"


If I test it with online regex tools, any "bad" string that should be busted is busted; however, when the same regexp is used by SpamBuster - messages are still getting past the filter.

I don't understand what is causing this. My guess is that it has something to do with the priority of the rules used by SpamBuster?

Unfortunately I am not a skilled PHP programmer, but I think I would be able to figure it out if I could step through the code with a debugger (as one can do with other languages) and see the state of each variable as new instructions are executed.

Any thoughts?

UK Jimbo
10-21-2009, 07:24 AM
Hi - it's a long time since I've worked on this plugin. For general spam filtering in recent version of vBulletin I'd suggest using the built in Akismet powered spam filtering.

The only way I can think of checking for three + URLs with a regexp is to use something similar to:

(untested)
/.*http:\/\/.*http:\/\/.*http:\/\/.*/

James


edit:

Perhaps try:

/(.*?http:\/\/.*?){3,}/i for your regexp too

gr8dude
10-21-2009, 08:28 AM
Thanks for the swift response.

This is what I use as a testbed:

http://www.spaweditor.com/scripts/regex/index.php
The following test string "this is http://link a test http://link http://link"


Every regexp you mentioned, as well as the one I devised myself works fine; i.e. the regexp tester reports that the given string matches the regexp.

Now, neither of them is effective when used with SpamBuster. I made this regexp the first one in SpamBuster's list - so I am certain this is not related to the order in which the rules are written in the config.

Maybe it can be understood by adding some debug statements to the plugin's code and watching the flow of its execution?


Thanks for suggesting Akismet, but my optimism faded away in just a few seconds - I saw that it is marked as "installed", therefore it means that some time ago I tested it and was not satisfied with the results and that my conclusion was that "SpamBuster is better" (-:

Simon Lloyd
01-11-2010, 08:42 AM
I'd like to use this update version on vb 3.5.4 would it work?

gr8dude
01-12-2010, 01:33 PM
UK Jimbo, I understood the cause of the problem.

The used regexp contains the ':' character (inside "http://").
When spambuster parses the rules, it uses ':' as a separator to explode the string into bits, ex:
regexp:a_nike_dunk:5:any:"/nike dunk/i"

Basically, the culprit is in this line of the sb_parse_config function:
// split up the line
$bits = preg_split('/(?<!\\\\):/',$rule);

This explains why the regexp is not found in the string - the regexp is simply not the one we thought we were using.

Suggested fix:
Use '::' as a separator in each rule, rather than ':'.

Replace
// split up the line
$bits = preg_split('/(?<!\\\\):/',$rule);
With
// split up the line
$bits = preg_split('/(?<!\\\\)::/',$rule);

Note: regular expressions are quite difficult to wrap one's brain around (-: Especially if I haven't written it myself, or if the regexp was written a long time ago. I didn't try to parse this regexp myself, I just guessed what it does and added another ':' and prayed for the best (-:

I don't know what the rationale behind that choice was, but isn't it easier to use this instead? It is straightforward and requires no belief in external forces :-)
$bits = explode('::', $rule);

My local tests are successful, below I have included the source of the file I am using for local tests. It is a stripped down version of Spambuster, the rules and the tested post are taken straight from this files, so you can make quick tests without involving VBulletin itself.


Can you share your thoughts on this, and perhaps update Spambuster to include this fix?




<?php


function sb_parse_config() {


$rules_raw = <<<TEST
#Anything below this is added by Alex Railean
#regexp:a_jewels:5:any:"/^jewel/i"
#regexp:a_runescape:5:any:"/runescape/i"
#power leveling with spaces between words
#regexp:a_wow_powerleveling:10:any:"/power\s*leveling/i"
#regexp:a_wow_gold:5:any:"/gold/i"
#regexp:a_nike_dunk:5:any:"/nike dunk/i"
#regexp:a_hot:5:any:"/hot/i"
#regexp:a_manga:5:any:"/manga/i"
#regexp:a_jordan_shoes:5:any:"/jordan/i"
regexp::a_url::5::any::"/.*http:\/\//i"
regexp::a_gay::6::any::"/gay/i"
regexp::a_not_too_many_links::15::any::"/(http:\/\/.*){3,}/i"
TEST;


$rules = preg_split('/\r?\n/', $rules_raw);
//echo var_export($rules, TRUE);

$log = fopen("spam.log", "a");
fwrite($log, strftime ("%c", time()) . "\n");
$tmp = var_export($rules, TRUE);
fwrite($log, $tmp);

$data = array();

foreach($rules as $rule) {

// comment lines
if( strpos($rule,'#') === 0 )
continue;

// split up the line
$bits = preg_split('/(?<!\\\\)::/',$rule);
$bits2 = explode('::', $rule);
fwrite($log, var_export($bits, TRUE));
fwrite($log, "----\n");
fwrite($log, var_export($bits2, TRUE));
fwrite($log, $rule);

// need the right number of arguements
if( count($bits) < 5 )
continue;

for($i=0;$i<count($bits);$i++) {
if( preg_match('/^"(.*)"$/', $bits[$i], $m) )
$bits[$i] = $m[1];
}


$test=array();
$test['type'] = array_shift($bits);
$test['name'] = array_shift($bits);
$test['score'] = array_shift($bits);
$test['field'] = array_shift($bits);
$test['data'] = $bits;

$data[ $test['name'] ] = $test;
}

$tmp = var_export( $data, TRUE );
echo $tmp."<br><br><br>";

return $data;
}

//echo sb_parse_config();


// used to perform the test on the post
// function sb_test(&$obj,$table=null) {
function sb_test() {

$hits=array();

// no need to worry about most posts
// if( $GLOBALS['vbulletin']->userinfo['posts'] > $GLOBALS['vbulletin']->options['spambusterpostcount'] )
// return false;

// parts of the post
$req = array();
// $req['title'] = $obj->fetch_field('title',$table);
// $req['body'] = $obj->fetch_field('pagetext',$table);
// $req['any'] = $req['title'] ."\n". $req['body'];
$req['title'] = "title";
$req['body'] = "nike tn (http://www.nikemaxtn.com/) chaussure nike (http://www.nikemaxtn.com/) nike (http://www.nikemaxtn.com/)";
$req['any'] = $req['title'] ."\n". $req['body'];

// fetch the list of tests
$tests = sb_parse_config();
// run each test
foreach($tests as $test) {
//echo "#TEST ".var_export($test). "<br>";
echo "TEXT ".$req[ $test['field'] ]."<br>";

$test_pass=false;

// regular expression test
if( $test['type'] == 'regexp' ) {
echo "RGXP ". $test['data'][0]."<br>";
$test_pass = @preg_match($test['data'][0],$req[ $test['field'] ]);
echo "RSLT [".$test_pass."]<br><br>";
//echo $req[ $test['field'] ] ." ". $test_pass. "<br>";
}

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

return $hits;
}

sb_test();

?>


It looks messy, I apologize for that; PHP is simply not my cup of tea...

gr8dude
01-18-2010, 08:06 AM
Seeing that there is no activity on this front, I attached my version of SpamBuster, with the change applied to it.

Note that the rules were changed, and that if you install it above the existing version you will have to manually update the rules via the administration panel.

I've been testing it since the time of the last message in this thread and it works as expected, no side effects were revealed.

gr8dude
03-11-2010, 06:43 AM
I have an additional question about this plugin - after applying the change I described above, everything works fine, but the problem is that I get a lot of notifications from SpamBuster.

A lot of threads are created on the forum, and even though they are not public, it is still a lot of work to sift through the email reports and delete the bad threads.

It will be much better if I could set another parameter, a threshold which, if reached, will tell SpamBuster to immediately delete the post, without notifying me and without asking questions.

Can someone implement that, or at least tell me where I should start digging in order to figure out how to add this feature?