• Good morning everyone, I’m new to this forum, but I thought I’d share my quick hack to cut down on the amount of blog spam I recieve. It seems that in recent months, blog spam has become an ever increasing problem.
    I’m planning on adding some more functionality to this spam stopper by creating another word press table to log offending IP addresses, and perhaps some additional functionality to put the spam word list, and tollerance level into a database as well.
    any way, here’s the code.
    code
    // Check to see if this comment is being posted by a spamming douche bag.
    $douche_list=”texas,holdem,poker,video,free,cheap,viagra,prescription”;
    $douche_filter=explode(‘,’,$douche_list);
    // Global douche bag filter list.
    $douche_tollerance=2; // douche_tollerance is the number of matches from the douche_list that
    // are allowable before the user get’s redirected to tubgirl ( or whatever site you put in douche_site
    $douche_site=’https://www.tubgirl.com’;
    $douche_count=0; // Start them off at zero (you gotta give them the benefit of the doubt)
    // Check the key portions of the comment against everything in the douche_filter list
    for($i=0;$i<sizeof($douche_filter);$i++)
    {
    if(eregi($douche_filter[$i],$url))
    {
    $douche_count++;
    }
    if(eregi($douche_filter[$i],$comment))
    {
    $douche_count++;
    }
    if(eregi($douche_filter[$i],$author))
    {
    $douche_count++;
    }
    }
    // Check the douche count against acceptable number
    if($douche_count>$douche_tollerance || $douche_count==$douche_tollerance){
    header( “Location: “.$douche_site );
    ob_start();
    print_r($_SERVER);
    $assholes=ob_get_contents();
    ob_end_clean();
    mail(‘j_at_jraleigh.com’,’Blog_Spammer’,$assholes);
    die(‘Fuck off you lame ass douche bag.’);
    }
    // If we’ve made it this far, let’s post.
    /code

Viewing 10 replies - 1 through 10 (of 10 total)
  • u can also try authimage hack
    https://www.google.com/search?hl=en&lr=&safe=off&q=authimage&btnG=Search
    I installed it and haven’t got any spam but it has been a few hrs. onlysince I installed it…

    Anonymous

    Okay….here’s the deal…I got this same spam from this poker site but I dont know enough code to do what U did. Can you help me out a bit more???

    Dravine – thanks for the code.
    I’d point you to Kitten’s work though – you may be duplicating ?
    https://mookitty.co.uk/devblog/category/kittens-spam-words/
    and check her site for the Spaminator too.

    Thread Starter dravine

    (@dravine)

    Sorry, I suppose I didn’t give enough info on how to put this hack into place, just open up wp-comments-post.php, find the line with the // If we’ve made it this far, let’s post. comment, and paste that code in just above that line, that should be about all you need. I hadn’t seen kittens work, and I appreciate you pointing that out to me. I just figured I’d opt for a roll your own fix to it, since I spend my entire day at work writing php code anyway. Well, that and I like being an evil bastard. I know that most of the spammers are using a bot or something, but at least the bot gets subjected to the vulgarity of tubgirl.

    xerocool

    (@xerocool)

    lmao, Nice work dude.

    charle97

    (@charle97)

    there’s also wpblacklist that has similar code.

    Thread Starter dravine

    (@dravine)

    So, I thought I’d share some results with you all . This morning when I checked my email, I had 12 emails notifying me that spam had been stopped. I just did a quick check of comments in que, and not a single one is spam. I didn’t really look at any other alternatives, but once I get my 11Mbit wifi connection to the house from work, I’ll be looking at all the options out there, and then I’ll be incorporating the best aspects of all of them into the ultimate douche stopper. I intend on improving flood protection in it as well. In typical bastard form, I will most certainly be applying the most irritating stuff I can think of into it. I was thinking something along the lines of basically replying to spam requests with 20 or 30 megs or so of /dev/urandom stuff. I’m open to any suggestions. Feel free to email me at the address in the code above if you’ve got an idea. I can also be rached at jraleigh at gmail.com

    charlesarthur

    (@charlesarthur)

    Three objections to this really.
    1) Not a great idea to be hacking the comments file directly; I mean, you can, but it’s not for everyone.
    2) The plugins format is designed to let you use code like this without hacking the comments file – see Kitten’s Spaminator. Really, it works.
    3) Sending arbitrarily large files in “response” to spambots is a really bad idea. First, it’s your bandwidth you’re using – that’s a cost to you. Second, the computer “receiving” it is not going to do much. It’s already Trojanned, so unless you’ve got some remote antivirus in there, you’re simply compounding the problem. Meanwhile the spambot has moved on to the next Trojanned PC, which is meanwhile hitting your site with an attempted comment spam. Far better just to make the bot PC wait for your response, as Kitten’s Spaminator does.
    You’re not the first to be annoyed by comment spam by any means at all. And there are better ways to deal with it.

    Anonymous

    Good game! My blog is spammed too: https://dlblog.freelinuxhost.com/

    allthewhile

    (@allthewhile)

    It would be nice to be able to use the ip address that gives us the spam to “clean” the trojan out of the infected computer sending this spam.
    Sort of like a generous and kind hacking for charity.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Blog spam stopper hack’ is closed to new replies.