mac无限刷新navicat试用时间

1.必看

原理就是删除一些文件,记录时间重置。建议买正版,禁止商用。

2.代码

Lua 复制代码
#!/bin/bash

set -e

file=$(defaults read /Applications/Navicat\ Premium.app/Contents/Info.plist)

regex="CFBundleShortVersionString = \"([^\.]+)"
[[ $file =~ $regex ]]

version=${BASH_REMATCH[1]}

echo "Detected Navicat Premium version $version"

case $version in
    "17")
        file=~/Library/Preferences/com.navicat.NavicatPremium.plist
        ;;
    "16")
        file=~/Library/Preferences/com.navicat.NavicatPremium.plist
        ;;
    "15")
        file=~/Library/Preferences/com.prect.NavicatPremium15.plist
        ;;
    *)
        echo "Version '$version' not handled"
        exit 1
        ;;
esac

echo -n "Reseting trial time..."

regex="([0-9A-Z]{32}) = "
[[ $(defaults read $file) =~ $regex ]]

hash=${BASH_REMATCH[1]}

if [ ! -z $hash ]; then
    defaults delete $file $hash
fi

regex="\.([0-9A-Z]{32})"
[[ $(ls -a ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/ | grep '^\.') =~ $regex ]]

hash2=${BASH_REMATCH[1]}

if [ ! -z $hash2 ]; then
    rm ~/Library/Application\ Support/PremiumSoft\ CyberTech/Navicat\ CC/Navicat\ Premium/.$hash2
fi

echo " Done"

3.使用

新增一个文件,名字随便起,把上面脚本贴进去,授权,执行就可以刷新了。

我文件名字:jihuo.sh

授权:chmod 777 jihuo.sh

执行:sh jihuo.sh 或者 ./jihuo.sh

相关推荐
牛奔5 小时前
Go语言中结构体转Map优雅实现
开发语言·后端·macos·golang·xcode
依旧风轻8 小时前
NSTimer的运行机制
macos·objective-c·cocoa·nstimer
恋猫de小郭13 小时前
Compose Multiplatform 1.10 Interop views 新特性:Overlay 和 Autosizing
android·flutter·macos·kotlin·github·objective-c·cocoa
加油_Yeah14 小时前
Mac 科研/论文专用快捷键(Word + LaTeX + Finder) 与文件管理
macos·编辑器·word
ZhangBlossom14 小时前
Freqtrade 新人上手教程(macOS + Docker,无需 docker-compose)
macos·docker·容器
古城小栈14 小时前
Rust 交叉编译:MacOS ====> Linux (musl 静态编译)
linux·macos·rust
2501_9159214314 小时前
360移动端性能监控实践QDAS-APM(iOS篇)
android·macos·ios·小程序·uni-app·cocoa·iphone
开开心心_Every1 天前
多端免费远程控制工具:4K流畅同账号直连
游戏·macos·微信·pdf·excel·语音识别·phpstorm
ha_lydms1 天前
在iCloud、Onedrive等云文件夹中开启超级右键菜单
macos·onedrive·icloud·超级右键·better365
我不是稻草人1 天前
Centos共享Mac文件
linux·macos·centos