Please login or register.

Login with username, password and session length
Advanced search  

News:

You need/want an older version of sNews ? Download an older/unsupported version here.

Author Topic: SPAM prevention (?)  (Read 3809 times)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
SPAM prevention (?)
« on: June 05, 2007, 02:00:10 pm »

Hi, dude's and dudette's

Thinking a lot about them spammer assholes that frequent not only out beloved forum, but also many of our site's and email accounts...

I've come a cross this .htaccess snippet, and would like to ask people on what this does, and if this is safe to use, and how one would possibly extend this to contain more bots:

Code: [Select]
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*NEWT [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Crescent [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^CherryPicker [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^[Ww]eb[Bb]andit [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^WebEMailExtrac.* [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^NICErsPRO [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Telesoft [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Zeus.*Webster [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Microsoft.URL [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Mozilla/3.Mozilla/2.01 [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailCollector

RewriteRule ^.*$ http://REDIRECT TO GAY PORN SITE.com [L,R] -- My own entry ;) redirection for email harvesters...

RewriteCond %{HTTP_USER_AGENT} ^-?$
RewriteRule ^.*$ http://yourdomain/errors/4031.html [L]
this quote was posted alongside with this .htaccess:
Quote
The 2 last lines are for empty User_Agents, that means if the browser agent cannot be recognised (empty) than you also have no acces to the site (goto 4031.html)
People who block the name of their browser will also have no access.
Webwasher among others offers this possibility.
It is a trick several email harvesters use now adays. And the number of visitors with empty user agents are problably less than 0.03%.
I also have a list of email domains that I would like to be able to include in some way, hehe.... Is this even possible ? Will it affect the speed of the site ? Is this correctly formatted ? So on and so on... Questions are many as I don't know first thing about .htaccess coding. Only thing I know is that it's a powerful tool and should be used with care, hence me asking here...

Ideas, suggestions, whatnots ?
Logged
"It's only dead fish that goes with the flow... "
Updated

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6020
  • Semantically Challenged
    • snews.ca
SPAM prevention (?)
« Reply #1 on: June 05, 2007, 02:43:17 pm »

Hey Pat... could you post a link to the source where you got this? That might help (me at least) in checking it out. :)
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
SPAM prevention (?)
« Reply #2 on: June 05, 2007, 02:45:54 pm »

Whuhaaaa... lets see if I have that still in my hidings somewhere... I'll get back to ya, Doug.
Logged
"It's only dead fish that goes with the flow... "
Updated

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
SPAM prevention (?)
« Reply #3 on: June 05, 2007, 02:50:48 pm »

Well, there it could have been in this massive post, but where, oh where, dear god... I can't seem to find it, but that's a good read for anyone with time on their hands :lol:

A Close to perfect .htaccess ban list
Logged
"It's only dead fish that goes with the flow... "
Updated

tarmithius13

  • Sr. Member
  • ****
  • Karma: 7
  • Posts: 469
SPAM prevention (?)
« Reply #4 on: June 05, 2007, 03:35:36 pm »

That forum thread is a few years old, I am also wondering if this .htaccess addition would work on the newest influx of spammers? Can anyone confirm this?
Logged
The trick to flying is to throw yourself at the ground and miss.

Free sNews templates HERE

Mika

  • Hero Member
  • *****
  • Karma: 9
  • Posts: 1377
    • http://www.ni5ni6.com/
SPAM prevention (?)
« Reply #5 on: June 05, 2007, 04:12:39 pm »

This is yet another outdated user agent blacklist - why not try whitelist instead? ;)

Note: HTTP_USER_AGENT is a variable which reveals the designation of the browser currently visiting your site. That's usually FF, IE, Opera, Safari....(and dozen of others!). The principle is as follows - if the user agent is NOT the actual browser, forward the bugger to some nasty place. However, you shouldn't rely upon that info alone because header info could be tampered with.
Logged
http://www.ni5ni6.com/ - Tutorials, Mods and How-To's about sNews CMS
sNews 1.6 Developers Edition - commented sNews 1.6 version

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
SPAM prevention (?)
« Reply #6 on: June 05, 2007, 05:42:33 pm »

Aha... so you're saying -"Stop your bloody thinking, you fecking fat swede. And let us who can, do that" ...basicly :lol:
Logged
"It's only dead fish that goes with the flow... "
Updated

Joost

  • Guest
SPAM prevention (?)
« Reply #7 on: June 05, 2007, 06:17:56 pm »

Quote from: Patric
Aha... so you're saying -"Stop your bloody thinking, you fecking fat swede. And let us who can, do that" ...basicly :lol:
You could make yourself useful by selecting a good site where we can redirect the spammer.:P
I know we can trust you on that.  :lol:
Code: [Select]
RewriteRule ^.*$ http://REDIRECT TO GAY PORN SITE.com [L,R] -- My own entry ;) redirection for email harvesters...
Logged

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
SPAM prevention (?)
« Reply #8 on: June 11, 2007, 08:39:30 am »

I'm getting a lot of "tries" to post comments on my site nowadays, specially from someone who wants me to go to volny plus dot cz... would love to ban this buggerooo....
Logged
"It's only dead fish that goes with the flow... "
Updated