mirror of
https://git-qiuchenly.yltfspace.com/QiuChenly/corepatch
synced 2025-11-25 23:52:24 +08:00
Add: Upcoming Keygen
This commit is contained in:
16
config.json
16
config.json
@@ -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
14
main.py
@@ -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()
|
||||
Reference in New Issue
Block a user