Jump to content

Spammer


dweb

Recommended Posts

Hi

 

Im working if someone can help me.

 

I have a small form on my website which saves the data to a sql database.

 

It seems like someone has been spamming it

 

I need to write a query or script to try and pickup these spam entries, can someone advise me

 

They seem to have used the format

 

{letter} {word} {6digit number} {@ domain}

 

for example

 

e.wood876586@googlemail.com

 

b.david212134@earthlink.net

 

g.roads992126@yahoomail.com

 

I believe these are spams as I have around 15,000 entries in this exact format

 

I have since added something to stop these spammers, but I want to clean up all the old spam entries

 

Thanks very much

 

Dave

Link to comment
Share on other sites

The WHERE clause below should capture what you are looking for.  Use it as the SELECT first to see if it hits everything that you want it to and nothing more, and then you can throw it onto a DELETE.

 

SELECT * FROM `emailtest` WHERE emailaddress REGEXP '[a-z]\.[a-z]+[0-9]{6}@.*'

 

~awjudd

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.