• It seems the auto-spammers have hit WP. They use programs like “Link Dump” to directly hit the wp-comments-post.php directly.
    Many of my hosting clients are getting hit with over 3-4000+ pieces of comment spam a day – – including my own blog.
    The moderation for spam is nice, including the filter list – however, when you’re getting that many spam hits in a day – you still get the emails and you still have to go in and delete the comments out of the queue — which is frustrating and timely.
    The trick is to stop them from sending the spam in the first place:
    Change the name of your wp-comments-post.php to something else – – I changed mine to something like: stopspam-post.php.
    Then in your wp-comments.php template — look for this code:
    <form action="<?php echo $siteurl; ?>/wp-comments-post.php" method="post" id="commentform">
    And change the wp-commens-post.php to the file that you renamed it to.
    For example, since I renamed my wp-comments-post.php to stopspam-post.php — that line in the wp-comments.php now looks like this:
    <form action="<?php echo $siteurl; ?>/stopspam-post.php" method="post" id="commentform">
    On a day that I was getting hit with over 4000 spam hits, the very minute I did this – it stopped and they haven’t returned. It doesn’t stop the one time spammer who actually clicks your comments link and manually enters their spam – – but those guys are easier to maintain than these autospammers.

Viewing 15 replies - 31 through 45 (of 91 total)
  • Anonymous

    Mike, any plans on releasing your plugin?

    richardw

    (@richardw)

    The “Hold a comment in the queue if it contains more than x links.” only works if the links begin with “http”
    I’ve dropped that down to 1 but I’m getting spammed by the poker guy with:
    https://www.xxx.com
    https://www.yyy.com
    https://www.zzz.com
    Is there a file somewhere that will allow me to list other forms of urls to check for more than 1 of?
    Also, has anyone in this thread updated to 1.3 and used whatever it has to block spam? Worth the upgrade to solve this problem?

    richardw

    (@richardw)

    I was just in the middle of an attack by the poker guy and asked the above questions about the form of urls and why www alone was getting through.
    I turned off the plugin autohyperlink urls and that seems to have allowed the link number catcher to work. I’m not sure yet but I’m hoping.

    richardw

    (@richardw)

    This did not work but I’m seeing that he’s getting through the pref that if the comment contains more than one url to send it to a que. I set that field to “1” and 2 or more links are getting through.
    is this a bug or is there something I’m doing wrong?

    moshu

    (@moshu)

    Why don’t you try some other ways, too?
    https://www.tamba2.org.uk/wordpress/spam/

    Sushubh

    (@sushubh)

    richardw

    (@richardw)

    Moshu,
    I’ve read that page and will try more of those ways but my question for this thread is this:
    I changed the back end of my site so that comments with more than one url are sent to a moderation que.
    This person/bot is posting 3 urls and getting through.
    Why?
    Either I’m doing something wrong (and this is entirely possible) or this feature, at least on my install is not working.

    lilandra

    (@lilandra)

    i hate the poker guy
    i’m too tired to do anything else but not allow people to discuss poker in my comments.
    *sigh*

    Anonymous

    I just installed it last night, and whenever i make a post i instantly have a post from that joker idiot. any idea how it can be the second i post my thing?

    Anonymous

    i have tried all those, and i have the blacklist thing even on. but whenver i make a post the comment automatically appears, wtf is that and how is it doing it?

    They are already in the database.
    You can do a couple of things:
    – get into the database and delete them
    – keep making test posts until the spams stop appearing.
    Either way, TG’s code stops it from happening again

    Anonymous

    ok ill try but the comment is added as soon as i submit, i dropped all my tables and reinstalled it and its fine now and i set up a blacklist script so lets pray for the best

    churchtown

    (@churchtown)

    I adopted WP for my use a few days ago. Have been seeing quite a bit of p o k e r spam incoming. I think it is being automatically generated. So… how about this for a containment strategy? Will it be any good in the long term?
    SUMMMARY:
    1) in robots.txt disallow the normal wp-comments-post.php
    2) change the name of the actual wp-comments-post.php
    3) allow only REFERERs from my own site
    4) include disable script in (honey trap) wp-comments-post.php
    This strategy immediately disables any IP specifically and inappropriately calling the wp-comments.php file.
    There are no 404s to clean up, each directly (ie automatically) called posting attempt immediately fails, the calling IP is immediately banned, and an optional email is sent flagging, what amounts to, an undesirable intrusion attempt.
    SCRIPT:
    [wp-comments-post.php]
    <?php
    $filename = “/home/e-smith/files/ibays/bb/html/wordpress/.htaccess”;
    $content = “# direct access to wp-comments-post.php\r\nRewriteCond %{REMOTE_ADDR} ^”.str_replace(“.”,”\.”,$_SERVER[“REMOTE_ADDR”]).”$\r\nRewriteRule .* – [G]\r\n\r\n”;
    $handle = fopen($filename, ‘r’);
    $content .= fread($handle,filesize($filename));
    fclose($handle);
    $handle = fopen($filename, ‘w+’);
    fwrite($handle, $content,strlen($content));
    fclose($handle);
    mail(“[email protected]”,
    “comments spam”,
    “comments spammer on IP “.$_SERVER[“REMOTE_ADDR”].”\r\n”.$_SERVER[“HTTP_USER_AGENT”].”\r\n”.$_SERVER[“HTTP_REFERER”]
    ,”FROM: [email protected]”);
    print “bye”;
    ?>
    TODO:
    1) cron event to rename working wp-comments-post.php

    moshu

    (@moshu)

    Hmmm… I am dumb to coding. But: isn’t the code above for the automatically generated spam? Do the robots “right-click”???

Viewing 15 replies - 31 through 45 (of 91 total)
  • The topic ‘Comment Spam’ is closed to new replies.