混淆代码里面的字符串

This commit is contained in:
luojian 2025-07-11 14:37:26 +08:00
parent 951b07ddf4
commit c37c4f1f75
1 changed files with 8 additions and 0 deletions

View File

@ -97,6 +97,7 @@ def update_gradle_property(content, key, new_value):
GAME_ACTIVITY_PATH = f"LauncherCode/src/com/launchercode/GameActivity.kt".replace("/", os.sep) GAME_ACTIVITY_PATH = f"LauncherCode/src/com/launchercode/GameActivity.kt".replace("/", os.sep)
ANDROID_MANIFEST_PATH = f"lawnchair/AndroidManifest.xml".replace("/", os.sep) ANDROID_MANIFEST_PATH = f"lawnchair/AndroidManifest.xml".replace("/", os.sep)
STRING_PATH = f"LauncherCode/res/values/strings.xml".replace("/", os.sep) STRING_PATH = f"LauncherCode/res/values/strings.xml".replace("/", os.sep)
LAUNCER_STRING_PATH = f"LauncherCode/src/com/launchercode/LauncherStringsValue.kt".replace("/", os.sep)
class ProjectUpdate(Task): class ProjectUpdate(Task):
@ -344,6 +345,13 @@ plugins {
privacy.replace("privacy.html", "TermsOfUse.html")) privacy.replace("privacy.html", "TermsOfUse.html"))
text = text.replace("harmounitun@outlook.com", tkg_custom) text = text.replace("harmounitun@outlook.com", tkg_custom)
open(os.path.join(self.context.temp_project_path, STRING_PATH), "w", encoding="utf-8").write(text) open(os.path.join(self.context.temp_project_path, STRING_PATH), "w", encoding="utf-8").write(text)
text = open(os.path.join(self.context.temp_project_path, LAUNCER_STRING_PATH), "r", encoding="utf-8").read()
text = text.replace("https://harmonitun.com/privacy.html", privacy)
text = text.replace("https://harmonitun.com/TermsOfUse.html",
privacy.replace("privacy.html", "TermsOfUse.html"))
text = text.replace("harmounitun@outlook.com", tkg_custom)
open(os.path.join(self.context.temp_project_path, LAUNCER_STRING_PATH), "w", encoding="utf-8").write(text)
pass pass
def execute(self): def execute(self):