当前位置:网站首页>Navicat premium view password scheme
Navicat premium view password scheme
2022-06-25 12:29:00 【Yu Qin】
Regular use Navicat Premium Connect to database , Sometimes I forget my password , You can obtain the password through the following two steps :
One . Export connection
1: Select the database where you want to get the password

Two : Get the saved to local connections.ncx In the document Password
Three decryption password
<?php
class NavicatPassword
{
protected $version = 0;
protected $aesKey = 'libcckeylibcckey';
protected $aesIv = 'libcciv libcciv ';
protected $blowString = '3DC5CA39';
protected $blowKey = null;
protected $blowIv = null;
public function __construct($version = 12)
{
$this->version = $version;
$this->blowKey = sha1('3DC5CA39', true);
$this->blowIv = hex2bin('d9c7c3c8870d64bd');
}
public function encrypt($string)
{
$result = FALSE;
switch ($this->version) {
case 11:
$result = $this->encryptEleven($string);
break;
case 12:
$result = $this->encryptTwelve($string);
break;
default:
break;
}
return $result;
}
protected function encryptEleven($string)
{
$round = intval(floor(strlen($string) / 8));
$leftLength = strlen($string) % 8;
$result = '';
$currentVector = $this->blowIv;
for ($i = 0; $i < $round; $i++) {
$temp = $this->encryptBlock($this->xorBytes(substr($string, 8 * $i, 8), $currentVector));
$currentVector = $this->xorBytes($currentVector, $temp);
$result .= $temp;
}
if ($leftLength) {
$currentVector = $this->encryptBlock($currentVector);
$result .= $this->xorBytes(substr($string, 8 * $i, $leftLength), $currentVector);
}
return strtoupper(bin2hex($result));
}
protected function encryptBlock($block)
{
return openssl_encrypt($block, 'BF-ECB', $this->blowKey, OPENSSL_RAW_DATA|OPENSSL_NO_PADDING);
}
protected function decryptBlock($block)
{
return openssl_decrypt($block, 'BF-ECB', $this->blowKey, OPENSSL_RAW_DATA|OPENSSL_NO_PADDING);
}
protected function xorBytes($str1, $str2)
{
$result = '';
for ($i = 0; $i < strlen($str1); $i++) {
$result .= chr(ord($str1[$i]) ^ ord($str2[$i]));
}
return $result;
}
protected function encryptTwelve($string)
{
$result = openssl_encrypt($string, 'AES-128-CBC', $this->aesKey, OPENSSL_RAW_DATA, $this->aesIv);
return strtoupper(bin2hex($result));
}
public function decrypt($string)
{
$result = FALSE;
switch ($this->version) {
case 11:
$result = $this->decryptEleven($string);
break;
case 12:
$result = $this->decryptTwelve($string);
break;
default:
break;
}
return $result;
}
protected function decryptEleven($upperString)
{
$string = hex2bin(strtolower($upperString));
$round = intval(floor(strlen($string) / 8));
$leftLength = strlen($string) % 8;
$result = '';
$currentVector = $this->blowIv;
for ($i = 0; $i < $round; $i++) {
$encryptedBlock = substr($string, 8 * $i, 8);
$temp = $this->xorBytes($this->decryptBlock($encryptedBlock), $currentVector);
$currentVector = $this->xorBytes($currentVector, $encryptedBlock);
$result .= $temp;
}
if ($leftLength) {
$currentVector = $this->encryptBlock($currentVector);
$result .= $this->xorBytes(substr($string, 8 * $i, $leftLength), $currentVector);
}
return $result;
}
protected function decryptTwelve($upperString)
{
$string = hex2bin(strtolower($upperString));
return openssl_decrypt($string, 'AES-128-CBC', $this->aesKey, OPENSSL_RAW_DATA, $this->aesIv);
}
};
// Two versions need to be specified ,11 or 12
//$navicatPassword = new NavicatPassword(11);
$navicatPassword = new NavicatPassword(11);
// Decrypt
//$decode = $navicatPassword->decrypt('15057D7BA390');
$decode = $navicatPassword->decrypt('E75BF077AB8BAA3AC2D5');
echo $decode."\n";
?> Use the password, Replace... In the above code $decode = $navicatPassword->decrypt('E75BF077AB8BAA3AC2D5');
After running , Will get the real password
边栏推荐
- R language dplyr package summary_ The at function calculates the count number, mean and median of multiple data columns (specified by vectors) in the dataframe data, and specifies na RM parameter, spe
- ECSHOP video list_ ECSHOP uploading video, video classification, video list playing video function
- Record a debugging when curl has no return value
- Huikan source code -- Huikan app system secondary development source code sharing
- New and old cluster migration of Minio data
- 动态代理
- Spicy food advertising e-commerce system development function and spicy food advertising e-commerce app system development source code sharing
- How to use ARIMA model for prediction?
- Kotlin Foundation
- sudo: ulimit: command not found
猜你喜欢

Upgrade opsenssh to 8.8p1

SDN系统方法 | 9. 接入网

20. MVVM command binding of WPF

Dark horse shopping mall ---2 Distributed file storage fastdfs

How to use SPSS to do grey correlation analysis? Quick grasp of hand-to-hand Teaching
![[oceanbase] Introduction to oceanbase and its comparison with MySQL](/img/1c/bd2bcddb7af4647407d2bc351f5f5d.png)
[oceanbase] Introduction to oceanbase and its comparison with MySQL

What is Flink? What can Flink do?

Rank sum ratio comprehensive evaluation method for common models in mathematical modeling

Linear regression of common mathematical modeling models for College Students

Black Horse Chang Shopping Mall - - - 3. Gestion des produits de base
随机推荐
Today, I will explain to you what is DFI and its development prospects
Zhengzheng e-commerce source code -- Zhengzheng advertising e-commerce system development source code sharing
An example of using dynamic datalist
The first techo day Tencent technology open day in 2022 will be held online on June 28
【OceanBase】OceanBase简介及其与MySQL的比较
属性分解 GAN 复现 实现可控人物图像合成
The network traceroute command is used to determine the path through which IP packets access the destination address.
Uncover gaussdb (for redis): comprehensive comparison of CODIS
网络 | 衡量网络好坏的指标及测试方法
flutter常用命令及问题
Kotlin Foundation
Gradle knowledge points
Arm V7 LDR STR memory access
Windows下MySQL的安装和删除
R language dplyr package summary_ The at function calculates the count number, mean and median of multiple data columns (specified by vectors) in the dataframe data, and specifies na RM parameter, spe
PD1.4转HDMI2.0转接线拆解。
设置图片的透明度从左到右渐变
机器学习自学成才的十条戒律
Installation and removal of MySQL under Windows
Dark horse shopping mall ---2 Distributed file storage fastdfs