惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
The GitHub Blog
The GitHub Blog
T
Threatpost
人人都是产品经理
人人都是产品经理
大猫的无限游戏
大猫的无限游戏
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
博客园 - Franky
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Apple Machine Learning Research
Apple Machine Learning Research
酷 壳 – CoolShell
酷 壳 – CoolShell
M
MIT News - Artificial intelligence
小众软件
小众软件
Hugging Face - Blog
Hugging Face - Blog
云风的 BLOG
云风的 BLOG
S
Security Affairs
P
Proofpoint News Feed
L
LINUX DO - 最新话题
宝玉的分享
宝玉的分享
S
Security @ Cisco Blogs
H
Hacker News: Front Page
Security Archives - TechRepublic
Security Archives - TechRepublic
Vercel News
Vercel News
Engineering at Meta
Engineering at Meta
Know Your Adversary
Know Your Adversary
Y
Y Combinator Blog
美团技术团队
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
月光博客
月光博客
量子位
博客园_首页
The Last Watchdog
The Last Watchdog
D
DataBreaches.Net
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
The Register - Security
The Register - Security
Schneier on Security
Schneier on Security
H
Help Net Security
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
Visual Studio Blog
Google DeepMind News
Google DeepMind News
F
Full Disclosure
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
aimingoo的专栏
aimingoo的专栏
S
Schneier on Security
L
Lohrmann on Cybersecurity
S
Secure Thoughts
Stack Overflow Blog
Stack Overflow Blog
Cloudbric
Cloudbric
Microsoft Security Blog
Microsoft Security Blog

jobcher on 打工人日志

2023-12-21 打工人日报 2023-12-20 打工人日报 2023-12-19 打工人日报 2023-12-18 打工人日报 2023-12-17 打工人日报 2023-12-16 打工人日报 2023-12-15 打工人日报 2023-12-14 打工人日报 2023-12-13 打工人日报 2023-12-12 打工人日报 2023-12-11 打工人日报 2023-12-10 打工人日报 2023-12-09 打工人日报 2023-12-08 打工人日报 2023-12-07 打工人日报 2023-12-06 打工人日报 2023-12-05 打工人日报 2023-12-04 打工人日报 2023-12-03 打工人日报 2023-12-02 打工人日报 2023-12-01 打工人日报 2023-11-30 打工人日报 2023-11-29 打工人日报 2023-11-28 打工人日报 2023-11-27 打工人日报 2023-11-26 打工人日报 2023-11-25 打工人日报 2023-11-24 打工人日报 2023-11-23 打工人日报 2023-11-22 打工人日报 2023-11-21 打工人日报 2023-11-20 打工人日报 2023-11-19 打工人日报 2023-11-17 打工人日报 2023-11-16 打工人日报 2023-11-15 打工人日报 2023-11-14 打工人日报 2023-11-13 打工人日报 2023-11-12 打工人日报 2023-11-11 打工人日报 2023-11-10 打工人日报 2023-11-09 打工人日报 2023-11-08 打工人日报 2023-11-07 打工人日报 2023-11-06 打工人日报 2023-11-05 打工人日报 2023-11-04 打工人日报 2023-11-03 打工人日报 2023-11-02 打工人日报 2023-11-01 打工人日报 2023-10-31 打工人日报 2023-10-30 打工人日报 2023-10-29 打工人日报 2023-10-28 打工人日报 2023-10-27 打工人日报 2023-10-26 打工人日报 2023-10-25 打工人日报 2023-10-24 打工人日报 2023-10-23 打工人日报 2023-10-22 打工人日报 2023-10-21 打工人日报 2023-10-20 打工人日报 2023-10-19 打工人日报 2023-10-18 打工人日报 2023-10-17 打工人日报 2023-10-16 打工人日报 2023-10-15 打工人日报 2023-10-14 打工人日报 2023-10-13 打工人日报 2023-10-12 打工人日报 2023-10-11 打工人日报 2023-10-10 打工人日报 2023-10-09 打工人日报 2023-10-07 打工人日报 2023-10-06 打工人日报 2023-10-05 打工人日报 2023-10-04 打工人日报 2023-10-03 打工人日报 2023-10-02 打工人日报 2023-10-01 打工人日报 2023-09-30 打工人日报 2023-09-29 打工人日报 2023-09-28 打工人日报 2023-09-27 打工人日报 2023-09-26 打工人日报 2023-09-25 打工人日报 2023-09-24 打工人日报 2023-09-23 打工人日报 2023-09-22 打工人日报 2023-09-21 打工人日报 2023-09-20 打工人日报 2023-09-19 打工人日报 2023-09-18 打工人日报 2023-09-17 打工人日报 2023-09-16 打工人日报 2023-09-15 打工人日报 2023-09-14 打工人日报 2023-09-13 打工人日报 2023-09-12 打工人日报 2023-09-11 打工人日报
Navicat 查看导出连接的密码 | navicat查看密码方案
2022-02-08 · via jobcher on 打工人日志

解决问题:

我们经常使用 navicat 连接数据库,有时候时间久了之后,会忘记之前的密码,那么现在我们有办法获得只要正常连接的数据库的密码

步骤:

  1. 导出连接 connections.ncx,拿到保存到本地的 connections.ncx 文件中的 Password,粘贴到下面的代码中
  2. 登陆https://tool.lu/coderunner/,使用 PHP 在线运行工具,粘贴下面添加密码后的代码
    备用工具网址(https://zixuephp.net/tool-runcode.html)
  1<?php
  2class NavicatPassword
  3{
  4    protected $version = 0;
  5    protected $aesKey = 'libcckeylibcckey';
  6    protected $aesIv = 'libcciv libcciv ';
  7    protected $blowString = '3DC5CA39';
  8    protected $blowKey = null;
  9    protected $blowIv = null;
 10
 11    public function __construct($version = 12)
 12    {
 13        $this->version = $version;
 14        $this->blowKey = sha1('3DC5CA39', true);
 15        $this->blowIv = hex2bin('d9c7c3c8870d64bd');
 16    }
 17
 18    public function encrypt($string)
 19    {
 20        $result = FALSE;
 21        switch ($this->version) {
 22            case 11:
 23                $result = $this->encryptEleven($string);
 24                break;
 25            case 12:
 26                $result = $this->encryptTwelve($string);
 27                break;
 28            default:
 29                break;
 30        }
 31
 32        return $result;
 33    }
 34
 35    protected function encryptEleven($string)
 36    {
 37        $round = intval(floor(strlen($string) / 8));
 38        $leftLength = strlen($string) % 8;
 39        $result = '';
 40        $currentVector = $this->blowIv;
 41
 42        for ($i = 0; $i < $round; $i++) {
 43            $temp = $this->encryptBlock($this->xorBytes(substr($string, 8 * $i, 8), $currentVector));
 44            $currentVector = $this->xorBytes($currentVector, $temp);
 45            $result .= $temp;
 46        }
 47
 48        if ($leftLength) {
 49            $currentVector = $this->encryptBlock($currentVector);
 50            $result .= $this->xorBytes(substr($string, 8 * $i, $leftLength), $currentVector);
 51        }
 52
 53        return strtoupper(bin2hex($result));
 54    }
 55
 56    protected function encryptBlock($block)
 57    {
 58        return openssl_encrypt($block, 'BF-ECB', $this->blowKey, OPENSSL_RAW_DATA|OPENSSL_NO_PADDING);
 59    }
 60
 61    protected function decryptBlock($block)
 62    {
 63        return openssl_decrypt($block, 'BF-ECB', $this->blowKey, OPENSSL_RAW_DATA|OPENSSL_NO_PADDING);
 64    }
 65
 66    protected function xorBytes($str1, $str2)
 67    {
 68        $result = '';
 69        for ($i = 0; $i < strlen($str1); $i++) {
 70            $result .= chr(ord($str1[$i]) ^ ord($str2[$i]));
 71        }
 72
 73        return $result;
 74    }
 75
 76    protected function encryptTwelve($string)
 77    {
 78        $result = openssl_encrypt($string, 'AES-128-CBC', $this->aesKey, OPENSSL_RAW_DATA, $this->aesIv);
 79        return strtoupper(bin2hex($result));
 80    }
 81
 82    public function decrypt($string)
 83    {
 84        $result = FALSE;
 85        switch ($this->version) {
 86            case 11:
 87                $result = $this->decryptEleven($string);
 88                break;
 89            case 12:
 90                $result = $this->decryptTwelve($string);
 91                break;
 92            default:
 93                break;
 94        }
 95
 96        return $result;
 97    }
 98
 99    protected function decryptEleven($upperString)
100    {
101        $string = hex2bin(strtolower($upperString));
102
103        $round = intval(floor(strlen($string) / 8));
104        $leftLength = strlen($string) % 8;
105        $result = '';
106        $currentVector = $this->blowIv;
107
108        for ($i = 0; $i < $round; $i++) {
109            $encryptedBlock = substr($string, 8 * $i, 8);
110            $temp = $this->xorBytes($this->decryptBlock($encryptedBlock), $currentVector);
111            $currentVector = $this->xorBytes($currentVector, $encryptedBlock);
112            $result .= $temp;
113        }
114
115        if ($leftLength) {
116            $currentVector = $this->encryptBlock($currentVector);
117            $result .= $this->xorBytes(substr($string, 8 * $i, $leftLength), $currentVector);
118        }
119
120        return $result;
121    }
122
123    protected function decryptTwelve($upperString)
124    {
125        $string = hex2bin(strtolower($upperString));
126        return openssl_decrypt($string, 'AES-128-CBC', $this->aesKey, OPENSSL_RAW_DATA, $this->aesIv);
127    }
128};
129
130
131//需要指定navacat版本两种,11或12
132$navicatPassword = new NavicatPassword(12);
133
134//解密,括号里面写入navicat加密后的密码
135$decode = $navicatPassword->decrypt('E75BF077AB8BAA3AC2D5');
136echo $decode."\n";
137?>
  1. 点击执行之后,就会得到真实密码