diff --git a/Client/gradle.properties b/Client/gradle.properties index 973e3a8..97c5a5e 100644 --- a/Client/gradle.properties +++ b/Client/gradle.properties @@ -1,3 +1,8 @@ +# +# Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. +# Unauthorized copying of this file via any medium is Strictly Prohibited. +# + org.gradle.jvmargs=-Xmx4G org.gradle.daemon=false diff --git a/Client/src/main/java/com/baseband/client/ASyncRunner.java b/Client/src/main/java/com/baseband/client/ASyncRunner.java index 1b5b898..60fb0e0 100644 --- a/Client/src/main/java/com/baseband/client/ASyncRunner.java +++ b/Client/src/main/java/com/baseband/client/ASyncRunner.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Client/src/main/java/com/baseband/client/BaseBand.java b/Client/src/main/java/com/baseband/client/BaseBand.java index 937de2c..997fc17 100644 --- a/Client/src/main/java/com/baseband/client/BaseBand.java +++ b/Client/src/main/java/com/baseband/client/BaseBand.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client; @@ -6,22 +11,20 @@ import com.baseband.client.event.EventBus; import com.baseband.client.event.FMLEventProcessor; import com.baseband.client.module.Module; import com.baseband.client.module.modules.*; +import de.tudbut.parsing.TCN; +import de.tudbut.tools.Lock; import de.tudbut.tools.Registry; import de.tudbut.tools.Tools; import net.minecraft.client.Minecraft; import net.minecraft.launchwrapper.Launch; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import de.tudbut.parsing.TCN; -import de.tudbut.tools.Lock; +import org.lwjgl.opengl.Display; import javax.swing.*; import java.io.IOException; import java.io.InputStream; -import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.net.URL; @@ -34,11 +37,11 @@ import java.util.function.Consumer; public class BaseBand { public static int majorVersion = 1; - public static int buildNumber = 485; - public static String hash = "d8be0a150e9890d3"; + public static int buildNumber = 487; + public static String hash = "36c1edbaa0c2f6b3"; public static String name = "BaseBand"; - public long timeOfCompile = 1700145647026L; + public long timeOfCompile = 1700171942984L; public CommandManager commandRegistry; public EventBus eventBus; public ArrayList modules = new ArrayList<>(); @@ -140,6 +143,7 @@ public class BaseBand { try { for (Module m : modules) { if(m.isEnabled()) { + m.setEnabled(m.isEnabled()); MinecraftForge.EVENT_BUS.register(m); eventBus.register(m); } @@ -157,6 +161,7 @@ public class BaseBand { } }, "Config save thread").start(); + Display.setTitle(getWatermark()); log.info("BaseBand Instantiated."); } diff --git a/Client/src/main/java/com/baseband/client/ConfigManager.java b/Client/src/main/java/com/baseband/client/ConfigManager.java index 19296b7..6df1945 100644 --- a/Client/src/main/java/com/baseband/client/ConfigManager.java +++ b/Client/src/main/java/com/baseband/client/ConfigManager.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client; import com.baseband.client.module.Module; diff --git a/Client/src/main/java/com/baseband/client/Key.java b/Client/src/main/java/com/baseband/client/Key.java index 436be79..7283f3d 100644 --- a/Client/src/main/java/com/baseband/client/Key.java +++ b/Client/src/main/java/com/baseband/client/Key.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client; diff --git a/Client/src/main/java/com/baseband/client/MotionUtil.java b/Client/src/main/java/com/baseband/client/MotionUtil.java index b768957..e7c39f5 100644 --- a/Client/src/main/java/com/baseband/client/MotionUtil.java +++ b/Client/src/main/java/com/baseband/client/MotionUtil.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client; import net.minecraft.client.Minecraft; diff --git a/Client/src/main/java/com/baseband/client/Restrict.java b/Client/src/main/java/com/baseband/client/Restrict.java index a7bba84..a683664 100644 --- a/Client/src/main/java/com/baseband/client/Restrict.java +++ b/Client/src/main/java/com/baseband/client/Restrict.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/Tesselator.java b/Client/src/main/java/com/baseband/client/Tesselator.java index 0b9824c..d1153f4 100644 --- a/Client/src/main/java/com/baseband/client/Tesselator.java +++ b/Client/src/main/java/com/baseband/client/Tesselator.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Client/src/main/java/com/baseband/client/Utils.java b/Client/src/main/java/com/baseband/client/Utils.java index 725c478..7ba9ca9 100644 --- a/Client/src/main/java/com/baseband/client/Utils.java +++ b/Client/src/main/java/com/baseband/client/Utils.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client; import com.mojang.realmsclient.gui.ChatFormatting; diff --git a/Client/src/main/java/com/baseband/client/command/Command.java b/Client/src/main/java/com/baseband/client/command/Command.java index f159719..51b3297 100644 --- a/Client/src/main/java/com/baseband/client/command/Command.java +++ b/Client/src/main/java/com/baseband/client/command/Command.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.command; diff --git a/Client/src/main/java/com/baseband/client/command/CommandManager.java b/Client/src/main/java/com/baseband/client/command/CommandManager.java index 7844be5..c93db4e 100644 --- a/Client/src/main/java/com/baseband/client/command/CommandManager.java +++ b/Client/src/main/java/com/baseband/client/command/CommandManager.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.command; import com.baseband.client.command.commands.*; diff --git a/Client/src/main/java/com/baseband/client/command/commands/CreditsCommand.java b/Client/src/main/java/com/baseband/client/command/commands/CreditsCommand.java index 8f9c10d..88199cf 100644 --- a/Client/src/main/java/com/baseband/client/command/commands/CreditsCommand.java +++ b/Client/src/main/java/com/baseband/client/command/commands/CreditsCommand.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.command.commands; import com.baseband.client.Utils; diff --git a/Client/src/main/java/com/baseband/client/command/commands/GenericSetCommand.java b/Client/src/main/java/com/baseband/client/command/commands/GenericSetCommand.java index 4207946..6535126 100644 --- a/Client/src/main/java/com/baseband/client/command/commands/GenericSetCommand.java +++ b/Client/src/main/java/com/baseband/client/command/commands/GenericSetCommand.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.command.commands; import com.baseband.client.BaseBand; diff --git a/Client/src/main/java/com/baseband/client/command/commands/HelpCommand.java b/Client/src/main/java/com/baseband/client/command/commands/HelpCommand.java index 6f63cb4..22a618b 100644 --- a/Client/src/main/java/com/baseband/client/command/commands/HelpCommand.java +++ b/Client/src/main/java/com/baseband/client/command/commands/HelpCommand.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.command.commands; import com.baseband.client.BaseBand; diff --git a/Client/src/main/java/com/baseband/client/command/commands/VersionCommand.java b/Client/src/main/java/com/baseband/client/command/commands/VersionCommand.java index 19bc9a7..8bdf7a8 100644 --- a/Client/src/main/java/com/baseband/client/command/commands/VersionCommand.java +++ b/Client/src/main/java/com/baseband/client/command/commands/VersionCommand.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.command.commands; import com.baseband.client.BaseBand; diff --git a/Client/src/main/java/com/baseband/client/event/CancellableEvent.java b/Client/src/main/java/com/baseband/client/event/CancellableEvent.java index 2e2cae2..f5b65a3 100644 --- a/Client/src/main/java/com/baseband/client/event/CancellableEvent.java +++ b/Client/src/main/java/com/baseband/client/event/CancellableEvent.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.event; public class CancellableEvent extends Event { diff --git a/Client/src/main/java/com/baseband/client/event/Event.java b/Client/src/main/java/com/baseband/client/event/Event.java index b52db7a..3cb3eb4 100644 --- a/Client/src/main/java/com/baseband/client/event/Event.java +++ b/Client/src/main/java/com/baseband/client/event/Event.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.event; public class Event {} \ No newline at end of file diff --git a/Client/src/main/java/com/baseband/client/event/EventBus.java b/Client/src/main/java/com/baseband/client/event/EventBus.java index 2608d37..7e3bf1d 100644 --- a/Client/src/main/java/com/baseband/client/event/EventBus.java +++ b/Client/src/main/java/com/baseband/client/event/EventBus.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.event; import java.lang.reflect.Method; diff --git a/Client/src/main/java/com/baseband/client/event/FMLEventProcessor.java b/Client/src/main/java/com/baseband/client/event/FMLEventProcessor.java index 58e2215..65f4018 100644 --- a/Client/src/main/java/com/baseband/client/event/FMLEventProcessor.java +++ b/Client/src/main/java/com/baseband/client/event/FMLEventProcessor.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.event; import com.baseband.client.BaseBand; diff --git a/Client/src/main/java/com/baseband/client/event/Subscribe.java b/Client/src/main/java/com/baseband/client/event/Subscribe.java index b233b7a..74d30ab 100644 --- a/Client/src/main/java/com/baseband/client/event/Subscribe.java +++ b/Client/src/main/java/com/baseband/client/event/Subscribe.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.event; import java.lang.annotation.Retention; diff --git a/Client/src/main/java/com/baseband/client/event/events/MoveEvent.java b/Client/src/main/java/com/baseband/client/event/events/MoveEvent.java index ed55d17..69f7789 100644 --- a/Client/src/main/java/com/baseband/client/event/events/MoveEvent.java +++ b/Client/src/main/java/com/baseband/client/event/events/MoveEvent.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.event.events; import com.baseband.client.event.CancellableEvent; diff --git a/Client/src/main/java/com/baseband/client/event/events/PacketEvent.java b/Client/src/main/java/com/baseband/client/event/events/PacketEvent.java index cf9ed0a..c6c3d06 100644 --- a/Client/src/main/java/com/baseband/client/event/events/PacketEvent.java +++ b/Client/src/main/java/com/baseband/client/event/events/PacketEvent.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.event.events; import com.baseband.client.event.CancellableEvent; diff --git a/Client/src/main/java/com/baseband/client/event/events/SafeTickEvent.java b/Client/src/main/java/com/baseband/client/event/events/SafeTickEvent.java index 2faf085..3fa61f5 100644 --- a/Client/src/main/java/com/baseband/client/event/events/SafeTickEvent.java +++ b/Client/src/main/java/com/baseband/client/event/events/SafeTickEvent.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.event.events; import com.baseband.client.event.Event; diff --git a/Client/src/main/java/com/baseband/client/guirewrite/Button.java b/Client/src/main/java/com/baseband/client/guirewrite/Button.java index 8afde7f..42dd55c 100644 --- a/Client/src/main/java/com/baseband/client/guirewrite/Button.java +++ b/Client/src/main/java/com/baseband/client/guirewrite/Button.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.guirewrite; public abstract class Button { diff --git a/Client/src/main/java/com/baseband/client/guirewrite/GuiBaseBand.java b/Client/src/main/java/com/baseband/client/guirewrite/GuiBaseBand.java index cbc6ba2..123ff40 100644 --- a/Client/src/main/java/com/baseband/client/guirewrite/GuiBaseBand.java +++ b/Client/src/main/java/com/baseband/client/guirewrite/GuiBaseBand.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.guirewrite; import com.baseband.client.BaseBand; diff --git a/Client/src/main/java/com/baseband/client/guirewrite/ModuleButton.java b/Client/src/main/java/com/baseband/client/guirewrite/ModuleButton.java index e4d2be9..761b324 100644 --- a/Client/src/main/java/com/baseband/client/guirewrite/ModuleButton.java +++ b/Client/src/main/java/com/baseband/client/guirewrite/ModuleButton.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.guirewrite; import com.baseband.client.module.Module; diff --git a/Client/src/main/java/com/baseband/client/guirewrite/SettingButton.java b/Client/src/main/java/com/baseband/client/guirewrite/SettingButton.java index e77e0b5..0cb220d 100644 --- a/Client/src/main/java/com/baseband/client/guirewrite/SettingButton.java +++ b/Client/src/main/java/com/baseband/client/guirewrite/SettingButton.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.guirewrite; import com.baseband.client.setting.FloatMeta; diff --git a/Client/src/main/java/com/baseband/client/mixins/ICPacketChatMessage.java b/Client/src/main/java/com/baseband/client/mixins/ICPacketChatMessage.java index 5b88867..17f7aec 100644 --- a/Client/src/main/java/com/baseband/client/mixins/ICPacketChatMessage.java +++ b/Client/src/main/java/com/baseband/client/mixins/ICPacketChatMessage.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.mixins; import net.minecraft.network.play.client.CPacketChatMessage; diff --git a/Client/src/main/java/com/baseband/client/mixins/IMinecraft.java b/Client/src/main/java/com/baseband/client/mixins/IMinecraft.java index 5111241..5107e0c 100644 --- a/Client/src/main/java/com/baseband/client/mixins/IMinecraft.java +++ b/Client/src/main/java/com/baseband/client/mixins/IMinecraft.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.mixins; import net.minecraft.client.Minecraft; diff --git a/Client/src/main/java/com/baseband/client/mixins/ISPacketPlayerPosLook.java b/Client/src/main/java/com/baseband/client/mixins/ISPacketPlayerPosLook.java index e116c3b..b8e50dc 100644 --- a/Client/src/main/java/com/baseband/client/mixins/ISPacketPlayerPosLook.java +++ b/Client/src/main/java/com/baseband/client/mixins/ISPacketPlayerPosLook.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.mixins; import net.minecraft.network.play.server.SPacketPlayerPosLook; diff --git a/Client/src/main/java/com/baseband/client/mixins/MixinEntityPlayerSP.java b/Client/src/main/java/com/baseband/client/mixins/MixinEntityPlayerSP.java index 15511b7..7e100ee 100644 --- a/Client/src/main/java/com/baseband/client/mixins/MixinEntityPlayerSP.java +++ b/Client/src/main/java/com/baseband/client/mixins/MixinEntityPlayerSP.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.mixins; import com.baseband.client.event.events.MoveEvent; diff --git a/Client/src/main/java/com/baseband/client/mixins/MixinForgeBus.java b/Client/src/main/java/com/baseband/client/mixins/MixinForgeBus.java index e3c934c..19cc705 100644 --- a/Client/src/main/java/com/baseband/client/mixins/MixinForgeBus.java +++ b/Client/src/main/java/com/baseband/client/mixins/MixinForgeBus.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.mixins; import net.minecraftforge.fml.common.eventhandler.EventBus; diff --git a/Client/src/main/java/com/baseband/client/mixins/MixinMinecraft.java b/Client/src/main/java/com/baseband/client/mixins/MixinMinecraft.java index cc7f4c5..4dc08ef 100644 --- a/Client/src/main/java/com/baseband/client/mixins/MixinMinecraft.java +++ b/Client/src/main/java/com/baseband/client/mixins/MixinMinecraft.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.mixins; import net.minecraft.client.Minecraft; diff --git a/Client/src/main/java/com/baseband/client/mixins/MixinNetworkManager.java b/Client/src/main/java/com/baseband/client/mixins/MixinNetworkManager.java index 2cc4e3a..56c676a 100644 --- a/Client/src/main/java/com/baseband/client/mixins/MixinNetworkManager.java +++ b/Client/src/main/java/com/baseband/client/mixins/MixinNetworkManager.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.mixins; import io.netty.channel.ChannelHandlerContext; diff --git a/Client/src/main/java/com/baseband/client/mixins/MixinProxy.java b/Client/src/main/java/com/baseband/client/mixins/MixinProxy.java index 9b7f76e..837ec59 100644 --- a/Client/src/main/java/com/baseband/client/mixins/MixinProxy.java +++ b/Client/src/main/java/com/baseband/client/mixins/MixinProxy.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.mixins; import com.baseband.client.BaseBand; diff --git a/Client/src/main/java/com/baseband/client/module/Module.java b/Client/src/main/java/com/baseband/client/module/Module.java index e5a6b9a..585652b 100644 --- a/Client/src/main/java/com/baseband/client/module/Module.java +++ b/Client/src/main/java/com/baseband/client/module/Module.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module; import com.baseband.client.BaseBand; @@ -63,6 +68,10 @@ public abstract class Module { public void disable(){} + public String getHudMeta() { + return ""; + } + public abstract String toString(); public void toggle() { diff --git a/Client/src/main/java/com/baseband/client/module/modules/ASyncTest.java b/Client/src/main/java/com/baseband/client/module/modules/ASyncTest.java index ac03a52..40a9455 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/ASyncTest.java +++ b/Client/src/main/java/com/baseband/client/module/modules/ASyncTest.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Client/src/main/java/com/baseband/client/module/modules/Brightness.java b/Client/src/main/java/com/baseband/client/module/modules/Brightness.java index 4e9da51..6842549 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/Brightness.java +++ b/Client/src/main/java/com/baseband/client/module/modules/Brightness.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.BaseBand; diff --git a/Client/src/main/java/com/baseband/client/module/modules/ChatCrypt.java b/Client/src/main/java/com/baseband/client/module/modules/ChatCrypt.java index 66fba90..dd80968 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/ChatCrypt.java +++ b/Client/src/main/java/com/baseband/client/module/modules/ChatCrypt.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.Restrict; diff --git a/Client/src/main/java/com/baseband/client/module/modules/ChatSuffix.java b/Client/src/main/java/com/baseband/client/module/modules/ChatSuffix.java index f303a43..d79ce09 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/ChatSuffix.java +++ b/Client/src/main/java/com/baseband/client/module/modules/ChatSuffix.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.BaseBand; diff --git a/Client/src/main/java/com/baseband/client/module/modules/ClickGUI.java b/Client/src/main/java/com/baseband/client/module/modules/ClickGUI.java index 24bbf1f..09f6a8c 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/ClickGUI.java +++ b/Client/src/main/java/com/baseband/client/module/modules/ClickGUI.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.Restrict; diff --git a/Client/src/main/java/com/baseband/client/module/modules/Crasher.java b/Client/src/main/java/com/baseband/client/module/modules/Crasher.java index 4d440fb..a31fea5 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/Crasher.java +++ b/Client/src/main/java/com/baseband/client/module/modules/Crasher.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Client/src/main/java/com/baseband/client/module/modules/ElytraFly.java b/Client/src/main/java/com/baseband/client/module/modules/ElytraFly.java index 07a01e5..80827b4 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/ElytraFly.java +++ b/Client/src/main/java/com/baseband/client/module/modules/ElytraFly.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.event.Subscribe; @@ -16,7 +21,7 @@ public class ElytraFly extends Module { @Subscribe public void safeTick(SafeTickEvent e) { - if(mc.player.rotationPitch < 10 || !mc.player.isElytraFlying()){ + if(mc.player.rotationPitch < 10 || !mc.player.isElytraFlying() || !mc.player.isInWater() || !mc.player.isInLava()){ return; } diff --git a/Client/src/main/java/com/baseband/client/module/modules/FastUse.java b/Client/src/main/java/com/baseband/client/module/modules/FastUse.java index 0f80cc3..adaa9e2 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/FastUse.java +++ b/Client/src/main/java/com/baseband/client/module/modules/FastUse.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.event.Subscribe; diff --git a/Client/src/main/java/com/baseband/client/module/modules/HUD.java b/Client/src/main/java/com/baseband/client/module/modules/HUD.java index 14bda90..49a6845 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/HUD.java +++ b/Client/src/main/java/com/baseband/client/module/modules/HUD.java @@ -1,34 +1,126 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.BaseBand; import com.baseband.client.module.Module; +import com.baseband.client.setting.Setting; +import com.mojang.realmsclient.gui.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.ScaledResolution; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import java.awt.*; +import java.text.CharacterIterator; +import java.text.StringCharacterIterator; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.Objects; public class HUD extends Module { + @Setting("Watermark") + boolean watermark = true; + + @Setting("FPS") + boolean fps = true; + + @Setting("Modules") + boolean modules = true; + + @Setting("Memory") + boolean memory = true; + + @Setting("IP") + boolean ip = true; + + @Setting("ServerBrand") + boolean brand = true; + + @Setting("Sort") + boolean sorthud = true; + @Override public String toString() { return "HUD"; } @Override - protected boolean defaultEnabled() { return true; } + protected boolean defaultEnabled() { + return true; + } @SubscribeEvent public void text(RenderGameOverlayEvent.Text e) { FontRenderer fr = Minecraft.getMinecraft().fontRenderer; fr.drawStringWithShadow(BaseBand.INSTANCE.getWatermark(), 2, 2, Color.WHITE.getRGB()); - int y = 2 + fr.FONT_HEIGHT; - for (Module m : BaseBand.INSTANCE.modules) { - if(m.isEnabled()) { - fr.drawStringWithShadow(m.toString(), 2, y, Color.WHITE.getRGB()); - y = y + fr.FONT_HEIGHT; + ScaledResolution sr = new ScaledResolution(Minecraft.getMinecraft()); + + + int y = 2; //left side vertical offset + int hy = 2; //right side vertical offset + + if(watermark) { + fr.drawStringWithShadow(BaseBand.INSTANCE.getWatermark(), 2, 2, Color.WHITE.getRGB()); + y += fr.FONT_HEIGHT; + } + + + Module[] v = BaseBand.INSTANCE.modules.stream() + .sorted(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth((value.getHudMeta().isEmpty()) ? value.toString() : value.getHudMeta() + ChatFormatting.GRAY + " " + value.getHudMeta()))) // I mean, it works? + .toArray(Module[]::new); + if(modules) { + for (Module mod : v) { + if (mod.isEnabled()) { + fr.drawStringWithShadow((mod.getHudMeta().isEmpty()) ? mod.toString() : mod.getHudMeta() + ChatFormatting.GRAY + " " + mod.getHudMeta(), 2, y, Color.WHITE.getRGB()); + y += fr.FONT_HEIGHT; + } } } + + ArrayList hud = new ArrayList<>(); + + if(fps) { + hud.add("FPS: " + Minecraft.getDebugFPS()); + } + + if(memory) { + hud.add("Memory: "+humanReadableByteCountSI(Runtime.getRuntime().freeMemory())+"/"+humanReadableByteCountSI(Runtime.getRuntime().maxMemory())); + } + + if(ip) { + hud.add("IP: "+(mc.isSingleplayer() ? "127.0.0.1" : Objects.requireNonNull(mc.getConnection().getNetworkManager().getRemoteAddress()))); + } + + if(brand) { + String brand = (mc.isIntegratedServerRunning() ? "SinglePlayer" : (mc.player.getServerBrand() == null ? "null" : mc.player.getServerBrand())); + hud.add("ServerBrand: "+brand); + } + + if (sorthud) { + hud.sort(Comparator.comparingDouble(value -> -Minecraft.getMinecraft().fontRenderer.getStringWidth(value))); + } + + for (String s: hud) { + fr.drawStringWithShadow(s, sr.getScaledWidth() - fr.getStringWidth(s) - 2, hy, Color.WHITE.getRGB()); + hy += fr.FONT_HEIGHT; + } + } + + public static String humanReadableByteCountSI(long bytes) { + if (-1000 < bytes && bytes < 1000) { + return bytes + " B"; + } + CharacterIterator ci = new StringCharacterIterator("kMGTPE"); + while (bytes <= -999_950 || bytes >= 999_950) { + bytes /= 1000; + ci.next(); + } + return String.format("%.1f %cB", bytes / 1000.0, ci.current()); } } diff --git a/Client/src/main/java/com/baseband/client/module/modules/HoleESP.java b/Client/src/main/java/com/baseband/client/module/modules/HoleESP.java index c8a1772..679bb32 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/HoleESP.java +++ b/Client/src/main/java/com/baseband/client/module/modules/HoleESP.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Client/src/main/java/com/baseband/client/module/modules/NameTags.java b/Client/src/main/java/com/baseband/client/module/modules/NameTags.java index f587e09..dff4522 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/NameTags.java +++ b/Client/src/main/java/com/baseband/client/module/modules/NameTags.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.module.Module; diff --git a/Client/src/main/java/com/baseband/client/module/modules/NoSlip.java b/Client/src/main/java/com/baseband/client/module/modules/NoSlip.java index 6b87887..5b81e6e 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/NoSlip.java +++ b/Client/src/main/java/com/baseband/client/module/modules/NoSlip.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.event.Subscribe; diff --git a/Client/src/main/java/com/baseband/client/module/modules/PacketFly.java b/Client/src/main/java/com/baseband/client/module/modules/PacketFly.java index 4879bdd..30eeda3 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/PacketFly.java +++ b/Client/src/main/java/com/baseband/client/module/modules/PacketFly.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.Restrict; diff --git a/Client/src/main/java/com/baseband/client/module/modules/PacketTest.java b/Client/src/main/java/com/baseband/client/module/modules/PacketTest.java index df2eea7..41976df 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/PacketTest.java +++ b/Client/src/main/java/com/baseband/client/module/modules/PacketTest.java @@ -1,7 +1,11 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.Restrict; -import com.baseband.client.Utils; import com.baseband.client.event.Subscribe; import com.baseband.client.event.events.PacketEvent; import com.baseband.client.module.Module; @@ -12,13 +16,16 @@ public class PacketTest extends Module { public String toString() { return "PacketTest"; } - @Subscribe - public void handleEventA(PacketEvent.Read event) { - Utils.sendChatMessage(event.getPacket().getClass().getName()); - } + + String packet = ""; @Subscribe - public void handleEventB(PacketEvent.Write event) { - Utils.sendChatMessage(event.getPacket().getClass().getName()); + public void handleEvent(PacketEvent event) { + packet = event.getPacket().getClass().getSimpleName(); + } + + @Override + public String getHudMeta() { + return packet; } } diff --git a/Client/src/main/java/com/baseband/client/module/modules/Speed.java b/Client/src/main/java/com/baseband/client/module/modules/Speed.java index d5f6d84..47d3a19 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/Speed.java +++ b/Client/src/main/java/com/baseband/client/module/modules/Speed.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.MotionUtil; diff --git a/Client/src/main/java/com/baseband/client/module/modules/TPTracker.java b/Client/src/main/java/com/baseband/client/module/modules/TPTracker.java index 1c57a2b..bfc52dc 100644 --- a/Client/src/main/java/com/baseband/client/module/modules/TPTracker.java +++ b/Client/src/main/java/com/baseband/client/module/modules/TPTracker.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.module.modules; import com.baseband.client.Utils; diff --git a/Client/src/main/java/com/baseband/client/setting/FloatMeta.java b/Client/src/main/java/com/baseband/client/setting/FloatMeta.java index d314c70..6f67014 100644 --- a/Client/src/main/java/com/baseband/client/setting/FloatMeta.java +++ b/Client/src/main/java/com/baseband/client/setting/FloatMeta.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.setting; import java.lang.annotation.ElementType; diff --git a/Client/src/main/java/com/baseband/client/setting/IntMeta.java b/Client/src/main/java/com/baseband/client/setting/IntMeta.java index c9ec9ba..7c6b9a9 100644 --- a/Client/src/main/java/com/baseband/client/setting/IntMeta.java +++ b/Client/src/main/java/com/baseband/client/setting/IntMeta.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.setting; import java.lang.annotation.ElementType; diff --git a/Client/src/main/java/com/baseband/client/setting/Setting.java b/Client/src/main/java/com/baseband/client/setting/Setting.java index ee69be7..e87e318 100644 --- a/Client/src/main/java/com/baseband/client/setting/Setting.java +++ b/Client/src/main/java/com/baseband/client/setting/Setting.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package com.baseband.client.setting; import java.lang.annotation.ElementType; diff --git a/Installer/src/main/java/org/baseband/installer/Installer.java b/Installer/src/main/java/org/baseband/installer/Installer.java index 10fb39e..a157172 100644 --- a/Installer/src/main/java/org/baseband/installer/Installer.java +++ b/Installer/src/main/java/org/baseband/installer/Installer.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.installer; import javax.swing.*; diff --git a/Installer/src/main/java/org/baseband/installer/InstallerApp.java b/Installer/src/main/java/org/baseband/installer/InstallerApp.java index 0fa945b..9de85d7 100644 --- a/Installer/src/main/java/org/baseband/installer/InstallerApp.java +++ b/Installer/src/main/java/org/baseband/installer/InstallerApp.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.installer; diff --git a/Installer/src/main/java/org/baseband/installer/Key.java b/Installer/src/main/java/org/baseband/installer/Key.java index ea2bc1a..1a9f79b 100644 --- a/Installer/src/main/java/org/baseband/installer/Key.java +++ b/Installer/src/main/java/org/baseband/installer/Key.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.installer; import java.nio.charset.StandardCharsets; diff --git a/Installer/src/main/java/org/baseband/installer/util/minecraft/MinecraftFiles.java b/Installer/src/main/java/org/baseband/installer/util/minecraft/MinecraftFiles.java index 74c0da5..058e8e1 100644 --- a/Installer/src/main/java/org/baseband/installer/util/minecraft/MinecraftFiles.java +++ b/Installer/src/main/java/org/baseband/installer/util/minecraft/MinecraftFiles.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.installer.util.minecraft; import java.io.File; diff --git a/Loader/gradle.properties b/Loader/gradle.properties index 973e3a8..97c5a5e 100644 --- a/Loader/gradle.properties +++ b/Loader/gradle.properties @@ -1,3 +1,8 @@ +# +# Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. +# Unauthorized copying of this file via any medium is Strictly Prohibited. +# + org.gradle.jvmargs=-Xmx4G org.gradle.daemon=false diff --git a/Loader/src/main/java/de/tudbut/io/CLSPrintWriter.java b/Loader/src/main/java/de/tudbut/io/CLSPrintWriter.java index e8eca93..70a44e5 100644 --- a/Loader/src/main/java/de/tudbut/io/CLSPrintWriter.java +++ b/Loader/src/main/java/de/tudbut/io/CLSPrintWriter.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.io; import de.tudbut.tools.ReflectUtil; diff --git a/Loader/src/main/java/de/tudbut/io/StreamReader.java b/Loader/src/main/java/de/tudbut/io/StreamReader.java index 6bbc83e..db3ab8c 100644 --- a/Loader/src/main/java/de/tudbut/io/StreamReader.java +++ b/Loader/src/main/java/de/tudbut/io/StreamReader.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.io; import de.tudbut.obj.CarrierException; diff --git a/Loader/src/main/java/de/tudbut/obj/CarrierException.java b/Loader/src/main/java/de/tudbut/obj/CarrierException.java index c1ec136..9df3050 100644 --- a/Loader/src/main/java/de/tudbut/obj/CarrierException.java +++ b/Loader/src/main/java/de/tudbut/obj/CarrierException.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.obj; public class CarrierException extends RuntimeException { diff --git a/Loader/src/main/java/de/tudbut/obj/DoubleTypedObject.java b/Loader/src/main/java/de/tudbut/obj/DoubleTypedObject.java index a6d76b1..21509cc 100644 --- a/Loader/src/main/java/de/tudbut/obj/DoubleTypedObject.java +++ b/Loader/src/main/java/de/tudbut/obj/DoubleTypedObject.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.obj; import de.tudbut.tools.ReflectUtil; diff --git a/Loader/src/main/java/de/tudbut/obj/TLMap.java b/Loader/src/main/java/de/tudbut/obj/TLMap.java index 5b80fb7..7f99cff 100644 --- a/Loader/src/main/java/de/tudbut/obj/TLMap.java +++ b/Loader/src/main/java/de/tudbut/obj/TLMap.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.obj; import de.tudbut.tools.Retriever; diff --git a/Loader/src/main/java/de/tudbut/parsing/JSON.java b/Loader/src/main/java/de/tudbut/parsing/JSON.java index e0f5e48..6969ace 100644 --- a/Loader/src/main/java/de/tudbut/parsing/JSON.java +++ b/Loader/src/main/java/de/tudbut/parsing/JSON.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.parsing; import de.tudbut.tools.Stack; diff --git a/Loader/src/main/java/de/tudbut/parsing/TCN.java b/Loader/src/main/java/de/tudbut/parsing/TCN.java index 135eead..26ea4a6 100644 --- a/Loader/src/main/java/de/tudbut/parsing/TCN.java +++ b/Loader/src/main/java/de/tudbut/parsing/TCN.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.parsing; diff --git a/Loader/src/main/java/de/tudbut/parsing/TCNArray.java b/Loader/src/main/java/de/tudbut/parsing/TCNArray.java index 555250e..96684d1 100644 --- a/Loader/src/main/java/de/tudbut/parsing/TCNArray.java +++ b/Loader/src/main/java/de/tudbut/parsing/TCNArray.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.parsing; import java.util.ArrayList; diff --git a/Loader/src/main/java/de/tudbut/security/AccessKiller.java b/Loader/src/main/java/de/tudbut/security/AccessKiller.java index e645802..ced12ef 100644 --- a/Loader/src/main/java/de/tudbut/security/AccessKiller.java +++ b/Loader/src/main/java/de/tudbut/security/AccessKiller.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security; import de.tudbut.tools.ReflectUtil; diff --git a/Loader/src/main/java/de/tudbut/security/DataKeeper.java b/Loader/src/main/java/de/tudbut/security/DataKeeper.java index d44d9d1..4b3fe2e 100644 --- a/Loader/src/main/java/de/tudbut/security/DataKeeper.java +++ b/Loader/src/main/java/de/tudbut/security/DataKeeper.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security; import de.tudbut.obj.DoubleTypedObject; diff --git a/Loader/src/main/java/de/tudbut/security/ExtendedStrictness.java b/Loader/src/main/java/de/tudbut/security/ExtendedStrictness.java index 65ab896..147e46a 100644 --- a/Loader/src/main/java/de/tudbut/security/ExtendedStrictness.java +++ b/Loader/src/main/java/de/tudbut/security/ExtendedStrictness.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security; public class ExtendedStrictness implements Strictness { diff --git a/Loader/src/main/java/de/tudbut/security/PermissionManager.java b/Loader/src/main/java/de/tudbut/security/PermissionManager.java index 02f1f1b..b5c12f1 100644 --- a/Loader/src/main/java/de/tudbut/security/PermissionManager.java +++ b/Loader/src/main/java/de/tudbut/security/PermissionManager.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security; import de.tudbut.tools.ReflectUtil; diff --git a/Loader/src/main/java/de/tudbut/security/Strictness.java b/Loader/src/main/java/de/tudbut/security/Strictness.java index 46a898b..c8f3795 100644 --- a/Loader/src/main/java/de/tudbut/security/Strictness.java +++ b/Loader/src/main/java/de/tudbut/security/Strictness.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security; public interface Strictness extends Cloneable { diff --git a/Loader/src/main/java/de/tudbut/security/StrictnessBuilder.java b/Loader/src/main/java/de/tudbut/security/StrictnessBuilder.java index e1927da..88b27e5 100644 --- a/Loader/src/main/java/de/tudbut/security/StrictnessBuilder.java +++ b/Loader/src/main/java/de/tudbut/security/StrictnessBuilder.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security; import de.tudbut.parsing.TCN; diff --git a/Loader/src/main/java/de/tudbut/security/permissionmanager/AllowAllRestriction.java b/Loader/src/main/java/de/tudbut/security/permissionmanager/AllowAllRestriction.java index 2bb950a..9f8dc2e 100644 --- a/Loader/src/main/java/de/tudbut/security/permissionmanager/AllowAllRestriction.java +++ b/Loader/src/main/java/de/tudbut/security/permissionmanager/AllowAllRestriction.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security.permissionmanager; import de.tudbut.security.PermissionManager; diff --git a/Loader/src/main/java/de/tudbut/security/permissionmanager/CallClassRestriction.java b/Loader/src/main/java/de/tudbut/security/permissionmanager/CallClassRestriction.java index dc17a3d..e9944b9 100644 --- a/Loader/src/main/java/de/tudbut/security/permissionmanager/CallClassRestriction.java +++ b/Loader/src/main/java/de/tudbut/security/permissionmanager/CallClassRestriction.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security.permissionmanager; import de.tudbut.security.PermissionManager; diff --git a/Loader/src/main/java/de/tudbut/security/permissionmanager/ClassLoaderRestriction.java b/Loader/src/main/java/de/tudbut/security/permissionmanager/ClassLoaderRestriction.java index cbc0a49..0803df5 100644 --- a/Loader/src/main/java/de/tudbut/security/permissionmanager/ClassLoaderRestriction.java +++ b/Loader/src/main/java/de/tudbut/security/permissionmanager/ClassLoaderRestriction.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security.permissionmanager; import de.tudbut.security.PermissionManager; diff --git a/Loader/src/main/java/de/tudbut/security/permissionmanager/HideErrorRestriction.java b/Loader/src/main/java/de/tudbut/security/permissionmanager/HideErrorRestriction.java index 5fdfdf6..7c0d73f 100644 --- a/Loader/src/main/java/de/tudbut/security/permissionmanager/HideErrorRestriction.java +++ b/Loader/src/main/java/de/tudbut/security/permissionmanager/HideErrorRestriction.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security.permissionmanager; import de.tudbut.security.PermissionManager; diff --git a/Loader/src/main/java/de/tudbut/security/permissionmanager/PermissionOR.java b/Loader/src/main/java/de/tudbut/security/permissionmanager/PermissionOR.java index 36bf983..37f9788 100644 --- a/Loader/src/main/java/de/tudbut/security/permissionmanager/PermissionOR.java +++ b/Loader/src/main/java/de/tudbut/security/permissionmanager/PermissionOR.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security.permissionmanager; import de.tudbut.security.PermissionManager; diff --git a/Loader/src/main/java/de/tudbut/security/permissionmanager/Restriction.java b/Loader/src/main/java/de/tudbut/security/permissionmanager/Restriction.java index 7d2ee26..fbcbc20 100644 --- a/Loader/src/main/java/de/tudbut/security/permissionmanager/Restriction.java +++ b/Loader/src/main/java/de/tudbut/security/permissionmanager/Restriction.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.security.permissionmanager; import de.tudbut.security.PermissionManager; diff --git a/Loader/src/main/java/de/tudbut/tools/ExtendedMath.java b/Loader/src/main/java/de/tudbut/tools/ExtendedMath.java index eb3ef0a..c50331c 100644 --- a/Loader/src/main/java/de/tudbut/tools/ExtendedMath.java +++ b/Loader/src/main/java/de/tudbut/tools/ExtendedMath.java @@ -1,162 +1,16 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; -import javax.script.ScriptEngine; -import javax.script.ScriptEngineManager; -import javax.script.ScriptException; +import java.security.SecureRandom; public class ExtendedMath { - public static long[] solveSimple(String eq, char toSolveChar, int maxResults) throws InterruptedException { - eq = eq.replaceAll("=", "==").replaceAll("======", "==").replaceAll("====", "=="); + static SecureRandom RANDOM = new SecureRandom(); - final boolean[] stop = {false}; - final long[] result = new long[maxResults]; - final char[] current = {0}; - - String finalEq = eq; - new Thread(() -> { - ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js"); - for (long i = -1; i > Long.MIN_VALUE; i--) { - if (stop[0]) - break; - try { - if (engine.eval("(" + finalEq.replaceAll(String.valueOf(toSolveChar), "(" + i + ")") + ")").equals(true)) { - if (current[0] == result.length) - stop[0] = true; - else { - result[current[0]] = i; - current[0]++; - if (current[0] == result.length) - stop[0] = true; - } - if (stop[0]) - break; - } - } - catch (ScriptException e) { - e.printStackTrace(); - break; - } - } - }).start(); - String finalEq1 = eq; - new Thread(() -> { - ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js"); - for (long i = 0; i < Long.MAX_VALUE; i++) { - if (stop[0]) - break; - try { - if (engine.eval("(" + finalEq1.replaceAll(String.valueOf(toSolveChar), "(" + i + ")") + ")").equals(true)) { - if (current[0] == result.length) - stop[0] = true; - else { - result[current[0]] = i; - current[0]++; - if (current[0] == result.length) - stop[0] = true; - } - if (stop[0]) - break; - } - } - catch (ScriptException e) { - e.printStackTrace(); - break; - } - } - }).start(); - - while (!stop[0]) { - Thread.sleep(0); - } - - return result; - } - - public static long solveSimple(String eq, char toSolveChar) throws InterruptedException { - return solveSimple(eq, toSolveChar, 1)[0]; - } - - public static double[] solveDouble(String eq, char toSolveChar, int precision, int maxResults) throws InterruptedException { - eq = eq.replaceAll("=", "==").replaceAll("======", "==").replaceAll("====", "=="); - - - final boolean[] stop = {false}; - final double[] result = new double[maxResults]; - final char[] current = {0}; - - String finalEq = eq; - new Thread(() -> { - ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js"); - for (long i = -1; i > Long.MIN_VALUE; i--) { - if (stop[0]) - break; - try { - if (engine.eval(finalEq.replaceAll(String.valueOf(toSolveChar), "(" + (double) i / (double) precision + ")")).equals(true)) { - if (current[0] == result.length) - stop[0] = true; - else { - result[current[0]] = (double) i / (double) precision; - current[0]++; - if (current[0] == result.length) - stop[0] = true; - } - if (stop[0]) - break; - } - } - catch (ScriptException e) { - e.printStackTrace(); - break; - } - } - }).start(); - String finalEq1 = eq; - new Thread(() -> { - ScriptEngine engine = new ScriptEngineManager().getEngineByExtension("js"); - for (long i = 0; i < Long.MAX_VALUE; i++) { - if (stop[0]) - break; - try { - if (engine.eval(finalEq1.replaceAll(String.valueOf(toSolveChar), "(" + (double) i / (double) precision + ")")).equals(true)) { - if (current[0] == result.length) - stop[0] = true; - else { - result[current[0]] = (double) i / (double) precision; - current[0]++; - if (current[0] == result.length) - stop[0] = true; - } - if (stop[0]) - break; - } - } - catch (ScriptException e) { - e.printStackTrace(); - break; - } - } - }).start(); - - while (!stop[0]) { - Thread.sleep(0); - } - - return result; - } - - - public static double solveDouble(String eq, char toSolveChar, int precision) throws InterruptedException { - return solveDouble(eq, toSolveChar, precision, 1)[0]; - } - - public static double solveDouble(String eq, char toSolveChar) throws InterruptedException { - return solveDouble(eq, toSolveChar, 100, 1)[0]; - } - - public static double[] solveDouble(String eq, char toSolveChar, long maxResults) throws InterruptedException { - return solveDouble(eq, toSolveChar, 100, (int) maxResults); - } public static int random(int lower, int upper) { return (int) randomLong(lower, upper); @@ -164,92 +18,6 @@ public class ExtendedMath { public static long randomLong(long lower, long upper) { upper ++; - return (long) (Math.floor(Math.random() * (upper - lower)) + lower); - } - - public static float randomFloat(float lower, float upper, int precision) { - return (float) randomLong((int) (lower * (precision)), (int) (upper * (precision))) / (precision); - } - - public static double min(double... doubles) { - double currentMin = doubles[0]; - - for (int i = 1; i < doubles.length; i++) { - currentMin = Math.min(currentMin, doubles[i]); - } - - return currentMin; - } - - public static int min(int... ints) { - int currentMin = ints[0]; - - for (int i = 1; i < ints.length; i++) { - currentMin = Math.min(currentMin, ints[i]); - } - - return currentMin; - } - - public static double max(double... doubles) { - double currentMax = doubles[0]; - - for (int i = 1; i < doubles.length; i++) { - currentMax = Math.max(currentMax, doubles[i]); - } - - return currentMax; - } - - public static int max(int... ints) { - int currentMax = ints[0]; - - for (int i = 1; i < ints.length; i++) { - currentMax = Math.max(currentMax, ints[i]); - } - - return currentMax; - } - - public static double highestMinusLowest(double d1, double d2) { - if (d1 > d2) { - return d1 - d2; - } - if (d2 > d1) { - return d2 - d1; - } - return 0; - } - - public static int highestMinusLowest(int i1, int i2) { - if (i1 > i2) { - return i1 - i2; - } - if (i2 > i1) { - return i2 - i1; - } - return 0; - } - - public static T[] flipArray(T[] array) { - T[] oldArray = array.clone(); - - for (int i = 0; i < array.length; i++) { - array[-i + array.length - 1] = oldArray[i]; - } - - return array; - } - - public static double removeSign(double d) { - return d < 0 ? -d : d; - } - - public static long fastRound(double d) { - return d - (long) d < 0.5 ? (long) d : (long) d + 1; - } - - public static int fastIntRound(double d) { - return d - (int) d < 0.5 ? (int) d : (int) d + 1; + return (long) (Math.floor(RANDOM.nextFloat() * (upper - lower)) + lower); } } diff --git a/Loader/src/main/java/de/tudbut/tools/Lock.java b/Loader/src/main/java/de/tudbut/tools/Lock.java index 5da080b..e60adb4 100644 --- a/Loader/src/main/java/de/tudbut/tools/Lock.java +++ b/Loader/src/main/java/de/tudbut/tools/Lock.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; import java.util.Date; diff --git a/Loader/src/main/java/de/tudbut/tools/Queue.java b/Loader/src/main/java/de/tudbut/tools/Queue.java index 56fc211..4d3ced1 100644 --- a/Loader/src/main/java/de/tudbut/tools/Queue.java +++ b/Loader/src/main/java/de/tudbut/tools/Queue.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; import java.util.ArrayList; diff --git a/Loader/src/main/java/de/tudbut/tools/ReflectUtil.java b/Loader/src/main/java/de/tudbut/tools/ReflectUtil.java index bff53db..02cf842 100644 --- a/Loader/src/main/java/de/tudbut/tools/ReflectUtil.java +++ b/Loader/src/main/java/de/tudbut/tools/ReflectUtil.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; import com.sun.org.apache.xpath.internal.operations.Mod; diff --git a/Loader/src/main/java/de/tudbut/tools/Registry.java b/Loader/src/main/java/de/tudbut/tools/Registry.java index 913a794..f56cca6 100644 --- a/Loader/src/main/java/de/tudbut/tools/Registry.java +++ b/Loader/src/main/java/de/tudbut/tools/Registry.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; import de.tudbut.io.StreamReader; diff --git a/Loader/src/main/java/de/tudbut/tools/Retriever.java b/Loader/src/main/java/de/tudbut/tools/Retriever.java index a95d469..f7c9a38 100644 --- a/Loader/src/main/java/de/tudbut/tools/Retriever.java +++ b/Loader/src/main/java/de/tudbut/tools/Retriever.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; public interface Retriever { diff --git a/Loader/src/main/java/de/tudbut/tools/Stack.java b/Loader/src/main/java/de/tudbut/tools/Stack.java index e5b1f8e..0ff519c 100644 --- a/Loader/src/main/java/de/tudbut/tools/Stack.java +++ b/Loader/src/main/java/de/tudbut/tools/Stack.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; public class Stack extends Queue { diff --git a/Loader/src/main/java/de/tudbut/tools/StringTools.java b/Loader/src/main/java/de/tudbut/tools/StringTools.java index d581d25..8fb3a74 100644 --- a/Loader/src/main/java/de/tudbut/tools/StringTools.java +++ b/Loader/src/main/java/de/tudbut/tools/StringTools.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; public class StringTools { diff --git a/Loader/src/main/java/de/tudbut/tools/Tools.java b/Loader/src/main/java/de/tudbut/tools/Tools.java index c8a155d..1ced10c 100644 --- a/Loader/src/main/java/de/tudbut/tools/Tools.java +++ b/Loader/src/main/java/de/tudbut/tools/Tools.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package de.tudbut.tools; import java.io.BufferedReader; diff --git a/Loader/src/main/java/org/baseband/dumpy/Dumpie.java b/Loader/src/main/java/org/baseband/dumpy/Dumpie.java index b2e1083..8e0f2ee 100644 --- a/Loader/src/main/java/org/baseband/dumpy/Dumpie.java +++ b/Loader/src/main/java/org/baseband/dumpy/Dumpie.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.dumpy; /*import de.tudbut.tools.ReflectUtil; diff --git a/Loader/src/main/java/org/baseband/launcher/Tweaker.java b/Loader/src/main/java/org/baseband/launcher/Tweaker.java index b06d8cd..0a0f028 100644 --- a/Loader/src/main/java/org/baseband/launcher/Tweaker.java +++ b/Loader/src/main/java/org/baseband/launcher/Tweaker.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Loader/src/main/java/org/baseband/launcher/classloader/CustomClassloader.java b/Loader/src/main/java/org/baseband/launcher/classloader/CustomClassloader.java index c5b6fd6..bb1e08a 100644 --- a/Loader/src/main/java/org/baseband/launcher/classloader/CustomClassloader.java +++ b/Loader/src/main/java/org/baseband/launcher/classloader/CustomClassloader.java @@ -1,7 +1,6 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Loader/src/main/java/org/baseband/launcher/launch/Loader.java b/Loader/src/main/java/org/baseband/launcher/launch/Loader.java index efe7f6d..24a23d1 100644 --- a/Loader/src/main/java/org/baseband/launcher/launch/Loader.java +++ b/Loader/src/main/java/org/baseband/launcher/launch/Loader.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ @@ -18,10 +17,7 @@ import de.tudbut.tools.StringTools; import de.tudbut.tools.Tools; import org.baseband.launcher.Tweaker; import org.baseband.launcher.classloader.CustomClassloader; -import org.baseband.launcher.util.BBPermissionManager; -import org.baseband.launcher.util.BaseBandSecurityManager; -import org.baseband.launcher.util.DynamicPermissionManager; -import org.baseband.launcher.util.Key; +import org.baseband.launcher.util.*; import sun.misc.Unsafe; import javax.crypto.Cipher; @@ -58,7 +54,6 @@ public class Loader { permissionManager = init2(); } - private static Strictness init1() { AccessKiller.ensureKills(); AccessKiller.killFieldAccess(Loader.class); //nah this should work right??? @@ -387,6 +382,18 @@ public class Loader { .filter(input -> BAD_INPUT_FLAGS.stream().anyMatch(input::contains)) .findFirst(); + + Optional hasDisableFlag = ManagementFactory.getRuntimeMXBean().getInputArguments().stream() + .filter(input -> input.equals("-XX:+DisableAttachMechanism")) + .findFirst(); + + if(!hasDisableFlag.isPresent()) { + Tweaker.log.fatal("JVM does not have disable attach mechanism argument"); + Tweaker.log.fatal("Please add -XX:+DisableAttachMechanism to your JVM args"); + Loader.exit(); + } + + if (inputFlag.isPresent()) { return "Bad JVM flag "+Base64.getEncoder().encodeToString(ManagementFactory.getRuntimeMXBean().getInputArguments().toString().getBytes()); } @@ -442,7 +449,7 @@ public class Loader { } - private static Unsafe getUnsafe() { + public static Unsafe getUnsafe() { try { Field unsafeField = Unsafe.class.getDeclaredField("theUnsafe"); diff --git a/Loader/src/main/java/org/baseband/launcher/tweaker/CfgAccessTransformer.java b/Loader/src/main/java/org/baseband/launcher/tweaker/CfgAccessTransformer.java index 29b96cd..395420f 100644 --- a/Loader/src/main/java/org/baseband/launcher/tweaker/CfgAccessTransformer.java +++ b/Loader/src/main/java/org/baseband/launcher/tweaker/CfgAccessTransformer.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.launcher.tweaker; import net.minecraftforge.fml.common.asm.transformers.AccessTransformer; diff --git a/Loader/src/main/java/org/baseband/launcher/tweaker/Core.java b/Loader/src/main/java/org/baseband/launcher/tweaker/Core.java index 2e0cc11..aa7954d 100644 --- a/Loader/src/main/java/org/baseband/launcher/tweaker/Core.java +++ b/Loader/src/main/java/org/baseband/launcher/tweaker/Core.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Loader/src/main/java/org/baseband/launcher/util/BBPermissionManager.java b/Loader/src/main/java/org/baseband/launcher/util/BBPermissionManager.java index fdc52d4..7c1b0c5 100644 --- a/Loader/src/main/java/org/baseband/launcher/util/BBPermissionManager.java +++ b/Loader/src/main/java/org/baseband/launcher/util/BBPermissionManager.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.launcher.util; import de.tudbut.security.DataKeeper; diff --git a/Loader/src/main/java/org/baseband/launcher/util/BaseBandSecurityManager.java b/Loader/src/main/java/org/baseband/launcher/util/BaseBandSecurityManager.java index 7471eeb..9a8eb03 100644 --- a/Loader/src/main/java/org/baseband/launcher/util/BaseBandSecurityManager.java +++ b/Loader/src/main/java/org/baseband/launcher/util/BaseBandSecurityManager.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Loader/src/main/java/org/baseband/launcher/util/DynamicPermissionManager.java b/Loader/src/main/java/org/baseband/launcher/util/DynamicPermissionManager.java index 88f9812..f4b383f 100644 --- a/Loader/src/main/java/org/baseband/launcher/util/DynamicPermissionManager.java +++ b/Loader/src/main/java/org/baseband/launcher/util/DynamicPermissionManager.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.launcher.util; import de.tudbut.security.PermissionManager; diff --git a/Loader/src/main/java/org/baseband/launcher/util/Key.java b/Loader/src/main/java/org/baseband/launcher/util/Key.java index fda28a7..eb1f352 100644 --- a/Loader/src/main/java/org/baseband/launcher/util/Key.java +++ b/Loader/src/main/java/org/baseband/launcher/util/Key.java @@ -1,6 +1,5 @@ /* * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. - * * Unauthorized copying of this file via any medium is Strictly Prohibited. */ diff --git a/Loader/src/main/java/org/baseband/launcher/util/MixinRestriction.java b/Loader/src/main/java/org/baseband/launcher/util/MixinRestriction.java index 5688fc0..1671c7e 100644 --- a/Loader/src/main/java/org/baseband/launcher/util/MixinRestriction.java +++ b/Loader/src/main/java/org/baseband/launcher/util/MixinRestriction.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package org.baseband.launcher.util; import de.tudbut.security.Strictness; diff --git a/Server/src/main/java/dev/baseband/server/Main.java b/Server/src/main/java/dev/baseband/server/Main.java index 6e9a847..a248e2a 100644 --- a/Server/src/main/java/dev/baseband/server/Main.java +++ b/Server/src/main/java/dev/baseband/server/Main.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package dev.baseband.server; import dev.baseband.server.socket.Bot; diff --git a/Server/src/main/java/dev/baseband/server/socket/Bot.java b/Server/src/main/java/dev/baseband/server/socket/Bot.java index 16435a6..64932ff 100644 --- a/Server/src/main/java/dev/baseband/server/socket/Bot.java +++ b/Server/src/main/java/dev/baseband/server/socket/Bot.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package dev.baseband.server.socket; import net.dv8tion.jda.api.JDA; diff --git a/Server/src/main/java/dev/baseband/server/socket/ClientHandler.java b/Server/src/main/java/dev/baseband/server/socket/ClientHandler.java index a3b81ba..2c2e19b 100644 --- a/Server/src/main/java/dev/baseband/server/socket/ClientHandler.java +++ b/Server/src/main/java/dev/baseband/server/socket/ClientHandler.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package dev.baseband.server.socket; import org.json.JSONException; @@ -26,7 +31,6 @@ public class ClientHandler extends Thread { } - @Override public void run() { try { @@ -67,12 +71,10 @@ public class ClientHandler extends Thread { String jarHash = key.decryptString(dis.readUTF()); - - System.out.println("========================================"); System.out.println("Client connected: " + client.getInetAddress().getHostAddress()); System.out.println(username); - System.out.println("can't show the password bruh"); + System.out.println("can't show the password mate"); System.out.println(hwid); System.out.println(dump); System.out.println(dumpString); @@ -80,39 +82,37 @@ public class ClientHandler extends Thread { int result; // TODO MUST ALWAYS BE FALSE - if(false) { + if (false) { System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!"); System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!! Granting access due to debug mode"); System.out.println("!!!!!!!!!!!!!!!!!!!!!!!!!!"); result = 2; - } - else + } else result = UserManager.isUserValid(username, password, hwid); System.out.println(result); - if(Bot.disabled) { + if (Bot.disabled) { dos.writeInt(-3); System.out.println("Auth server down, denying."); System.out.println("========================================"); return; } - if((result >= 0 || result == -2) && dump) { + if ((result >= 0 || result == -2) && dump) { System.out.println("!!Dump Detected!!"); System.out.println("(We are banning this user.)"); UserManager.setBanned(username, true); Bot.sendDiscordWebhookMessage("@Staff"); - Bot.sendDiscordWebhookMessage(username+" "+dumpString); + Bot.sendDiscordWebhookMessage(username + " " + dumpString); dos.writeInt(-5); System.out.println("========================================"); return; } - BufferedReader countryReader = new BufferedReader(new InputStreamReader(new URL("http://ip-api.com/json/" + client.getInetAddress().getHostAddress() + "?fields=proxy,hosting").openStream())); - String answer = countryReader.readLine(); - countryReader.close(); - JSONObject object = new JSONObject(answer); + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new URL("http://ip-api.com/json/" + client.getInetAddress().getHostAddress() + "?fields=proxy,hosting").openStream())); + JSONObject object = new JSONObject(bufferedReader.readLine()); + bufferedReader.close(); try { boolean proxy = object.getBoolean("proxy"); if (proxy) { @@ -123,9 +123,9 @@ public class ClientHandler extends Thread { } boolean hosting = object.getBoolean("hosting"); - if(hosting) { + if (hosting) { Bot.sendDiscordWebhookMessage("@Staff"); - Bot.sendDiscordWebhookMessage(username+" attempted to use BaseBand from a hosting address."); + Bot.sendDiscordWebhookMessage(username + " attempted to use BaseBand from a hosting address."); dos.writeInt(-7); return; } @@ -133,11 +133,11 @@ public class ClientHandler extends Thread { // unknown } - if(type.contains("installer")) { + if (type.contains("installer")) { System.out.println("Installer detected."); int typeInt = dis.readInt(); - if(result >= 0) { - if(typeInt==0) { + if (result >= 0) { + if (typeInt == 0) { dos.writeInt(result); System.out.println("Auth succeeded."); } else { @@ -149,15 +149,15 @@ public class ClientHandler extends Thread { dos.write(encryptedBytes, 0, encryptedBytes.length); dos.flush(); } - } else if (result == -4){ + } else if (result == -4) { System.out.println("Invalid HWID"); dos.writeInt(result); - } else if(result == -6){ + } else if (result == -6) { System.out.println("Password Reset Process Initiated."); dos.writeInt(result); String lkey = dis.readUTF(); dos.writeBoolean(UserManager.setPasswordIfLicenseKeyCorrect(username, BCrypt.hashpw(password, BCrypt.gensalt(10)), lkey)); - }else{ + } else { System.out.println("Auth failed"); dos.writeInt(result); } @@ -177,7 +177,7 @@ public class ClientHandler extends Thread { */ - if(!SocketHandler.currentJarHash.equals(jarHash) && SocketHandler.pastJarHashes.contains(jarHash) && result >= 0) { + if (!SocketHandler.currentJarHash.equals(jarHash) && SocketHandler.pastJarHashes.contains(jarHash) && result >= 0) { dos.writeInt(-9); System.out.println("JAR HASH MISMATCH, denying."); System.out.println("But it matches an old version, so tell them to redownload it"); @@ -187,7 +187,6 @@ public class ClientHandler extends Thread { } - if (result >= 0 || result == -2) { System.out.println("Client is valid"); dos.writeInt(result); @@ -211,21 +210,18 @@ public class ClientHandler extends Thread { String className = entry.getKey(); //Name byte[] classData = entry.getValue(); //Data - byte[] encryptedBytes1 = key.encryptByte(aesE.doFinal(className.getBytes())); - dos.writeUTF(Base64.getEncoder().encodeToString(encryptedBytes1)); + dos.writeUTF(Base64.getEncoder().encodeToString(key.encryptByte(aesE.doFinal(className.getBytes())))); - byte[] encryptedBytes2 = key.encryptByte(new Key(cryptKey).encryptByte(classData)); - dos.writeUTF(Base64.getEncoder().encodeToString(encryptedBytes2)); + dos.writeUTF(Base64.getEncoder().encodeToString(key.encryptByte(new Key(cryptKey).encryptByte(classData)))); - byte[] encryptedBytes3 = key.encryptByte(aesE.doFinal(cryptKey)); - dos.writeUTF(Base64.getEncoder().encodeToString(encryptedBytes3)); + dos.writeUTF(Base64.getEncoder().encodeToString(key.encryptByte(aesE.doFinal(cryptKey)))); } System.out.println("Sent File To Client"); System.out.println("========================================"); } else { - System.out.println("Invalid, Error code "+result); + System.out.println("Invalid, Error code " + result); dos.writeInt(result); System.out.println("========================================"); } diff --git a/Server/src/main/java/dev/baseband/server/socket/Key.java b/Server/src/main/java/dev/baseband/server/socket/Key.java index f85e736..b663220 100644 --- a/Server/src/main/java/dev/baseband/server/socket/Key.java +++ b/Server/src/main/java/dev/baseband/server/socket/Key.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package dev.baseband.server.socket; import java.io.*; diff --git a/Server/src/main/java/dev/baseband/server/socket/SocketHandler.java b/Server/src/main/java/dev/baseband/server/socket/SocketHandler.java index 33b9f0a..c07e466 100644 --- a/Server/src/main/java/dev/baseband/server/socket/SocketHandler.java +++ b/Server/src/main/java/dev/baseband/server/socket/SocketHandler.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package dev.baseband.server.socket; import java.io.*; diff --git a/Server/src/main/java/dev/baseband/server/socket/UserManager.java b/Server/src/main/java/dev/baseband/server/socket/UserManager.java index a9e4346..6c0446c 100644 --- a/Server/src/main/java/dev/baseband/server/socket/UserManager.java +++ b/Server/src/main/java/dev/baseband/server/socket/UserManager.java @@ -1,3 +1,8 @@ +/* + * Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. + * Unauthorized copying of this file via any medium is Strictly Prohibited. + */ + package dev.baseband.server.socket; import org.mindrot.jbcrypt.BCrypt; diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 3c90d9b..d640fbe 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,3 +1,8 @@ +# +# Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. +# Unauthorized copying of this file via any medium is Strictly Prohibited. +# + distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME diff --git a/gradlew b/gradlew index 1b6c787..906c5a0 100755 --- a/gradlew +++ b/gradlew @@ -1,19 +1,8 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Copyright (c) 2023 Jess H & Daniella H. All Rights Reserved. +# Unauthorized copying of this file via any medium is Strictly Prohibited. # ##############################################################################