236 字
1 分钟
破解Termius
Termius一定要登录才能使用,而我在公共的机器上显然不想登录。
安装前置
确保安装了npm
(https://nodejs.org),然后安装`asar`:
npm config set registry http://mirrors.cloud.tencent.com/npm/npm install -g asar
解包
cd C:\Users\[XXXXX]\AppData\Local\Programs\Termius\resourcesnpx asar extract app.asar ./app # 不用重新打包mv app.asar app.asar.bkmv app-update.yml app-update.ym.bk # 防止自动更新
修改代码
使用VSCode
打开app
文件夹,安装插件后,搜索await this.api.bulkAccount
,最终会定位到app/background-process/assets/main-xxxxxxx.js
文件。
使用prettier
对该文件进行format,把const e=await this.api.bulkAccount();
改为var ...
,然后添加:
var e=await this.api.bulkAccount();e.account.pro_mode=true;e.account.need_to_update_subscription=false;e.account.current_period={ "from": "2022-01-01T00:00:00", "until": "2099-01-01T00:00:00"};e.account.plan_type="Premium";e.account.user_type="Premium";e.student=null;e.trial=null;e.account.authorized_features.show_trial_section=false;e.account.authorized_features.show_subscription_section=true;e.account.authorized_features.show_github_account_section=false;e.account.expired_screen_type=null;e.personal_subscription={ "now": new Date().toISOString().slice(0, -5), "status": "SUCCESS", "platform": "stripe", "current_period": { "from": "2022-01-01T00:00:00", "until": "2099-01-01T00:00:00" }, "revokable": true, "refunded": false, "cancelable": true, "reactivatable": false, "currency": "usd", "created_at": "2022-01-01T00:00:00", "updated_at": new Date().toISOString().slice(0, -5), "valid_until": "2099-01-01T00:00:00", "auto_renew": true, "price": 12.0, "verbose_plan_name": "Termius Pro Monthly", "plan_type": "SINGLE", "is_expired": false};e.access_objects=[{ "period": { "start": "2022-01-01T00:00:00", "end": "2099-01-01T00:00:00" }, "title": "Pro"}]return .......
使用
启动Termius
然后登录,自动有pro权限,登出后也不需要再次登录。