boakes.org

Latest Referral Spam Domains

Referral and Comment spam continues unabated, with several new domains this week, and several new machines doing the spamming. Here I present two regularly updated URl’s that list the domains and ip addresses of the machines that are hitting me, and the two scripts that generate them.

This first list shows the 10 most recently discovered referral spam domains that have attempted to get a link from my stats pages: http://boakes.org/referral-spam-domains

This list shows the 10 most recently discovered machines that have sent comment spam me: http://boakes.org/comment-spam-machines

To make the lists easy to use in scripts (e.g. for automatically keeping blacklists up to date) both are in plain text format, with one item per line. The list terminates with a blank line.

If other people would like to use the same script on their WordPress blog then there’s great potential for a federated blacklist – many hands make light work.

Suggestions for scipt improvements are welcomed; and please let me know if you’re using either of them.

Comment Spam Machines

This script will work with any wordpress installation since it uses the standard wordpress comments table. You can copy the script below or download the latest version.

The machines that have most recently spammed this site are:

    require_once('wp-config.php');
    global $wpdb;
    $q="SELECT min(comment_date) as mindate, comment_author_ip FROM wp_comments where comment_approved='spam' group by comment_author_ip order by mindate desc limit 10";
    $lines = $wpdb->get_results( $q );
    foreach ($lines as $line) {
    echo( “” . $line->comment_author_ip . “\r\n”);
    }?>

Referral Spam Domains.

This script is more limited in it’s use (currently) because it pulls it’s data from a table of spam daomains that is maintained by a StatTraq extension. Hopefully with the next relewase of StatTraq this will become more mainstream. You can copy the script below or download the latest version.

The domains that have most recently attempted to gain referrals from this site are:

    require_once('wp-config.php');
    global $wpdb;
    $q="select domain from rjb_spamdomains order by id desc limit 10";
    $lines = $wpdb->get_results( $q );
    foreach ($lines as $line) {
    echo( “
  1. ” . $line->domain . “
  2. “);
    }
    ?>

Current Referral Spam Machines

I’ve not scripted this one separately (contact me if it would be useful) but here’s a list of the machines that have engaged in referral spam of this site during the last 24 hours.

    require_once('wp-config.php');
    global $wpdb;
    $q="select ip_address from wp_stattraq where spam=1 and DATE_SUB(CURDATE(),INTERVAL 1 DAY) < access_time group by ip_address order by line_id desc";
    $lines = $wpdb->get_results( $q );
    foreach ($lines as $line) {
    echo( “
  1. ” . $line->ip_address. “
  2. “);
    }
    ?>