Meta:Spam Blocking: Difference between revisions
From Perplex City Wiki
Jump to navigationJump to search
BrianEnigma (talk | contribs) m (→Plugin) |
BrianEnigma (talk | contribs) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
This is most notes for myself. [[User:BrianEnigma|BrianEnigma]] 18:10, 26 September 2006 (PDT) | This is most notes for myself. [[User:BrianEnigma|BrianEnigma]] 18:10, 26 September 2006 (PDT) | ||
==Plugin== | ==Spam Blacklist Plugin== | ||
* Homepage: http://meta.wikimedia.org/wiki/SpamBlacklist_extension | * Homepage: http://meta.wikimedia.org/wiki/SpamBlacklist_extension | ||
* 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]] | * Our own local extension to the blacklist file is at [[Meta:Spam Blacklist]] | ||
==Bad-Behavior Plugin== | |||
* [http://www.bad-behavior.ioerror.us/download/ Bad-Behavior 2] | |||
* [http://www.bad-behavior.ioerror.us/2007/01/26/bad-behavior-on-php-520/#comment-1144 plus database tweak] | |||
* [http://wiki.evernex.com/index.php?title=Bad_Behavior_2_Extended Support for Special:BadBehavior] | |||
* View results at [[Special:BadBehavior]] | |||
==SQL to Block "6 Hex Digit" Spammers== | ==SQL to Block "6 Hex Digit" Spammers== | ||
Line 12: | Line 18: | ||
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 | 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 | ||
ALTERNATIVE: reset their password | |||
cat bad_users.txt | perl -pne 's/(.*)\t.*/update user set user_password="*" where user_id=$1;/' > spammers.sql | |||
Execute the resulting SQL. | Execute the resulting SQL. |
Latest revision as of 00:25, 10 July 2007
This is most notes for myself. BrianEnigma 18:10, 26 September 2006 (PDT)
Spam Blacklist Plugin
- Homepage: http://meta.wikimedia.org/wiki/SpamBlacklist_extension
- 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
Bad-Behavior Plugin
- Bad-Behavior 2
- plus database tweak
- Support for Special:BadBehavior
- View results at Special:BadBehavior
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
ALTERNATIVE: reset their password
cat bad_users.txt | perl -pne 's/(.*)\t.*/update user set user_password="*" where user_id=$1;/' > spammers.sql
Execute the resulting SQL.