Problems with SPAM? Read this!

Dr. GBooky is here to help you with your guestbook problems ...
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Problems with SPAM? Read this!

Post by Klemen »


Update on 29th March 2016
: a guide to improving guestbook SPAM protection is here.



FIRST THING TO DO IF YOU HAVE PROBLEMS WITH SPAM IS UPGRADE YOUR GBOOK TO THE LATEST VERSION WHICH CAN BE DOWNLOADED FROM HERE:
http://www.phpjunkyard.com/php-guestbook-script.php


In 15 days since the 1.5 came out over 2500 IP addresses automatically banned from the demo guestbook and 0 spam messages came through :D


Any suggestion to fight SPAM are very welcome, feel free to post!

Regards,
Last edited by Klemen on Sat Feb 17, 2007 11:01 pm, edited 2 times in total.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Junefly
Posts: 20
Joined: Mon Jan 16, 2006 7:33 pm

Post by Junefly »

I have put in your test version of the spam GBook.php.. I have very little spam in Gbook, but will let you know when and if I get some..

Most of what I have gotten there so far was the jane@hotmail.com and then yesterday the antony@gmail.com. Those 2 are using some kind of bot, but the logs don't show me what kind, but then I am not real good at reading logs. Fruitbeards fix seems to have halted them for now.
Junefly
http://www.rampbbs.net
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

That fix works (ban e-mails), but blocking by e-mail is not the way to go in the long term in my opinion as when they figure out they are blocked by e-mail they can very simply generate unlimited fake e-mails like "asfjkychqk2@uisdzg.com"
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
FruitBeard
Posts: 38
Joined: Thu Jul 21, 2005 6:25 pm

Post by FruitBeard »

Hi there,

The scurge of spam has certainly stirred up a Hornets nest.

You can also do an array of words set against the url field.

by doing exactly the same method as the email ban (obviously assigning each variable a different name).

I DO NOT GET any postings with the word viagra in the url.

I,m sure adding the odd word to this array wont do too much harm.

Im kind of sure these bots look for words such as guestbook or gbook, maybe naming it differently might help too.

Merely suggestions.

i can print some code to do the url word filter,if requested, but it is very much the same as the email filter.

Reegards, Fruity
FruitFully yours

http://www.fgps.com/keith/
FruitBeard
Posts: 38
Joined: Thu Jul 21, 2005 6:25 pm

Post by FruitBeard »

Infact heres the code, if you wish to implement it.

find inside gbook.php, this code:

line 57 with gbook 1.35
printTopHTML();
place beneath it, this code:
$WRONGWORD=($_REQUEST['url']);
$CHECKBANWORD =1;
foreach ($settings['CHECKWORD'] as $BANWORD)
{if (preg_match("/$BANWORD/i",$WRONGWORD))
{$CHECKBANWORD=0; break; } }
if (!$CHECKBANWORD)
{problem(' You cannot sign this guestbook !!! ');}
now in your settings.php, place this code somewhere:
$settings['CHECKWORD'] = array(
'viagra',
'viagara',

);
kind of like the bad language filter, but it prevents it from being signed as opposed to swapping it with s**t etc etc

I'm sure the culprits will also bypass this too, but i think it helps tremendously.

Reegards Fruity
FruitFully yours

http://www.fgps.com/keith/
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Hey Fruit,

Thanks for the code. You don't get any SPAM with the word "viagra" in it because the JunkMark filter in the 1.35 version (considering JunkMark settings are in the recommended limits of 60-70) blocks it. Adding another check for "bad words" won't do any harm, but JunkMark should block that by default.

Regards
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Junefly
Posts: 20
Joined: Mon Jan 16, 2006 7:33 pm

Post by Junefly »

Edited by Klemen: Please keep this thread focused on SPAM protection for GBook. You may submit questions about other scripts in the appropriate forums.
Stuart Cato
Posts: 25
Joined: Thu Sep 15, 2005 9:24 pm

gbook spam

Post by Stuart Cato »

I have gbook 1.35 but am also recently getting repeat anthony@gmail messages - I had one also from DE but removed it twice and got no more repeats- Is the answer to put in the test that you have suggested
Klemen ?

Stuart Cato
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Well, give it a try. I know I haven't received a single anthony@gmail spam since I installed the test version. Not sure about the others.

You should also check the e-mail address ban function.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Stuart Cato
Posts: 25
Joined: Thu Sep 15, 2005 9:24 pm

Spam

Post by Stuart Cato »

Thanks Klemen. have put in the modified gbook.php - Should this not work how do I ban a specific email address ? Can't see the function

Stuart
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

Feedback please? Anyone using this test version? What happened to the number of SPAM you get (more/less/the same)?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Stuart Cato
Posts: 25
Joined: Thu Sep 15, 2005 9:24 pm

Test

Post by Stuart Cato »

Haven't received a single one since installing the trial !! Great !!

Stuart Cato
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

Hello Klemen,

I am not using the test version, as a matter of fact I'm using version 1.34. The only time I have received spam was by antony@gmail.com on April 11. I haven't received any spam since. Maybe the Gbook is not online long enough (since Febr. 04, 2006) to be noticed by spammers.

Greetings,
Henrie
Junefly
Posts: 20
Joined: Mon Jan 16, 2006 7:33 pm

Post by Junefly »

Klemen Stirn wrote:Feedback please? Anyone using this test version? What happened to the number of SPAM you get (more/less/the same)?
No spam at all since install of test version.. Lots of log hits where they have tried, but nothing made it through.
Junefly
http://www.rampbbs.net
Post Reply