[REQ] Anti-Bot Plugin [SPOUT?] [ReCaptcha to enter server]

Discussion in 'Archived: Plugin Requests' started by MiRROW, Oct 28, 2011.

  1. I'm good at pissing off hackers and griefteams it seems. I'm getting a lot of attacks.
    They know they can't spam or hack anymore. But now someone is trying to just camp with a lot of bots in spawn.



    [​IMG]

    I was thinking about a plugin in which you'll have to enter a randomized word before you can enter the server.

    Opinions?
     
  2. Offline

    WhiteDragon

    Truthfully I would HIGHLY suggest a whitlist like PreKick.
     
  3. Thanks for replying, but that's totally against what our server stands for (jump in and play do what you want without rules).

    I know it's possible with Spout, so I hope a dev can make this request come true. I think tons of serverowners who had attacks like this would love it.
     
  4. Offline

    WhiteDragon

    Well if they aren't really moving around you could try using and AFK kicker like THIS. If your server is full and someone is trying to get on it kicks one of the afkers.
     
  5. Problem is they aren't afk. they're spambots and they 'try' to spam everysecond. That resets their afktimer the whole time. They get banned though, but they keep coming. +6mb banlog of simple text :)
     
  6. Offline

    acuddlyheadcrab

    This is a good idea. For a temporary option you could try a password pluging like xAuth...

    But anyways i'm trying to see if this is possible.
     
  7. Offline

    spywhere

    So, short for easy... You want some captcha or answer some random questions right?

    PS. I don't know much about SpoutCraft... I only make plugin for normal CraftBukkit server D:
     
  8. yup
    Like: 8-4+1= x or what is the fourth letter of president.
     
  9. Offline

    spywhere

    Let's me try that... if I can...

    PS. I'll post the .zip file contain both source and plugin itself if I could do that...
    PS2. And again... Just for CraftBukkit only (need someone convert to SpoutCraft plugin)
    PS3. This plugin (and/or source) you and/or someone can use freely. I don't upload to BukkitDev for sure.

    Here you are...

    It will randomly generate 2 number (0-9) with 2 operation (plus or minus)...
    User will be kicked if answer is invalid for 3 times...
    User cannot move until answer the question correctly...
    Not enter / while answer the question (command still can use)
    Type "new" to request new question

    PS. Test with CB RB#1337
    PS2. You need to improve this version much more secure for use in real server...
     

    Attached Files:

    Last edited by a moderator: Jun 19, 2016
    MiRROW likes this.
  10. Offline

    Turtlicious

    Could it auto kick on a timer?
     
  11. Thanks man, checking it out.
     
  12. Offline

    spywhere

    Nope... You need to make more time detection later

    Code:
    public void onPlayerJoin(PlayerJoinEvent event){
       joinTime = getCurrentTime();
    }
    
    public void onPlayerMove(PlayerMoveEvent event){
       if(joinTime-currentTime>5min){
          kick();
       }
    }
    Just like this... (Code are fake :p but the idea can be use)
     
  13. Offline

    acuddlyheadcrab


    Why not use the Scheduler :)? You could notify a separate class when someone logs on and if they don't pass the questions in time, notify a method in the main class to kick them. I think! Idk.

    Notifiers are part of a long - but slowly shortening - list of things i need to learn about java
     
  14. Offline

    spywhere

    At first I thinking of that... but I don't know if Scheduler would take how much resources from the server... I use the Scheduler only 1/plugin by let's it start looping and check each conditions and do their jobs... BTW Scheduler can be use for these events for better time detection and another better time-based events too because the code as I posted above need a player to move a little bit to check the condition... So, It may cause of player don't be kicked due to they not moving... So, thanks for advices :)

    PS. I'm just new plugin developer. If anything wrong, I'm sorry for that :(
     
  15. Offline

    ZNickq

    Schedulers don't take memory, ever. Especially the delayed ones!
     
  16. Offline

    spywhere

    Thanks for these new knowledge... I'm using Schedulers on my new plugin now :D
     
  17. It works man :)

    Suggestion: giving the question a colour, the white text is gone soonwhen 40+ people are talking.
    The best would be to let the text appear on your screen instead of the chatbox imo.
     
  18. Offline

    spywhere

    You just add ChatColor.COLOR_YOU_WANT before the messages in the source file then recompile it...
    BTW If I have a free time may be I'd make this plugin more functionallity... but it's seem to take a while ;)
    PS. From now, I'm currently writing my 2 plugins at same time so almost of my free time are took by these.
     
  19. Hah okay, apply for the Dev title :)
     
  20. Offline

    sharethink

    I'm looking for new ways to apply the new Turing test technology we created as a replacement for CAPTCHAs on websites. (http://www.vouchsafe.com) This looks like an interesting area. I wonder how pervasive the issue of bots in games are, and is a Turing test alone going to be enough help - eg: we can secure the spawn to prevent a situation like the one pictured here, but would this be any use against farmer bots and that sort of thing. Anything deeper in the gameplay cycle, and it would be too intrusive.

    If anyone has any thoughts on this, I would love to hear them. If anyone thinks they have a product idea, go to the VouchSafe or ShareThink websites, and as for Chris through the general contact form mailbox. The message will get to me. I'm really intrigued by this idea.
     
  21. Offline

    Technius

    If you want the captcha to be displayed the whole time, why not just remove the bot from the list of people who receives the message?

    Code:Java
    1.  
    2. List<Player> notReg = new ArrayList<Player>();
    3. public void onPlayerJoin(PlayerJoinEvent event)
    4. {
    5. notReg.add(event.getPlayer)
    6. }
    7. public void onPlayerQuit(PlayerQuitEvent event)
    8. {
    9. if(notReg.contains(event.getPlayer)) notReg.remove(event.getPlayer());
    10. }
    11. public void onPlayerChat(PlayerChatEvent event)
    12. {
    13. for(Player p:plugin.getServer().getOnlinePlayers())
    14. {
    15. if(notReg.contains(p))event.getRecipients().remove(p);
    16. }
    17. }
    18.  
     

Share This Page