Home

Overview

Bio

The Past

Gallery

View Guestbook

Sign Guestbook

Chatroom

Forum

Downloads Overview / Important Info

African/Ghanaian Mp3List

Funny Stuff

Surf To Music

Free Mail @dotFAF.com [Login]

Signup

Form Mail

txt  msg

Yahoo! Messenger

godATdotfaf.com

Refresh

Start / Splash Page

Show Me Some Luv

F.A.Q.

Scroll Up

Tuesday, May 18, 2004

Shoutbox-Spam List Manager

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 came up with a solution 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

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.

define("_SPAM_MAN","The URL has been banned.");

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:


include_once ("spam_man_list.php");
if (preg_match ("/$spam_man_list/i", $url)) {
$error = _SPAM_MAN;
}

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.

Comments:

Oscar Added: May 19, 2004 1:14 AM
@ | :// |

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.


rachel Added: May 19, 2004 3:38 AM
@ | :// |

Oscar sent me over here. Superb.. This is much easier then ending php all day. thanks :)


Faf Added: May 20, 2004 9:32 AM
@ | :// |

you're welcome. i'll be working on making the list easiliy updateable so check back


Maggie Added: May 21, 2004 2:39 PM
@ | :// |

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??


Faf Added: May 21, 2004 7:07 PM
@ | :// |

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.


CurtG Added: June 3, 2004 3:04 AM
@ | :// |

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!


anton Added: June 5, 2004 3:52 AM
@ | :// |

hao


Achilles283 Added: June 5, 2004 8:35 AM
@ | :// |

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.


dalilboy Added: June 10, 2004 4:21 PM
@ | :// |

Hey, what happened?? Looks like the crooks found a way around the script. Any updates??


Faf Added: June 10, 2004 6:55 PM
@ | :// |

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.


Bull man Added: August 15, 2005 12:23 PM
@ | :// |

cool
pit_bull629@hotmail.com


Bull man Added: August 15, 2005 12:26 PM
@ | :// |

^^ plz remove my email above I dont know why i put my email there!!!

nice site. _b


TheBlahBrain Added: August 27, 2005 6:18 PM
@ | :// |

I wish i had the scripts that this site did ... Hrm...

http://www.theblahbrain.com Rules


YT Added: September 6, 2005 2:29 PM
@ | :// |

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.


R$ Added: July 11, 2006 8:54 PM
@ | :// |

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?



Comment On This Post:

name:


email:


website url:


comments:


Remember Me

Subscribe to comments on this entry? (Correct address needed above)
Subscribe
Unsubscribe
Type 6193 in the field below to very you're not an automated spam bot. (Note: Your comment will be rejected otherwise)


Enter email address to subscribe/unsubscribe to comments on this post without
having to post a comment (or if you used a false address for commenting):

Email:

Subscribe
Unsubscribe

>> TrackBack URL for this entry:

Trackback Pings Received:

---------------------
---------------------
Trackback Pings Sent -- count (2):

Ghana, Accra, Twi, Akan, Ashanti, Africa, adisco, bleoo, interco, merries,saint mary's, aburi gardens, aburi girls, tarkwa, akyeame, tutu, ex doe, tic-tac,, motown, achimota, waec, presec, nkran, kumasi, kotoka, akosombo, legon, chrimeto, ewit greenwich classical academy, monoux college, kofi, paakofi, kojo, kwame, kwesi, kwabena, kobla, kweku, yaw, esi, akos, adwoa, abena, maame, akua, yaa, afia, dansoman, mpoasei, rosec, West Africa, abugiss, ahisco, amanfoo, prempeh, reggie rockstone, anane, frimpong, tottenham, accraaca, naana, obrafo, makola, nima, kaneshie, AIS, GIS, adisco, circle alele, alele, african mp3, ghanaians online, miss ghana, panafest, pan african festival, ghanians, totobi, kuffour, weygeyhey, rawlings, SSCE, BECE, cape coast, castle, kidjo, meiway, chorkor, kaajaano,sakumono, community, elom fleku, anningful, linda bernard, genevieve amamoo, phillis adavu, fidele amoa, charles essandoh, mutombo, edward aboagye, ateekola, beatrice lokko, kpikpitse, Freeman, alema, halm-addo, ellen, Konuah, Awuletey, halm addo, Tetteh, Dziworshie, old students, ghanaweb, ghanachat, Mfantsipim, Adisadel, Bubuashie, myers, Tesano, wesley girls,nima, Africa Ghana, Accra Ghana, Travel to Ghana, Ghana Tourist Information, African News, Ghana News Agency, Accra Airport, Ghanaian Holiday Accomodation, African Handicrafts, Ghana Cheap Fares, Kumasi Golden Stool, Kakum Canopy Walk, Panafest, Historical Slave Tour, Topography of Ghana, Cape Coast Caslte, Accra Beaches, Kumasi Hotels, Vibrant Street Carnival, Student Tickets, University of Ghana, Legon Campus, Achimota School, Prempeh College, Weygeyhey, African Student Directory, Accra Academy, Presec legon, Ghana College Links, West African Mp3s, Highlife Music Download, Hiplife Mp3s, Bleoo, marian harris osafo aquah