Meta:Spam Blocking: Difference between revisions
From Perplex City Wiki
Jump to navigationJump to search
BrianEnigma (talk | contribs) No edit summary |
BrianEnigma (talk | contribs) (→Plugin) |
||
Line 3: | Line 3: | ||
* Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SpamBlacklist/ | * Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SpamBlacklist/ | ||
* The actual regex list: http://meta.wikimedia.org/wiki/Spam_blacklist | * The actual regex list: http://meta.wikimedia.org/wiki/Spam_blacklist | ||
* Our own local extension to the blacklist file is at [[Meta:Spam Blacklist]] | |||
==SQL to Block "6 Hex Digit" Spammers== | ==SQL to Block "6 Hex Digit" Spammers== |
Revision as of 22:21, 16 October 2006
This is most notes for myself. BrianEnigma 18:10, 26 September 2006 (PDT)
Plugin
- Source code: http://svn.wikimedia.org/viewvc/mediawiki/trunk/extensions/SpamBlacklist/
- The actual regex list: http://meta.wikimedia.org/wiki/Spam_blacklist
- Our own local extension to the blacklist file is at Meta:Spam Blacklist
SQL to Block "6 Hex Digit" Spammers
mysql -B -uusername -ppassword -hhost databasename -e 'select user_id,user_name from user where user_name regexp "^[0-9A-Fa-f]{6}$";' > bad_users.txt
TODO for next time: where user_id not already in ipblocks table
cat bad_users.txt | perl -pne 's/(.*)\t(.*)/insert into ipblocks (ipb_address,ipb_user,ipb_by,ipb_reason,ipb_timestamp,ipb_expiry) values ("$2",$1,178,"Automated Spammer","20060926180300","20200101000000");/' > spammers.sql
Execute the resulting SQL.