我首先是跟着资料做的,途中,有很多的地址已经失效了,我换成了经过实践后有效的链接,这篇博客是根据记忆来的,未经实践,如有不对的地方,欢迎指正
新建个目录放要下载的文件
mkdir /data/home/ly-deepin/soft
去官网下载
官网下载地址:http://www.navicat.com.cn/download/navicat-premium ,页面关于linux下载的区域如下:
cd /data/home/ly-deepin/soft
wget http://www.navicat.com.cn/download/direct-download?product=navicat15-premium-cs.AppImage&location=1
解压
创建一个临时目录
mkdir /data/home/ly-deepin/soft/navicatemp
sudo mount -o loop /data/home/ly-deepin/soft/navicat15-premium-cs.AppImage /data/home/ly-deepin/soft/navicatemp
cp -r /data/home/ly-deepin/soft/navicatemp /data/home/ly-deepin/soft/navicat
sudo umount /data/home/ly-deepin/soft/navicatemp
rm -rf /data/home/ly-deepin/soft/navicatemp
执行完成以后,/data/home/ly-deepin/soft/navicat就是解压好的目录了
编译patcher和keygen
这里就不再制定路径了,自己决定下载和生成的路径,这一步的最终目的是生成bin目录下的两个文件
参考:https://gitee.com/andisolo/navicat-keygen/blob/linux/doc/how-to-build.zh-CN.md
准备编译需要的一些工具:
# install capstone $ sudo apt-get install libcapstone-dev # install keystone $ sudo apt-get install cmake $ git clone https://github.com/keystone-engine/keystone.git $ cd keystone $ mkdir build $ cd build $ ../make-share.sh $ sudo make install $ sudo ldconfig # install rapidjson $ sudo apt-get install rapidjson-dev # install openssl $ sudo apt-get install openssl
$ sudo apt install libssl-dev
$ sudo apt-get install -y build-essential
git clone -b linux --single-branch https://gitee.com/andisolo/navicat-keygen.git cd navicat-keygen make all
以上完成后会在 bin/
文件夹下看到编译后的keygen/patcher
使用 navicat-patcher
替换官方公钥
./bin/navicat-patcher /data/home/ly-deepin/soft/navicat
样例输出:
********************************************************** * Navicat Patcher (Linux) by @DoubleLabyrinth * * Version: 1.0 * ********************************************************** Press ENTER to continue or Ctrl + C to abort. [+] Try to open libcc.so ... Ok! [+] PatchSolution0 ...... Ready to apply RefSegment = 1 MachineCodeRva = 0x0000000001413e10 PatchMarkOffset = +0x00000000029ecf40 [*] Generating new RSA private key, it may take a long time... [*] Your RSA private key: -----BEGIN RSA PRIVATE KEY----- MIIEowIBAAKCAQEArRsg1+6JZxZNMhGyuM8d+Ue/ky9LSv/XyKh+wppQMS5wx7QE XFcdDgaByNZeLMenh8sgungahWbPo/5jmkDuuHHrVMU748q2JLL1E3nFraPZqoRD ... ... B1Z5AoGBAK8cWMvNYf1pfQ9w6nD4gc3NgRVYLctxFLmkGylqrzs8faoLLBkFq3iI s2vdYwF//wuN2aq8JHldGriyb6xkDjdqiEk+0c98LmyKNmEVt8XghjrZuUrn8dA0 0hfInLdRpaB7b+UeIQavw9yLH0ilijAcMkGzzom7vdqDPizoLpXQ -----END RSA PRIVATE KEY----- [*] Your RSA public key: -----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArRsg1+6JZxZNMhGyuM8d +Ue/ky9LSv/XyKh+wppQMS5wx7QEXFcdDgaByNZeLMenh8sgungahWbPo/5jmkDu ... ... GrVJ3o8aDm35EzGymp4ON+A0fdAkweqKV6FqxEJqLWIDRYh+Z01JXUZIrKmnCkgf QQIDAQAB -----END PUBLIC KEY----- ******************************************************* * PatchSolution0 * ******************************************************* [*] Previous: +0x0000000000000070 01 00 00 00 05 00 00 00 ........ +0x0000000000000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0x0000000000000090 00 00 00 00 00 00 00 00 40 cf 9e 02 00 00 00 00 ........@....... +0x00000000000000a0 40 cf 9e 02 00 00 00 00 00 10 00 00 00 00 00 00 @............... [*] After: +0x0000000000000070 01 00 00 00 05 00 00 00 ........ +0x0000000000000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0x0000000000000090 00 00 00 00 00 00 00 00 d0 d0 9e 02 00 00 00 00 ................ +0x00000000000000a0 d0 d0 9e 02 00 00 00 00 00 10 00 00 00 00 00 00 ................ [*] Previous: +0x00000000029ecf40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0x00000000029ecf50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0x00000000029ecf60 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ ... ... +0x00000000029ed0c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ [*] After: +0x00000000029ecf40 ef be ad de 4d 49 49 42 49 6a 41 4e 42 67 6b 71 ....MIIBIjANBgkq +0x00000000029ecf50 68 6b 69 47 39 77 30 42 41 51 45 46 41 41 4f 43 hkiG9w0BAQEFAAOC +0x00000000029ecf60 41 51 38 41 4d 49 49 42 43 67 4b 43 41 51 45 41 AQ8AMIIBCgKCAQEA ... ... ... +0x00000000029ed0c0 43 6b 67 66 51 51 49 44 41 51 41 42 ad de ef be CkgfQQIDAQAB.... [*] Previous: +0x0000000001413e10 44 0f b6 24 18 48 8b 44 24 28 8b 50 f8 85 d2 79 D..$.H.D$(.P...y +0x0000000001413e20 6f o [*] After: +0x0000000001413e10 45 31 e4 48 8d 05 2a 91 5d 01 90 90 90 90 90 90 E1.H..*.]....... +0x0000000001413e20 90 . [*] New RSA-2048 private key has been saved to /home/doublesine/github.com/navicat-keygen/RegPrivateKey.pem ******************************************************* * PATCH HAS BEEN DONE SUCCESSFULLY! * * HAVE FUN AND ENJOY~ * *******************************************************
将文件重新打包:
$ wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage$ chmod +x appimagetool-x86_64.AppImage
$ ./appimagetool-x86_64.AppImage /data/home/ly-deepin/soft/navicat /data/home/ly-deepin/soft/navicat15-premium-cs.AppImage
运行刚生成的.AppImage:
$ chmod +x /data/home/ly-deepin/soft/navicat15-premium-cs.AppImage
$ /data/home/ly-deepin/soft/navicat15-premium-cs.AppImage
使用navicat-keygen生成序列号和激活码
$ ./bin/navicat-keygen --text ./RegPrivateKey.pem
你会被要求选择Navicat产品类别、Navicat语言版本和填写主版本号。之后一个随机生成的 序列号 将会给出。
$ ./bin/navicat-keygen --text ./RegPrivateKey.pem ********************************************************** * Navicat Keygen (Linux) by @DoubleLabyrinth * * Version: 1.0 * ********************************************************** [*] Select Navicat product: 0. DataModeler 1. Premium 2. MySQL 3. PostgreSQL 4. Oracle 5. SQLServer 6. SQLite 7. MariaDB 8. MongoDB 9. ReportViewer (Input index)> 1 [*] Select product language: 0. English 1. Simplified Chinese 2. Traditional Chinese 3. Japanese 4. Polish 5. Spanish 6. French 7. German 8. Korean 9. Russian 10. Portuguese (Input index)> 0 [*] Input major version number: (range: 0 ~ 15, default: 12)> 15 [*] Serial number: NAVM-RTVJ-EO42-IODD [*] Your name:
[*] Your name: DoubleLabyrinth
[*] Your organization: DoubleLabyrinth
[*] Input request code in Base64: (Double press ENTER to end)
到了这一步后断开网络,在navicat页面找到激活,然后输入上方的序列号点击激活,通常会提示失败,然后点击手动激活,
复制 请求码 到keygen,连按两次回车结束
[*] Input request code in Base64: (Double press ENTER to end) OaGPC3MNjJ/pINbajFzLRkrV2OaSXYLr2tNLDW0fIthPOJQFXr84OOroCY1XN8R2xl2j7epZ182PL6q+BRaSC6hnHev/cZwhq/4LFNcLu0T0D/QUhEEBJl4QzFr8TlFSYI1qhWGLIxkGZggA8vMLMb/sLHYn9QebBigvleP9dNCS4sO82bilFrKFUtq3ch8r7V3mbcbXJCfLhXgrHRvT2FV/s1BFuZzuWZUujxlp37U6Y2PFD8fQgsgBUwrxYbF0XxnXKbCmvtgh2yaB3w9YnQLoDiipKp7io1IxEFMYHCpjmfTGk4WU01mSbdi2OS/wm9pq2Y62xvwawsq1WQJoMg== [*] Request Info: {"K":"NAVMRTVJEO42IODD", "DI":"4A12F84C6A088104D23E", "P":"linux"} [*] Response Info: {"K":"NAVMRTVJEO42IODD","DI":"4A12F84C6A088104D23E","N":"DoubleLabyrinth","O":"DoubleLabyrinth","T":1575543648} [*] Activation Code: i45HIr7T1g69Cm9g3bN1DBpM/Zio8idBw3LOFGXFQjXj0nPfy9yRGuxaUBQkWXSOWa5EAv7S9Z1sljlkZP6cKdfDGYsBb/4N1W5Oj1qogzNtRo5LGwKe9Re3zPY3SO8RXACfpNaKjdjpoOQa9GjQ/igDVH8r1k+Oc7nEnRPZBm0w9aJIM9kS42lbjynVuOJMZIotZbk1NloCodNyRQw3vEEP7kq6bRZsQFp2qF/mr+hIPH8lo/WF3hh+2NivdrzmrKKhPnoqSgSsEttL9a6ueGOP7Io3j2lAFqb9hEj1uC3tPRpYcBpTZX7GAloAENSasFwMdBIdszifDrRW42wzXw==
最终你会得到一个base64编码的 激活码。
将之复制到 手动激活
的窗口,然后点击 激活
。
如果没有什么意外,应该可以成功激活。
清理:
$ rm /data/home/ly-deepin/soft/*.AppImage
$ rm -rf /data/home/ly-deepin/soft/navicat
声明:最后别忘了再连上网...
参考页面:
https://gitee.com/andisolo/navicat-keygen
https://gitee.com/andisolo/navicat-keygen/blob/linux/doc/how-to-build.zh-CN.md
https://github.com/AppImage/AppImageKit