For the past few months i like many other Shoutbox users have been getting spam shouts on our boxes. The most annoying thing being links ot porn sites being used as the poster's URL.
Oscar of ofhills.com[1] came up with a solution[2] to reject shouts that have urls that are known to be that of shoutbox-spammers. It is really basic and works just like it's supposed but for requiring one to continuously open up the shoutbox.php file to update it.
Here's an optimised version using the same logic.
I'm calling it the Shoutbox Spam List Manager V 0.2 and will post updates here as well.
Changes/New Features:
1. Two files Added; spam_list_man.php (the spam list manager itself) and spam_man_list.php (contains the list of words used to reject shouts)
2. Edit shoutbox.php only once
3. Add new words to the list
4. Rejects words already on the list
5. Uses the shoutbox admin cookie as authorisation
Installation procedure:
1. Grab this zipped file here: shoutbox_spam_list_managerv0.2.zip[3]
2. Extract the two files from the zipped file (update spam_man_list.php with your own list if you've been using Oscar's solution)
3. Upload the two files into the same folder as shoutbox.php
4. CHMOD spam_man_list.php 666 so it can be written to.
5. Open the file "shoutbox_langpack_english.php" in a text editor. On or about line #31, paste in the following definition.
6. Open the file "shoutbox.php" in a text editor. Go to around line # 116, and find this:
if (isFlooding() >= 3) {
$error .= _PROCESS_FLOODING;
}
Add a few spaces after that "if" statement so you can paste in another one. Paste this "if" statement after (below) the one above:
7. Re-upload shoutbox.php and load up spam_list_man.php in your browser.
(NB: You need to be logged in to your shoutbox first to use this)
The code is not clean and i dont think it's fully optimised but ispent about two hours working on it. I'll look to add an option to delte from the list and a feature to update the list using a "central" list in the future.
Author: Oscar
Date/Time: May 19, 2004 1:14 AM
Email: oscar@ofhills.com
URL: http://www.ofhills.com/blog/
Excellent work! I was way too lazy to do this right - and who knew the spammers had limitless url's! (well, we did suspect that ...). Thanks for the great optimization - I can't wait to implement it. Now we need to work on making it harder for the bots, since the url's will peobably still keep coming.
Oscar sent me over here. Superb.. This is much easier then ending php all day. thanks :)
you're welcome. i'll be working on making the list easiliy updateable so check back
I got the following error...
Parse error: parse error in /home/maggie/public_html/shoutbox/shoutbox.php on line 122
Fatal error: Call to undefined function: isvalidcookie() in /home/maggie/public_html/shoutbox/index.php on line 79
Are we supposed to delete Oscar's code as well maybe??
The instructions i gave are to start from a sctratch so you will have to delete some of oscarss code and replace it.
note that some of the changes are the same so there will be no point of redoing them.
Is anyone else having a problem with this?
Because that error seems to be related to the security of the patch.
Hey it worked flawlessly for me. I installed Oscar's code first, then found your mod and installed it. I even included a ref to my css file, and inserted a few class definitions for the <p>'s and <input>. I'm thinking of integrating your code into the existing SB admin section.. it's really a necessity these days. Thanks!
hao
I get the exact same errors as you Maggie and I haven't even installed the Shoutbox Spam List Manager, so I'm fairly certain it is something we are doing wrong with the basic shoutbox installation... I will post back when I figure it out.
Hey, what happened?? Looks like the crooks found a way around the script. Any updates??
the idea behind the manager is that the keywords are updated more often... i havent been updating mine. i looks like it takes them two weeks to register new domains so we'll see.
cool
pit_bull629
@
hotmail.com
^^ plz remove my email above I dont know why i put my email there!!!
nice site. _b
I wish i had the scripts that this site did ... Hrm...
http://www.theblahbrain.com Rules
Thanks for the shoutbox hack. I hope it does the trick. I'm really tired of all the spam these days.
On thing that might also be good is if you could check the posters IP address. Quite a bit of the spam I get on my site comes from set ranges or IP addresses. Blocking those could also be helpful.
Thanks again for the nice solution.
i think i may have screwed something up. i followed this pretty close, yet i get this error when commenting
"No input file specified"
anyone else get this or know what's causing it?
Trackback Pings Received count (0)