#1
  1. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154

    Speed Problem...


    Im having a problem with how fast my program runs. I'm having my bot send a message to ban the username whos message contains % (just for testing). Then, I take a floodbot (its just a bot that spams 4 messages, and disconnects before it can get banned), and I spam the line %%%%%%%%%%%%%%%%%, 4 times. While this happens, my bot sends the message to ban that user, 4 different times, I know its trying to ban the correct user, but the floodbot seems to be too fast for Python. These floodbots are only created in VB6, I would think Python would be fast enough to stop them with ease. Is there a way to ban them?

    Update:I recorded the time in which this particular floodbot took to do its job. Heres is what another bot received.
    Code:
     [16:46:49.229] -- LoaderU [0ms] has joined the channel using Starcraft Brood War (0 wins).
     [16:46:49.310] <LoaderU> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     [16:46:49.460] <LoaderU> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     [16:46:49.480] <LoaderU> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     [16:46:49.510] <LoaderU> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     [16:46:49.530] -- LoaderU has left the channel.
    Now all you need to look at are the milliseconds, it was under 1 second, and the milliseconds were about 300ms apart. Is there a way to out speed that?

    Conclusion:I think that battle.net may be too slow to handle floodbots and then a message that wants to ban them while they are stil spamming.
  2. #2
  3. Hello World :)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2003
    Location
    Hull, UK
    Posts
    2,537
    Rep Power
    69
    This could also have something to do with network speeds; assuming that your not running this on a local test server .

    If you think about it what's actually happening its easier to understand: your bot is sitting around waiting for something to happen when it gets the message from the server (battle.net). After looking through the message thinks to itself "Time to go to work!". It then goes about actually doing that work; sending a message back though the network to ban our spam bot.

    The end result is the bot being late for work, much to its annoyance of the employer; in this case yourself.

    On the other hand, the bot doing the spamming simply needs to connect, send some messages then close the door before anything have a chance to hit it .

    Neither cases takes into account the work the server has to do to preform each action. But I think it's likely that it takes more time to ban the user and boot 'em than to display a message.

    How does the VB implementation of your bot handle the task anyway?

    Take care!

    Mark.
    programming language development: www.netytan.com Hula

  4. #3
  5. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    I'm not sure what the VB implementation is for the floodbot, this particular but isn't mine and I do not have its source codes. However, I do have the source codes for many other popular (a little bit older by now) floodbots, I noticed that almost all of them used API (I think its API) calls like SendWinProcess or whatever it's called. But thanks for explaining everything so well, I understand how hard it would be to complete a job in time without knowing when to do it. Also, with my bot I just had it read if the specified message was in whatever I received from battle.net, this message was %, if % was in the message, I would ban the user, no more code than that. I'm not even sure if there will be a way to ban them now. Except for when a floodbot connects through proxies, many times that slows them down and they are bannable, but with just a normal IP address, they are far too fast.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Feb 2004
    Location
    London, England
    Posts
    1,585
    Rep Power
    1373
    Do the VB programs work as you expect in the same situation?

    You do not show the timings for the Python response. The fact that the users are not successfully banned my have nothing to do with the python client, since I doubt that the banning is instantaneous once you send the 'ban' message. It has to be travel across the network, be received by the server, interpreted and added to some sort of database of banned users. I doubt that this all happens within a couple of hundred milliseconds.

    Dave - The Developers' Coach
  8. #5
  9. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    That's probably why I can't ban them. All they need to do is connect, spam, disconnect. During the time they do this, I need to send a ban message but their spamming happens so fast that there's absolutely no way to stop them in time. Even though the floodbot spammed 4 messages in 400-600ms, and my bot send it in 180ms.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2004
    Posts
    461
    Rep Power
    25
    I think your best bet to be bale to ban them is to scan each message before it is proccessed and sent to other clients on the server. The message needs to be attached to the clients ip and baned before it ever gets sent. I am not sure how possible this is for your situation but that is the most eff way of handling the spamers.
  12. #7
  13. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154
    Ya, that's probably the only way I can do it, the only problem is, how would I scan those messages that are being sent to battle.net before battle.net sends them?
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2003
    Posts
    186
    Rep Power
    0
    its a relay-- you cant. unless you work for battle.net and you can drop that shiz on the irc server hosting the chat. or you can get on there physical wire install latest version of snort sniff the unencrypted chat messsage scan for the desired data and block them on the way in. basically since its a relay you have to wait till they send... by wich time its too late.

IMN logo majestic logo threadwatch logo seochat tools logo