Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Aiheen aloitti: teresa_anawim - elokuu 31, 2011, 03:27:49 IP

Otsikko: Deleting Spam
Kirjoitti: teresa_anawim - elokuu 31, 2011, 03:27:49 IP
A scream for HELP!
I have finally succeeded in stopping(I think) a Canadian meds spambot in that no more messages are coming in.
Question:  Is there a way to delete ALL of the posts throughout the entire forum by the username w/o having to click and remove each one singly?  There are over 1640 of them since the weekend!
Otsikko: Re: Deleting Spam
Kirjoitti: ziycon - elokuu 31, 2011, 04:00:41 IP
**Always do a full backup before doing any database work.

Also welcome to the forum. :)

The below query should remove all the messages for a specific user, just replace <membername> with the users name.

EDIT: heres the one for SMF 1.x now, just wanted to check it.

SMF1
DELETE * FROM <prefix>_messages WHERE ID_MEMBER=(SELECT ID_MEMBER FROM <prefix>_members WHERE memberName='<membername>' LIMIT 1);

SMF 2
DELETE * FROM <prefix>_messages WHERE id_member=(SELECT id_member FROM <prefix>_members WHERE member_name='<membername>' LIMIT 1);
Otsikko: Re: Deleting Spam
Kirjoitti: teresa_anawim - elokuu 31, 2011, 04:16:04 IP
Thanks for the code.  Now, pardon my ignorance, but...WHERE DO I PASTE THE CODE?
Otsikko: Re: Deleting Spam
Kirjoitti: Illori - elokuu 31, 2011, 04:19:45 IP
sql tab of phpmyadmin
Otsikko: Re: Deleting Spam
Kirjoitti: ziycon - elokuu 31, 2011, 04:23:03 IP
You will need to log into your hosting and open phpmyadmin, select your SMF database on the left and the click on the 'SQL' tab at the top of the right pane on the screen, and then paste the code in and run it. If that fails , email your host nicely and ask them to run it.

As I said before, make sure you take a full backup of your database before running the query, just in case. ;)
Otsikko: Re: Deleting Spam
Kirjoitti: OrcaSoul - syyskuu 01, 2011, 01:06:20 AP
I've also had a massive influx of spam - almost 10,000 since May!

I disabled posting in June, and finally disabled registering last weekend.

And I will be upgrading to SMF 2 this week.

Once I do the update to SMF 2 is there a query that I can use to remove all of the "new users" that registered on or after May 1, 2011?

Also, are there anti-spam security add-ons that I should install as soon as I upgrade?
Otsikko: Re: Deleting Spam
Kirjoitti: Oldiesmann - syyskuu 01, 2011, 01:42:53 AP
The best spam-prevention tool I've found is the anti-spam links mod. That's what we use here to prevent new users from posting links. I've also set my forum to disallow profile and signature edits for new users to prevent the spammers who like to plaster their junk in their profiles from being able to do so.
Otsikko: Re: Deleting Spam
Kirjoitti: OrcaSoul - syyskuu 01, 2011, 01:57:42 AP
OK, thanks - I'll check that out tomorrow.

I just ran the upgrade on GoDaddy, following the instructions at http://wiki.simplemachines.org/smf/Upgrading#Download_the_Upgrade_Archive (http://wiki.simplemachines.org/smf/Upgrading#Download_the_Upgrade_Archive) - it was stunningly easy to do, i wish I had done this earlier but all I saw then were a long list of steps I had to do manually...this made it run like clockwork - took just over 6 min!

I'll look at the mods before I open up the forum again.
Otsikko: Re: Deleting Spam
Kirjoitti: starshinda - syyskuu 01, 2011, 11:47:43 AP
so i deleted myself as administrator when deleting spam member accounts. am i going to have to reinstall the forum in order to become admin again?
Otsikko: Re: Deleting Spam
Kirjoitti: Illori - syyskuu 01, 2011, 11:48:50 AP
I accidentally deleted my admin account. Now what do I do? (http://wiki.simplemachines.org/smf/I_accidentally_lost_my_admin_account!_What_can_I_do)

and next time please open a separate thread for your issue.