Results 1 to 3 of 3

Thread: Deleted Spambots

  1. #1
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts

    Deleted Spambots

    Hey all,

    I've just deleted like half of the bots from the user database. The query is quite simple, but seems like it got only bots:

    Code:
    delete from user where posts = 0 and LENGTH(homepage) > 0
    I've looked through the whole data set with HeidiSQL, but with 3430 rows, I might have also deleted a "real" account. Nonetheless, it would be a zero poster, not a big loss.

    For later analysis, I saved all the deleted accounts as .sql and .html, so anybody who feels for a little bot detection algorithm, have fun. ^^ I can use that then to delete the bots with no homepage set, but based on the same subnet or email substrings e.g.

    There are still like 3000 other accounts, which might be bots. I don't know yet why http://www.stopforumspam.com/ didn't detect all those bots, gotta lookup that issue later.

    In register.php I have this:

    PHP Code:
        $spamcheck file_get_contents("http://www.stopforumspam.com/api?ip=$ip");
        if (
    strpos($spamcheck"yes"))
            die(); 
    Some example queries I figured:

    Code:
    select userid, username, homepage, email, posts, ipaddress   from user where posts = 0 and email like "%mini.reopenetic.com%"
    delete from user where ipaddress LIKE "%104.128.138%"
    Attached Files Attached Files
    timescale 0.01

  2. The Following 2 Users Say Thank You to kung foo man For This Useful Post:

    serthy (21st July 2015),Tally (21st July 2015)

  3. #2
    Assadministrator IzNoGoD's Avatar
    Join Date
    Aug 2012
    Posts
    1,718
    Thanks
    17
    Thanked 1,068 Times in 674 Posts
    Please dont use the % in front of that ip. Would delete legit users at xxx.104.128.138 too
    "Does not work" is an error report for a bug between keyboard and chair.

    All hail Artie Effem

  4. The Following User Says Thank You to IzNoGoD For This Useful Post:

    php (21st July 2015)

  5. #3
    Assadministrator kung foo man's Avatar
    Join Date
    Jun 2012
    Location
    trailerpark
    Posts
    2,011
    Thanks
    2,102
    Thanked 1,084 Times in 753 Posts
    No fear, before I delete stuff I first do "SELECT *" of it to check the result ;P
    timescale 0.01

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •