• Every comment-spam I have ever received included an email that began with “byob” followed by a seemingly random domain name. The IP was clearly a random proxy, and frankly I got sick of deleting all of the stuff sent to the moderation panel…
    So I hardcoded this. Perhaps it’ll be useful to someone:
    In wp-comments-post.php, find this:
    if ( get_settings('require_name_email') && ('' == $email || '' == $author) )
    die( __('Error: please fill the required fields (name, email).') );

    and add after or before it, this:
    $byob = 'byob';
    $spam_byob = strpos($email, $byob);
    if ( !($spam_byob === FALSE) )
    die( __('Error: Email address flagged as common spam. Comment rejected.') );

    In my short tests to make sure commenting still worked and that the byob emails would be blocked, I received satisfactory results.
    This applies to WordPress 1.2.1 “Mingus,” and it may work for others. I have no idea.

Viewing 11 replies - 1 through 11 (of 11 total)
  • THANK YOU FOR THIS
    I have over 300 posts in my comments waiting right now from this fucker.. THANK YOU!!!

    http://www.tamba2.org.uk/wordpress/spam
    There is stuff there too …..

    Why wouldn’t just adding it to your common spam words sort it all out?
    (ducks under the table)

    Thanks. I’m giving it a try too. I’ll report back in a day or so and let you know how it’s worked out.

    While this hack works I strongly urge against it. There are many very good anti-SPAM tools available that don’t require going into the core code and changing it. No sense in making it that much more difficult when upgrading or re-building your site. Plugins make this task much, much easier and you get to spend your time working on the good stuff, not trying to remember where you had hacks done in which files.
    My $0.02.

    Anonymous User 6434

    (@anonymized-6434)

    Try this drop-in plugin…just stick in the two files and activate…and it’s at least as good as that hardcoded solution, if not a whole lot more generalizable:
    http://elliottback.com/wp/archives/2004/11/29/spam-stopgap-extreme/

    Thread Starter romans1423

    (@romans1423)

    I’ve never developed a plugin for and don’t really need to learn for the time being; that is why it is a hardcoded solution.
    Also, adding “byob” to your spam words list will still force you to have to moderate those comments in time, and I was getting sick of my email getting filled with notifications about them. I’ll look at the plugins eventually.
    I didn’t say the hack above was a perfect solution, but hey, it works. That’s what matters. 🙂

    I get sick of moderating it too. Serious. Dip that dipsh*t in glue and cat feces as well as mr texas hold em and flowers and absinith and all of them.

    why would anyone ‘strongly urge’ against this unless they were a spammer? it’s adding two lines to an existing file, you would have to be a moron for this to break anything. and it saves on moderation, goody goody!

    Why would anoyne urge against this?
    1) Because when you upgrade, your changes get overwritten.
    2) Because if the changes start to purge legitimate comments, you won’t even know it.
    3) Because there are drop-in plugin options that offer additional/superior features.
    4) Because unlike the plugins, this can’t adapt to future spammers unless you maintain it.
    Still, better that you’re doing something to stop the spam.
    Most of the plugins on Podz’s page do what this hack does and only require uploading a file and turning it on in the WP admin.

    Thread Starter romans1423

    (@romans1423)

    I _only_ get spam that includes “byob@” email addresses, whether for some kinda drug or for Texas Hold’em or whatever… All similar emails (the domain is random, but the user is always “byob”).
    I tried a few drop in plugins, and those that I tried still required me to moderate the things…
    And yeah, upgrades will overwrite my change, but it is my change; I’d be an idiot not to keep track of this one simple li’l change. On my phpBB installation, I make a truckload of customizations and still manage to update within 24 hours of new releases.
    If a few lines of changed code is enought to complicate an update, simply don’t make the change.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘byob spam’ is closed to new replies.