This repository has been archived on 2026-10-17. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
SashegDev 9f43d35f44 Патчить апдейтер, а не только лаунчер
Вендорный updater.exe перекачивает app.jar, и патч лаунчера после этого
стирался. Теперь патчится и сам апдейтер: в его payload (jar, пришитый к
PE-заглушке Launch4j после offset 65024) вставляются два хука.

- UpdaterGui.runLauncher -> beforeLauncher: перепатчить app.jar перед стартом
  лаунчера, если апдейтер достал его из своего кэша.
- DownloadEngine.findFilesToDownload -> filterUpdates: убрать app.jar из
  скачивания, но только если хеш манифеста равен baseSha256 из .rsx-patched.
  Другой хеш означает настоящее обновление, и файл качается как обычно.

Хук сделан обёрткой вокруг findFilesToDownload, а не правкой call site: у
invokespecial получатель лежит под аргументами, и замена вызова ломала стек.

Ещё лаунчер при старте чинит свой updater.exe (jb -> l качает "updater.exe"),
из-за чего хук жил ровно один запуск. Этот путь закрыт третьим guard.

Ещё:
- .rsx-patched теперь пишет сам патчер: baseSha256 нужен фильтру, чтобы
  отличать наш патч от настоящего обновления.
- patchupdater идемпотентен и берёт pristine-копию из updater.exe.orig.
- Перед записью payload проверяется загрузкой классов.
- Установщик патчит апдейтер, а uninstall откатывает и его.
- Маркер и log больше не прибиты к %APPDATA%\kjstudio: папки выводятся из
  расположения апдейтера.

Проверено на живой установке два запуска подряд: хук выживает, app.jar
остаётся пропатченным, updater качает 0 файлов.
2026-10-17 01:48:24 +03:00

29 lines
1.3 KiB
Plaintext

MIT License
Copyright (c) 2026 SashegDev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
---
This project bundles ASM (third_party/asm), which is distributed under its own
BSD 3-Clause license: https://asm.ow2.io/license.html
RustexRemake and the KJST Launcher are third-party products and are not part of
this project. This tool only attaches to the client on the user's own machine.