简体   繁体   中英

Which of my WordPress sites using Contact Form 7 plugin is send me spam emails

We host a number of WordPress websites and one of them has started to be used by bots to send spam emails. The emails are send by Contact Form 7 and use a hard coded subject line which we will have set up at some point. Unfortunately the emails are using our own email address as the credentials so we can't tell which contact form on which site is being used to send these emails.

If at all possible I'd prefer to avoid trawling through all the forms, in all our sites to find which one's use the specific Subject Title on the auto-responder.

Can anyone help with with a way I could run a script across all the MySql WordPress databases within phpMyAdmin to search them for the specific email subject title in question, and in so doing I could find the database, and therefore the website that has been compromised?

Many thanks,
Simon


ANSWERED MY OWN QUESTION, SO HERE IT IS IF ANYONE NEEDS IT


I found how to write a query that can be run manually against each database to find a form that uses a specific string in the form's details:

This is for use in phpMyAdmin

Use [database name];

SELECT * FROM wp_postmeta WHERE post_id In (Select id from wp_posts Where post_type= 'wpcf7_contact_form') And meta_value Like '%insert text here%'

Replace the 'insert text here' text with your text in between the % symboles (which must remain)

I found how to write a query that can be run manually against each database to find a form that uses a specific string in the form's details:

This is for use in phpMyAdmin

Use [database name];

SELECT * FROM wp_postmeta WHERE post_id In (Select id from wp_posts Where post_type= 'wpcf7_contact_form') And meta_value Like '%insert text here%'

Replace the 'insert text here' text with your text in between the % symboles (which must remain)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM