a while ago one of my websites was hacked. suddenly a lot of pages had hidden viagra links in them. Quite annoying! Apart from running all sorts of tools I used a simple database query to check for spam. It can be used for basically anything. On a small site you can find everything easily. But on big sites it can be a drag.
Here’s the code (mysql):
select distinct (post_title), post_modified from wp_posts where post_content like '%search_string%' ORDER BY post_modified DESC;
Log in on your phpmyadmin (or similar) and simply replace the search_string with the text you’re looking for.