Add: Upcoming Keygen

This commit is contained in:
X1a0He
2024-07-21 00:04:07 +08:00
parent e2c90b8078
commit 1d5fd8b411
2 changed files with 21 additions and 9 deletions

View File

@@ -21,7 +21,8 @@
"autoHandleHelper": "是否自动处理helper文件",
"helperFile": "helper文件的路径例如/Contents/Library/LaunchServices/com.nssurge.surge-mac.helper可以传数组",
"componentApp": "组合app,有些大型app是由很多子app组成的,单独处理意义也不大,就这样吧.",
"forQiuChenly": "专门为QiuChenly特供的App看到这条的你硬改也没用。"
"forQiuChenly": "专门为QiuChenly特供的App看到这条的你硬改也没用。",
"keygen": "不注入app生成key破解适用于重签名后丢失某特性的app为true时其他配置默认失效"
},
"basePublicConfig": {
"bridgeFile": "/Contents/Frameworks/"
@@ -746,14 +747,13 @@
"ScreenCapture"
]
},
{
"packageName": "cn.better365.iRightMouse",
"keygen": true
},
{
"packageName": "com.better365.autoinput",
"injectFile": "PTHotKey.framework/Versions/A/PTHotKey",
"needCopyToAppDir": true,
"deepSignApp": true,
"tccutil": [
"All"
]
"keygen": true
},
{
"packageName": "com.drbuho.BuhoCleaner",
@@ -1165,4 +1165,4 @@
]
}
]
}
}

14
main.py
View File

@@ -67,6 +67,12 @@ def check_compatible(
return False
def handle_keygen(bundleIdentifier):
user_dir = os.path.expanduser("~");
# 取出用户名
username = user_dir.split("/")[-1]
subprocess.run("chmod +x ./tool/KeygenStarter", shell=True)
subprocess.run(f"./tool/KeygenStarter '{bundleIdentifier}' '{username}'", shell=True)
def handle_helper(app_base, target_helper, component_apps, SMExtra, bridge_path):
"""增强Helper
@@ -199,6 +205,7 @@ def main():
componentApp = app.get("componentApp")
onlysh = app.get("onlysh")
SMExtra = app.get("SMExtra")
keygen = app.get("keygen")
local_app = [
local_app
@@ -303,6 +310,11 @@ def main():
["sudo", "pkill", "-f", getAppMainExecutable(app_base_locate)]
)
if keygen is not None:
print("正在注册App...")
handle_keygen(local_app["CFBundleIdentifier"])
continue
# dest = os.path.join(app_base_locate, bridge_file, inject_file)
dest = rf"{app_base_locate}{bridge_file}{inject_file}"
backup = rf"{dest}_backup"
@@ -427,4 +439,4 @@ def main():
if __name__ == "__main__":
main()
main()