Fix ProxyMan

This commit is contained in:
QiuChenly
2024-05-08 19:01:38 +08:00
parent e90e8fd2f4
commit 0f2bcc41a5
6 changed files with 69 additions and 10 deletions

View File

@@ -41,6 +41,23 @@
],
"forQiuChenly": false
},
{
"packageName": "codes.rambo.AirBuddy",
"bridgeFile": "/Contents/MacOS/",
"injectFile": "AirBuddy",
"onlysh": true,
"extraShell": "airbuddy.sh",
"autoHandleHelper": true,
"helperFile": "/Contents/Library/LaunchServices/codes.rambo.AirBuddy.Installer",
"SMExtra": "codes.rambo.AirBuddy",
"needCopyToAppDir": true,
"componentApp": [
"/Contents/Library/LoginItems/AirBuddyHelper.app"
],
"tccutil": [
"All"
]
},
{
"packageName": [
"com.macpaw.CleanMyMac4"
@@ -1101,7 +1118,9 @@
"bridgeFile": "/Contents/MacOS/",
"injectFile": "AirBuddy",
"needCopyToAppDir": true,
"tccutil": true,
"tccutil": [
"All"
],
"noSignTarget": true,
"autoHandleHelper": true,
"helperFile": "/Contents/Library/LaunchServices/codes.rambo.AirBuddy.Installer"
@@ -1112,7 +1131,9 @@
"bridgeFile": "/Contents/MacOS/",
"injectFile": "AirBuddyHelper",
"needCopyToAppDir": true,
"tccutil": true
"tccutil": [
"All"
]
},
{
"packageName": "com.apphousekitchen.aldente-pro",

15
main.py
View File

@@ -68,7 +68,7 @@ def check_compatible(
return False
def handle_helper(app_base, target_helper, component_apps):
def handle_helper(app_base, target_helper, component_apps, SMExtra):
"""增强Helper
Args:
@@ -76,7 +76,7 @@ def handle_helper(app_base, target_helper, component_apps):
target_helper (string): helper文件路径
"""
subprocess.run("chmod +x ./tool/GenShineImpactStarter", shell=True)
subprocess.run(f"./tool/GenShineImpactStarter '{target_helper}'", shell=True)
subprocess.run(f"./tool/GenShineImpactStarter '{target_helper}' {"" if SMExtra is None else SMExtra}", shell=True)
subprocess.run(
f"./tool/insert_dylib '{app_base}/Contents/Frameworks/91QiuChenly.dylib' '{target_helper}' '{target_helper}'",
shell=True,
@@ -195,6 +195,7 @@ def main():
helper_file = app.get("helperFile")
componentApp = app.get("componentApp")
onlysh = app.get("onlysh")
SMExtra = app.get("SMExtra")
local_app = [
local_app
@@ -386,11 +387,17 @@ def main():
if isinstance(helper_file, list):
for helper in helper_file:
handle_helper(
app_base_locate, f"{app_base_locate}{helper}", componentApp
app_base_locate,
f"{app_base_locate}{helper}",
componentApp,
SMExtra,
)
else:
handle_helper(
app_base_locate, f"{app_base_locate}{helper_file}", componentApp
app_base_locate,
f"{app_base_locate}{helper_file}",
componentApp,
SMExtra,
)
if tccutil := tccutil:

Binary file not shown.

Binary file not shown.

25
tool/airbuddy.sh Normal file
View File

@@ -0,0 +1,25 @@
# ./tool/GenShineImpactStarter /Applications/AirBuddy.app/Contents/Library/LaunchServices/codes.rambo.AirBuddy.Installer codes.rambo.AirBuddy
# 检查文件是否存在
if [ ! -f "/Applications/AirBuddy.app/Contents/Library/LaunchServices/codes.rambo.AirBuddy.Installer_backup" ]; then
cp "/Applications/AirBuddy.app/Contents/Library/LaunchServices/codes.rambo.AirBuddy.Installer" "/Applications/AirBuddy.app/Contents/Library/LaunchServices/codes.rambo.AirBuddy.Installer_backup"
fi
# 检查文件是否存在
if [ ! -f "/Applications/AirBuddy.app/Contents/MacOS/AirBuddy_backup" ]; then
cp "/Applications/AirBuddy.app/Contents/MacOS/AirBuddy" "/Applications/AirBuddy.app/Contents/MacOS/AirBuddy_backup"
fi
cp tool/91QiuChenly.dylib /Applications/AirBuddy.app/Contents/MacOS/91QiuChenly.dylib
insert_dylib @executable_path/91QiuChenly.dylib /Applications/AirBuddy.app/Contents/MacOS/AirBuddy_backup /Applications/AirBuddy.app/Contents/MacOS/AirBuddy
codesign -f -s - /Applications/AirBuddy.app/Contents/Library/LaunchServices/codes.rambo.AirBuddy.Installer
codesign -f -s - /Applications/AirBuddy.app/Contents/Library/LoginItems/AirBuddyHelper.app
/usr/libexec/PlistBuddy -c 'Set :SMPrivilegedExecutables:codes.rambo.AirBuddy.Installer identifier \"codes.rambo.AirBuddy.Installer\"' '/Applications/AirBuddy.app/Contents/Info.plist'
codesign -f -s - /Applications/AirBuddy.app
xattr -cr /Applications/AirBuddy.app

View File

@@ -18,16 +18,22 @@ files_cache: dict[str:str] = {}
def main():
if not os.path.exists("/Applications/Termius\\ Beta.app/Contents/Resources/app.asar_副本"):
if not os.path.exists(
"/Applications/Termius\\ Beta.app/Contents/Resources/app.asar_副本"
):
os.system(
"cp /Applications/Termius\\ Beta.app/Contents/Resources/app.asar /Applications/Termius\\ Beta.app/Contents/Resources/app.asar_副本")
"cp /Applications/Termius\\ Beta.app/Contents/Resources/app.asar /Applications/Termius\\ Beta.app/Contents/Resources/app.asar_副本"
)
else:
os.system(
"cp /Applications/Termius\\ Beta.app/Contents/Resources/app.asar_副本 /Applications/Termius\\ Beta.app/Contents/Resources/app.asar")
"cp /Applications/Termius\\ Beta.app/Contents/Resources/app.asar_副本 /Applications/Termius\\ Beta.app/Contents/Resources/app.asar"
)
os.system("rm -rf /Applications/Termius\\ Beta.app/Contents/Resources/app")
# 防止自动更新
os.system("rm -rf /Applications/Termius\\ Beta.app/Contents/Resources/app-update.yml")
os.system(
"rm -rf /Applications/Termius\\ Beta.app/Contents/Resources/app-update.yml"
)
if not path.exists("/Applications/Termius Beta.app/Contents/Resources/app"):
decompressAsar()