PDA

Voir la version complète : Bloquer les Spammeur - htaccess


Vincent
25/03/2008, 23h25
Bonsoir

Pour ceux qui sont souvent emmerdés par ce type de spam, voici quelques parades qui fonctionnent (testé à l'instant sur Mr Valium) :

.htacces :
RewriteEngine on
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*(-|.)poker(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*(-|.)casino(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*(-|.)sex(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*(-|.)ringtones(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*(-|.)viagra(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?.*(-|.)prohosting(-|.).*$ [OR]
RewriteCond %{HTTP_REFERER} ^http://(www\.)?valium-online.us.tf.*$ [NC]
RewriteRule \.*$ http://spam.abuse.net/ [R,L]
Ca renvoie tous les boulays vers spam.abuse.net .. (a vous de changer pour have fun ;) )

Et si le .htaccess vous est inaccessible, en php, ca peut donner ce genre de choses :

http://frenchfragfactory.net/ozh/archives/2005/02/05/no-refer-spam/

De mon côté, je viens de mettre le .htaccess en place, ca marche nickel ;)

Pour tester et ceux qui ont un dédié ou un shell, vous pouvez vous auto-spammer votre site en faisant un :

telnet www.taggle.org 80
Trying 149.105.214.158...
Connected to ns2514.toto.net.
Escape character is '^]'.
GET /index.php HTTP/1.1 (appuyer sur entrée)
Host: www.taggle.org (appuyer sur entrée)
Referer: http://www.spam--valium--viagra--sex-casino--referer.com (appuyer sur entrée 2 fois cette fois.)
Et vous verrez le résultats de la redirection ;)

Mise à jour :

#spam referrer
RewriteCond %{HTTP_REFERER} !^http://www.google.*$ [NC]
# mettre le nom de votre site ... par exemple pour éviter les blocage sur les recherches internes
RewriteCond %{HTTP_REFERER} !^http://www.votresite.*$ [NC]
RewriteCond %{HTTP_REFERER} ^.*(islotmachineonline|blackhistoryquiz|webkn|debl ackjack|worldfq|groupfg|infoxz|arefinancing|canref inance|amorgagesonline|freewebs|webqw|infooq|group yt|worlduu|betterbn|betterwq|mesothelioma-asbestosis|worldll|adietproducts|infoui|betterdx|i nfoxd|webqk|bettermk|webbv|worldya|worldvb|betterf c|grouphb|weblj|groupxq|infoyh|kwiz|1click-sport|happyjacksoftware|slots|meblackjack|anslots| asblackjack|asslots|1koolcat|1ktvuk|1stcbank|1stma gi|1stmagi|9k\.com|aahbears|abismael|absinthebri|a dipex|aginghomeservice|ahdb|alcdrugprogdesign|alec streehouse|antiquefactory|antiques|anyboard|appeti te|arch21|auto|beach-views|best-deals-online-pills|bethelspringfield|bettercomputersvcsinc|bett ing|betting-football|buy-2005|byynonline|byynonline|capillarychromatogr|car eer|carluncover|carmda|carmelgrp|carmelgrp|carolno wicki|cartonfreek|ccasino|ccassinos|ccazino|ccazin os|ckasino|craps|credit-card|creditcards|debt|doctor|domains|express-card|fleetairarmarchive|funchain|headspill|hold|ho ld-em|hotel|hotels|iepills|insurance|insurance-online|interest|lbcarroll|loan|matmice|matmice|med ical-4you|mortgage|newhomesflorida|nsucar|nychesskids|o nlinevi|onlinevi|payday|penelopeschenk|pharmacy|ph entermine|phentermine|phentermineonline|phentermin eonlinea|phentermineonlinet|pill|pillsofdesire|pok er|prepaid-card|propecia|pxbonline|pxbonline|rcassino|rington es|roulette|sex|sports-wagering|texas|tx241|ultimate-bet|xmlweekly|yourlipstickhome|zwitech|phentermine |pyrokar|diazepam|viagra|tramadol|adipex|levitra|x anax).*$ [NC]
RewriteRule ^.*$ - [F,L]

Malaiac
26/03/2008, 07h08
pour mise à jour
#spam referrer
RewriteCond %{HTTP_REFERER} !^http://www.google.*$ [NC]
RewriteCond %{HTTP_REFERER} ^.*(thecyberroulette|xzcasino|myonlinebaccarat|ooo authors|casinolc|uky|freewebs|webqk|groupij|infoyh |betterdx|infoui|webqk|infoxd|the-bmx-video|xzcasino|casinoqz|casinozc|casinoot|dcasinoq |kenogo|onlinekenoo|freeinternetvideocasino|dfcasi no|dcasinoa|casinooc|mybaccaratonline|the-baccarat-680|the-baccarat-2134|the-baccarat-4|the-baccarat-760|groupij|islotmachineonline|blackhistoryquiz|we bkn|deblackjack|worldfq|groupfg|infoxz|arefinancin g|canrefinance|amorgagesonline|freewebs|webqw|info oq|groupyt|worlduu|betterbn|betterwq|mesothelioma-asbestosis|worldll|adietproducts|infoui|betterdx|i nfoxd|webqk|bettermk|webbv|worldya|worldvb|betterf c|grouphb|weblj|groupxq|infoyh|kwiz|1click-sport|happyjacksoftware|slots|meblackjack|anslots| asblackjack|asslots|1koolcat|1ktvuk|1stcbank|1stma gi|1stmagi|9k\.com|aahbears|abismael|absinthebri|a dipex|aginghomeservice|ahdb|alcdrugprogdesign|alec streehouse|antiquefactory|antiques|anyboard|appeti te|arch21|auto|beach-views|best-deals-online-pills|bethelspringfield|bettercomputersvcsinc|bett ing|betting-football|buy-2005|byynonline|byynonline|capillarychromatogr|car eer|carluncover|carmda|carmelgrp|carmelgrp|carolno wicki|cartonfreek|ccasino|ccassinos|ccazino|ccazin os|ckasino|craps|credit-card|creditcards|debt|doctor|domains|express-card|fleetairarmarchive|funchain|headspill|hold|ho ld-em|hotel|hotels|iepills|insurance|insurance-online|interest|lbcarroll|loan|matmice|matmice|med ical-4you|mortgage|newhomesflorida|nsucar|nychesskids|o nlinevi|onlinevi|payday|penelopeschenk|pharmacy|ph entermine|phentermine|phentermineonline|phentermin eonlinea|phentermineonlinet|pill|pillsofdesire|pre paid-card|propecia|pxbonline|pxbonline|rcassino|rington es|roulette|sex|sports-wagering|texas|tx241|ultimate-bet|xmlweekly|yourlipstickhome|zwitech|phentermine |pyrokar|diazepam|viagra|tramadol|adipex|levitra|x anax).*$ [NC]
RewriteRule ^.*$ - [F,L]

# scraping
RewriteCond %{HTTP_USER_AGENT} ^.*(PycURL|HTTPRetriever|CherryPickerSE|CherryPick erElite|EmailCollector|EmailSiphon|EmailWolf|Extra ctorPro|HTMLParser|Nutscrape|ZIBB|libwww|Alexibot| asterias|BackDoorBot|Black.Hole|BlackWidow|BlowFis h|BotALot|BuiltBotTough|Bullseye|BunnySlippers|Ceg bfeieh|CheeseBot|CherryPicker|ChinaClaw|CopyRightC heck|cosmos|Crescent|Custo|DISCo|DittoSpyder|Downl oad\ Demon|eCatch|EirGrabber|EmailCollector|EmailSiphon |EmailWolf|EroCrawler|Express\ WebPictures|ExtractorPro|EyeNetIE|FlashGet|Foobot| FrontPage|GetRight|GetWeb!|Go-Ahead-Got-It|Go!Zilla|GrabNet|Grafula|Harvest|hloader|HMView |httplib|HTTrack|humanlinks|Image\ Stripper|Image\ Sucker|Indy\ Library|InfoNaviRobot|InterGET|Internet\ Ninja|JennyBot|JetCar|JOC\ Web\ Spider|Kenjin.Spider|Keyword.Density|larbin|LeechF TP|LexiBot|libWeb/clsHTTP|LinkextractorPro|LinkScan/8.1a.Unix|LinkWalker|lwp-trivial|Mass\ Downloader|Mata.Hari|Microsoft.URL|MIDown\ tool|MIIxpc|Mister.PiX|Mister\ PiX|moget|Mozilla/2|Mozilla/3.Mozilla/2.01|Mozilla.*NEWT|Navroad|NearSite|NetAnts|NetMec hanic|NetSpider|Net\ Vampire|NetZIP|NICErsPRO|NPBot|Octopus|Offline.Exp lorer|Offline\ Explorer|Offline\ Navigator|Openfind|PageGrabber|Papa\ Foto|pavuk|pcBrowser|ProPowerBot/2.14|ProWebWalker|ProWebWalker|QueryN.Metasearch|R eGet|RepoMonkey|RMA|SiteSnagger|SlySearch|SmartDow nload|SpankBot|spanner|SuperBot|SuperHTTP|Surfbot| suzuran|Szukacz/1.4|tAkeOut|Teleport|Teleport\ Pro|Telesoft|The.Intraformant|TheNomad|TightTwatBo t|Titan|toCrawl/UrlDispatcher|toCrawl/UrlDispatcher|True_Robot|turingos|TurnitinBot/1.5|URLy.Warning|VCI|VoidEYE|WebAuto|WebBandit|Web Copier|WebEMailExtrac.*|WebEnhancer|WebFetch|WebGo \ IS|Web.Image.Collector|Web\ Image\ Collector|WebLeacher|WebmasterWorldForumBot|WebRea per|WebSauger|Website\ eXtractor|Website.Quester|Website\ Quester|Webster.Pro|WebStripper|Web\ Sucker|WebWhacker|WebZip|Widow|[Ww]eb[Bb]andit|WWW-Collector-E|WWWOFFLE|Xaldon\ WebSpider|Xenu's|Zeus).*$ [NC]
RewriteRule ^.*$ - [F,L]