Meta:Spam Blocking

From Perplex City Wiki
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This is most notes for myself. BrianEnigma 18:10, 26 September 2006 (PDT)

Spam Blacklist Plugin

Bad-Behavior Plugin

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.