Dragons Hobbies Forum

General Category => General Discussions => Topic started by: Dragon on December 28, 2021, 15:32:17

Title: Stop Forum Spam
Post by: Dragon on December 28, 2021, 15:32:17
Using the add-ons for StopForumSpam are nice, but it still leaves a lot of manual management of the flagged accounts. For anyone else using the same thing, here's a string of SQL queries that will help find and remove a majority of the ones that I've found to be the biggest problem. Although StopForumSpam flags users based names alone, I've found that can lead to falsely flagging valid users, simply based on common usernames. Managing members awaiting approval should be manageable after running this. 

Code: [Select]
select * from smf_members where is_spammer > 4 and id_member > 1;
#delete from smf_members where is_spammer > 4 and id_member > 1;
SET @BADIP = 1, @BADUSERNAME = 2, @BADUSERNAMEANDIP = 3, @BADEMAIL = 4;
SET @BADEMAILANDIP = 5, @BADEMAILANDUSERNAME = 6, @BADEMAILANDUSERNAMEANDIP = 7;
#delete from smf_members where is_spammer IN (@BADIP, @BADUSERNAMEANDIP, @BADEMAIL) and id_member > 1;
SELECT is_spammer, id_member, member_name, email_address, member_ip
FROM smf_members where is_spammer = @BADUSERNAME;
SELECT is_spammer, id_member, member_name, email_address, member_ip
FROM smf_members where is_spammer IN (@BADIP, @BADUSERNAMEANDIP, @BADEMAIL);
SELECT is_spammer, id_member, member_name, email_address, member_ip FROM smf_members where is_spammer > 4;

Delete lines are commented out in case it's the first time running it. Run those when you've verified that you've found the right records to remove.
Title: Re: Stop Forum Spam
Post by: Dragon on February 22, 2023, 23:02:53
Aren't you curious? https://www.dragonshobbies.com/test.php

(The link above is just to give the spam bots something to do that is actually helpful here. No cron job necessary - just randomly running the cleanup task.)