From acfce00b99b4a0796098e67f997a8a4dd47751be Mon Sep 17 00:00:00 2001 From: VidTu Date: Fri, 9 Feb 2024 02:18:49 +0300 Subject: [PATCH] feat: More security things --- .ias/disabled_v1 | 3 + .../main/java/ru/vidtu/ias/IASMinecraft.java | 11 +-- .../java/ru/vidtu/ias/screen/AccountList.java | 6 +- ...AccountsScreen.java => AccountScreen.java} | 40 ++++++++- .../ru/vidtu/ias/screen/ConfigScreen.java | 8 ++ .../ias/screen/MicrosoftPopupScreen.java | 29 +++--- docs/TERMS.md | 6 ++ src/main/java/ru/vidtu/ias/IAS.java | 89 ++++++++++++++++--- src/main/java/ru/vidtu/ias/auth/MSAuth.java | 5 +- .../java/ru/vidtu/ias/auth/MSAuthServer.java | 2 +- .../java/ru/vidtu/ias/config/IASStorage.java | 42 +++++++-- src/main/java/ru/vidtu/ias/crypt/Crypt.java | 4 +- .../ru/vidtu/ias/crypt/HardwareCrypt.java | 6 +- .../ru/vidtu/ias/crypt/PasswordCrypt.java | 6 +- src/main/resources/assets/ias/lang/en_us.json | 6 +- src/main/resources/assets/ias/lang/ru_ru.json | 6 +- 16 files changed, 209 insertions(+), 60 deletions(-) create mode 100644 .ias/disabled_v1 rename 1.20.4/src/main/java/ru/vidtu/ias/screen/{AccountsScreen.java => AccountScreen.java} (86%) diff --git a/.ias/disabled_v1 b/.ias/disabled_v1 new file mode 100644 index 00000000..6f21eb1c --- /dev/null +++ b/.ias/disabled_v1 @@ -0,0 +1,3 @@ +# This file will contain any versions with issues critical enough +# to prohibit this mod from working, one version per line. +# Special case: If any of lines is equal to "ALL", then all versions will be disabled. diff --git a/1.20.4/src/main/java/ru/vidtu/ias/IASMinecraft.java b/1.20.4/src/main/java/ru/vidtu/ias/IASMinecraft.java index 501eb70a..4e98e369 100644 --- a/1.20.4/src/main/java/ru/vidtu/ias/IASMinecraft.java +++ b/1.20.4/src/main/java/ru/vidtu/ias/IASMinecraft.java @@ -50,7 +50,7 @@ import ru.vidtu.ias.account.Account; import ru.vidtu.ias.config.IASConfig; import ru.vidtu.ias.mixins.MinecraftAccessor; -import ru.vidtu.ias.screen.AccountsScreen; +import ru.vidtu.ias.screen.AccountScreen; import ru.vidtu.ias.utils.Expression; import ru.vidtu.ias.utils.IUtils; @@ -123,10 +123,7 @@ public static void init(Path gameDir, Path configDir, String loader, String modV LOGGER.info("IAS: Booting up... (version: {}, loader: {}, loader version: {}, game version: {})", modVersion, loader, loaderVersion, gameVersion); // Initialize the IAS. - IAS.init(gameDir, configDir); - - // Set the UA. - IAS.userAgent(modVersion, loader, loaderVersion, gameVersion); + IAS.init(gameDir, configDir, modVersion, loader, loaderVersion, gameVersion); } /** @@ -175,7 +172,7 @@ public static void onInit(Minecraft minecraft, Screen screen, Consumer