marlkiller / dylib_dobby_hook

A macOS dylib project , aimed at enhancing and extending the functionality of target software.
MIT License
244 stars 73 forks source link

tableplus Version 6.1.6 (570) 破解失败 #36

Closed xbloom closed 1 month ago

xbloom commented 1 month ago

彦祖们,失败了啊。

brew默认安装tableplus 570。破解后程序可以打开,tab页只能2页,workspace能多开。

然后手工下载了多个低版本来试,都失败了,连workspace也不能多开了 下载地址是:https://files.tableplus.com/macos/570/TablePlus.dmg 直接改版号下载。

最后想想算了,570也不是不能用,结果连workspace也不行了。

我的机器是 mac mini intel,系统 sonoma。

marlkiller commented 1 month ago

Version 6.1.8 (574) 测试可用; MacBook Pro 2.6 GHz 六核Intel Core i7 | SIP OFF

拉去最新代码, 提供下脚本注入日志

xbloom commented 1 month ago

结果还是失败,机器是mac mini 2018 intel cpu i5, macOS sonoma 14.5 ,SIP disbled

image image image

`❯ sudo ./auto_hack.sh

💉💉💉 dylib_dobby_hook Injector 🚀🚀🚀

🤖 Injection Start...

🔍 Do you want to search for apps with Paddle.framework? (Y/N): y 🔍 Starting search for Paddle.framework apps... 🔍 Found Paddle app: iStat Menus ✅ [TablePlus 6.1.8 (com.tinyapp.TablePlus)] exists, wanna inject? (Y/N): y

🚀 [TablePlus] - dylib_dobby_hook Injection starting... 🔎 app_name: TablePlus 🔎 app_bundle_framework: /Applications/TablePlus.app/Contents/Frameworks/ 🔎 app_executable_path: /Applications/TablePlus.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle ⛔️ Checking the insert_dylib quarantine status... /Applications/TablePlus.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle already exists. Overwrite it? [y/n] y Binary is a fat binary with 2 archs. LC_CODE_SIGNATURE load command found. Remove it? [y/n] y LC_CODE_SIGNATURE load command found. Remove it? [y/n] y Added LC_LOAD_WEAK_DYLIB to all archs in /Applications/TablePlus.app/Contents/Frameworks/Sparkle.framework/Versions/B/Sparkle 🔍 Checking code signature before re-signing Executable=/Applications/TablePlus.app/Contents/MacOS/TablePlus designated => anchor apple generic and identifier "com.tinyapp.TablePlus" and (certificate leaf[field.1.2.840.113635.100.6.1.9] / exists / or certificate 1[field.1.2.840.113635.100.6.2.6] / exists / and certificate leaf[field.1.2.840.113635.100.6.1.13] / exists / and certificate leaf[subject.OU] = "3X57WP8E8V") 🔏 Re-signing TablePlus... /Applications/TablePlus.app: replacing existing signature 🔍 Checking code signature after re-signing Executable=/Applications/TablePlus.app/Contents/MacOS/TablePlus

designated => cdhash H"a9a99a0a7bae64805a86e08224746892a68e2c54" or cdhash H"eec0f7252c89013da3378cb9bda04fc8dec9151e"

🔧 [TablePlus] - Resigned. ✅ [TablePlus] - dylib_dobby_hook Injection completed successfully. ✅ [iStat Menus 6.73 (com.bjango.istatmenus)] exists, wanna inject? (Y/N): n 😒 App skipped on user demand.`

marlkiller commented 1 month ago

检查 /Applications/TablePlus.app/Contents/Frameworks/libdylib_dobby_hook.dylib 文件是否存在; 检查 项目下 dylib_dobby_hook/release/libdylib_dobby_hook.dylib 文件是否存在 命令行执行 TablePlus , 看看日志, 启动日志就可以

xbloom commented 1 month ago

dylib在的,也顺利加载,以下日志

2024-10-14 20:46:16.983 TablePlus[29211:3398717] >>>>>> dylib_dobby_hook load
2024-10-14 20:46:16.984 TablePlus[29211:3398717] >>>>>> Constant initialize
2024-10-14 20:46:16.984 TablePlus[29211:3398717] >>>>>> DobbyGetVersion: Dobby-2024.05.21-b0176de
2024-10-14 20:46:16.988 TablePlus[29211:3398717] >>>>>> AppName is [com.tinyapp.TablePlus],Version is [6.1.8], myAppCFBundleVersion is [574].
2024-10-14 20:46:16.988 TablePlus[29211:3398717] >>>>>> App Architecture is: x86_64
2024-10-14 20:46:16.989 TablePlus[29211:3398717] >>>>>> App DebuggerAttached is: 0
2024-10-14 20:46:16.989 TablePlus[29211:3398717] >>>>>> plistPath is (null)
2024-10-14 20:46:16.989 TablePlus[29211:3398717] >>>>>> NSUserDefaultsPath is /Users/devs/Library/Preferences/com.tinyapp.TablePlus.plist
2024-10-14 20:46:16.989 TablePlus[29211:3398717] >>>>>> [app bundlePath] /Applications/TablePlus.app
2024-10-14 20:46:16.990 TablePlus[29211:3398717] >>>>>> Is current application canShowAlert: NO
2024-10-14 20:46:17.029 TablePlus[29211:3398717] >>>>>> Constant: Initiating doHack operation...
2024-10-14 20:46:17.029 TablePlus[29211:3398717] >>>>>> Constant: Processing class - iStat7Hack
2024-10-14 20:46:17.029 TablePlus[29211:3398717] >>>>>> Constant: Processing class - TransmitHack
2024-10-14 20:46:17.029 TablePlus[29211:3398717] >>>>>> Constant: Processing class - TablePlusHack
2024-10-14 20:46:17.029 TablePlus[29211:3398717] >>>>>> License file path: /Users/devs/Library/Application Support/com.tinyapp.TablePlus/.licensemac
2024-10-14 20:46:17.030 TablePlus[29211:3398717] >>>>>> License file: 1
>>>>>> Constant ((constructor)) initialize(void)
2024-10-14 20:46:17.212 TablePlus[29211:3398717] >>>>>> called - ret1
2024-10-14 20:46:17.516 TablePlus[29211:3398727] >>>>>> [hk_dataTaskWithHTTPMethod] Intercept url: https://events.tableplus.com/v1/events, req params: {
    action = Startup;
    build = 574;
    category = interaction;
    client = 1;
    "client_key" = VEMOjpX94ho6ws5Gr4wIZ9K7WjZfHZdUhPaNvoNsJsG4A2lrQkQkmJR0tscKOE0v;
    "cpu_arch" = "x86_64";
    "device_id" = d35d38b5f74bb21f247e1ef595e9a0b2;
    "device_model" = "Macmini8,1";
    locale = "zh_CN";
    os = macos;
    "os_version" = "14.5.0";
    sig = "AwFYL5GEXiPgKe2WMFCdPrEe9EB6JhS8eljZqii9vwUtn8xhZXlcHWyUzoqJfvPuCjOc//5zmbFDIncSnQm1mp/99HYNAMEx+5pl5V6Iz0JzWA==";
    type = session;
}
2024-10-14 20:46:17.516 TablePlus[29211:3398727] >>>>>> DummyURLSessionDataTask.resume
2024-10-14 20:46:17.516 TablePlus[29211:3398717] >>>>>> [hk_dataTaskWithHTTPMethod] Intercept url: https://tableplus.com/v1/apps/osx/tableplus, req params: (null)
2024-10-14 20:46:17.516 TablePlus[29211:3398717] >>>>>> DummyURLSessionDataTask.resume
2024-10-14 20:46:17.626 TablePlus[29211:3398717] >>>>>> [hk_dataTaskWithHTTPMethod] Intercept url: https://events.tableplus.com/v1/events, req params: {
    action = "Become active";
    build = 574;
    category = interaction;
    client = 1;
    "client_key" = VEMOjpX94ho6ws5Gr4wIZ9K7WjZfHZdUhPaNvoNsJsG4A2lrQkQkmJR0tscKOE0v;
    "cpu_arch" = "x86_64";
    "device_id" = d35d38b5f74bb21f247e1ef595e9a0b2;
    "device_model" = "Macmini8,1";
    locale = "zh_CN";
    os = macos;
    "os_version" = "14.5.0";
    sig = "AwGT3HOMCoC1MSDJ7z8HnFLHeyA8QCX0lkP0980uT6tVtsOusYlSUJMLw1+fydeuUT1/tC4u/Pvqv6rlUkvo34+EaMELgYzzG6/Uc801vc80pg==";
    type = session;
}
2024-10-14 20:46:17.626 TablePlus[29211:3398717] >>>>>> DummyURLSessionDataTask.resume
marlkiller commented 1 month ago

可能是设备 id 的计算不适配 mac mini;

你可以手动把 函数 [EncryptionUtils generateTablePlusDeviceId] 返回值改成 d35d38b5f74bb21f247e1ef595e9a0b2; 试试

xbloom commented 1 month ago

改了TablePlusHack.m文件,写死 [result setObject:@"d35d38b5f74bb21f247e1ef595e9a0b2" forKey:@"DeviceID"]; 执行build.sh。删除app,重新安装,再script/auto_hack.sh。 还是g了。毁灭吧。

marlkiller commented 1 month ago

改了TablePlusHack.m文件,写死 [result setObject:@"d35d38b5f74bb21f247e1ef595e9a0b2" forKey:@"DeviceID"]; 执行build.sh。删除app,重新安装,再script/auto_hack.sh。 还是g了。毁灭吧。

直接写死函数 [EncryptionUtils generateTablePlusDeviceId] 就行; 代码里有俩个对方用到了;

xbloom commented 1 month ago

成功了!彦祖太感谢你了! 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 我漏改了一处。写死deviceid有效。可以考虑用shell grep出id,咱不用自己算了。 再次感谢。

marlkiller commented 1 month ago

成功了!彦祖太感谢你了! 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉 我漏改了一处。写死deviceid有效。可以考虑用shell grep出id,咱不用自己算了。 再次感谢。

你看看下面脚本输出的 跟你的 deviceid 是否匹配; 有空改一下算法;

    mac=$(networksetup -getmacaddress en0| grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}')
    Serial=$(system_profiler SPHardwareDataType | grep Serial | awk '{print $4}')
    deviceID=$(echo -n "${mac}${Serial}" | md5)
    echo $deviceID
xbloom commented 1 month ago

一致的哦,算的没错。

mac=$(networksetup -getmacaddress en0| grep -o -E '([[:xdigit:]]{1,2}:){5}[[:xdigit:]]{1,2}') Serial=$(system_profiler SPHardwareDataType | grep Serial | awk '{print $4}') deviceID=$(echo -n "${mac}${Serial}" | md5) echo $deviceID

marlkiller commented 1 month ago

closed: https://github.com/marlkiller/dylib_dobby_hook/commit/269185228557de3ce758f7fc042609d0cc9041ff#diff-db55d144192367b8baa9b67814e9ee4a601a1f3081a6cba98d44482f80097d8aR49