venerdì 7 ottobre 2011

phpBB 3.0 - Cancellare falsi utenti spammer

Tra le altre cose mi occupo di amministrare un paio di forum. Uno degli aspetti da tenere maggiormente sotto controllo è lo spam, specialmente se vi sono diversi utenti attivi. Nel tempo ho formulato un elenco di domini che ho classificato come SPAM. Questo elenco di oltre 160 domini mi permette di fare periodicamente pulizia nella base dati.


(continua sotto)
promo


Se non si utilizza la moderazione delle iscrizioni è facile che gli spammer riescano a registrarsi anche ingannando controlli tipo captcha . Di seguito pubblico una istruzione SQL per MySql che permette di individuare ed eventualmente cancellare questi utenti indesiderati. Dove ho scritto [prefisso tabella] va inserito l'eventuale prefisso assegnato alle tabelle in fase di istallazione.

(continua sotto) promo


select count(*) from [prefisso tabella]_users where
user_email like '%1gb.info' or
user_email like '%2000lv.com' or
user_email like '%acceptcredit4u.info' or
user_email like '%achlan.cn' or
user_email like '%acquireton.com' or
user_email like '%adof.biz' or
user_email like '%ajrq.info' or
user_email like '%allandsads.cn' or
user_email like '%allandsmovies.cn' or
user_email like '%allcarehome.org' or
user_email like '%allfarm.cn' or
user_email like '%allsexmovie.info' or
user_email like '%amorki.pl' or
user_email like '%asff.info' or
user_email like '%atlaskit.com' or
user_email like '%autogid.org' or
user_email like '%avrilka.net' or
user_email like '%bestcarehome.org' or
user_email like '%bestcarhireforu.biz' or
user_email like '%bestfarmshop.cn' or
user_email like '%bigmir.net' or
user_email like '%bimgir.net' or
user_email like '%bk.ru' or
user_email like '%bljat.info' or
user_email like '%bluebottle.com' or
user_email like '%bonbon.net' or
user_email like '%bulk-actionz.info' or
user_email like '%buy-24h.net.ru' or
user_email like '%buziaczek.pl' or
user_email like '%chineseplugins.org' or
user_email like '%chukcarbo.com' or
user_email like '%clipssite.cn' or
user_email like '%clxub.com' or
user_email like '%cvportal.net' or
user_email like '%dfm.com' or
user_email like '%diet-us.info' or
user_email like '%dkblog.org' or
user_email like '%doge7k.com' or
user_email like '%dorspaceebook.com' or
user_email like '%downloadcrackfreesoftware.com' or
user_email like '%e-nation.ee' or
user_email like '%ebookcomspace.com' or
user_email like '%elfox.net' or
user_email like '%elovejob.info' or
user_email like '%erositaly.org' or
user_email like '%farminlive.cn' or
user_email like '%fda-medications.com' or
user_email like '%fene4ek.net' or
user_email like '%fola.biz' or
user_email like '%forward-privacy.org' or
user_email like '%fvoe.biz' or
user_email like '%gawab.com' or
user_email like '%gerop.cn' or
user_email like '%goak.info' or
user_email like '%goldwarez.org' or
user_email like '%goodnesss.com' or
user_email like '%goolook.ru' or
user_email like '%greatfarm.cn' or
user_email like '%greatwall36.org' or
user_email like '%healthinsurance4u.biz' or
user_email like '%hhwntai.cn' or
user_email like '%hhrntai.cn' or
user_email like '%homeallhome.org' or
user_email like '%homehome.org' or
user_email like '%hotpop.com' or
user_email like '%hotsearchusa.com' or
user_email like '%hyipprogram.org' or
user_email like '%i.ua' or
user_email like '%idbud.info' or
user_email like '%idlyn.info' or
user_email like '%ihan.info' or
user_email like '%inbox.ru' or
user_email like '%inet.ua' or
user_email like '%izmail.net' or
user_email like '%jetfix.ee' or
user_email like '%jrobi.info' or
user_email like '%kdmf-division.info' or
user_email like '%kinozal.tv' or
user_email like '%kqtr.info' or
user_email like '%kremenchug.ws' or
user_email like '%krim.ws' or
user_email like '%kzro.net' or
user_email like '%lipetsk.in' or
user_email like '%list.ru' or
user_email like '%lviv.in' or
user_email like '%lvovs.com' or
user_email like '%macb-download.info' or
user_email like '%mail.by' or
user_email like '%mail.com' or
user_email like '%mail.health-ua.com' or
user_email like '%mail.ru' or
user_email like '%mail.saratov.com' or
user_email like '%mail333.com' or
user_email like '%mainru.com' or
user_email like '%medmail.info' or
user_email like '%moviesandklips.cn' or
user_email like '%mykqtr.info' or
user_email like '%mykqtr.info' or
user_email like '%mymail-in.net' or
user_email like '%mysspaccedorr.com' or
user_email like '%mysspaccedorrr.com' or
user_email like '%mysspaccedorrrr.com' or
user_email like '%mytop-in.net' or
user_email like '%neo-explode.org' or
user_email like '%nightmail.ru' or
user_email like '%o2.pl' or
user_email like '%onet.eu' or
user_email like '%onlinebetter.org' or
user_email like '%online-webportal.biz' or
user_email like '%orkeor.cn' or
user_email like '%penispillsenlargement.co.uk' or
user_email like '%peugeot-club.org' or
user_email like '%phreaker.net' or
user_email like '%playstationcrack.com' or
user_email like '%pmrmail.com' or
user_email like '%pozitifff.com' or
user_email like '%qwoe.biz' or
user_email like '%ramireschat.com' or
user_email like '%refinancce.biz' or
user_email like '%rfbjr.info' or
user_email like '%safebox.ru' or
user_email like '%saginaw-home-buyers-agent.com' or
user_email like '%sdfl.biz' or
user_email like '%sevastopol.in' or
user_email like '%simferopol.krim.ws' or
user_email like '%soccer-league.biz' or
user_email like '%spyslay.com' or
user_email like '%stylebrand.com' or
user_email like '%sweetville.net' or
user_email like '%tenbit.pl' or
user_email like '%terbuny.net' or
user_email like '%thesitelink.biz' or
user_email like '%tlen.pl' or
user_email like '%topmagic.org' or
user_email like '%tyrists.info' or
user_email like '%tut.by' or
user_email like '%ua-news.net' or
user_email like '%ua.fm' or
user_email like '%uaclub.net' or
user_email like '%uastar.net' or
user_email like '%ukr.net' or
user_email like '%ukrmail.org' or
user_email like '%uncaf.cn' or
user_email like '%vilip.info' or
user_email like '%webcivil.org' or
user_email like '%webforpeople.org' or
user_email like '%wels.com' or
user_email like '%wp.pl' or
user_email like '%wpof.biz' or
user_email like '%yalta.krim.ws' or
user_email like '%yandex.ru' or
user_email like '%yardsormeters.info' or
user_email like '%yellow-jackets.com' or
user_email like '%youriloan.com' or
user_email like '%yourkqtr.info' or
user_email like '%zadonsk.net' or
user_email like '%zaraq.cn' or
user_email like '%zelmira.cn' or
user_email like '%zenxengine.cn' or
user_email like '%zeos.net' or
user_email like '%zinsco.cn' or
user_email like '%zirkon.cn' or
user_email like '%zoomers.cn' or
user_email like '%zubba.cn' or
user_email like '%zukav.cn'


Ho volutamente inserito la SELECT COUNT(*)  lasciando ad eventuali utilizzatori il compito di metterci la DELETE.
Spero possa servire a qualcuno.
A me è servita proprio adesso per eliminare circa 500 righe di spazzatura.

Alla prossima!
Se il post ti piace dillo su Facebook
Tieni d'occhio questo post e i suoi commenti: iscriviti nella parte destra del blog.
Per qualsiasi dubbio, critica, segnalazione scrivimi a vm_tempbox-perparlarediweb[at]yahoo.it
Ricevi gratuitamente tutti gli aggiornamenti del blog direttamente dal feed RSS ed in email.
Segui il blog su Twitter e su Facebook.
Istalla la toolbar del blog... è gratis!