当前位置:网站首页>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
边栏推荐
- 20、wpf之MVVM命令绑定
- The R language uses the follow up The plot function visualizes the longitudinal follow-up map of multiple ID (case) monitoring indicators, and uses stress The type parameter specifies the line type of
- 2022年首期Techo Day腾讯技术开放日将于6月28日线上举办
- 2022 Baidu collection batch automatic push assistant
- Arm V7 continuous load / store
- How do super rookies get started with data analysis?
- Fun pocket mall -- sharing the development source code of fun pocket app system
- Full nanny tutorial of Market Research Competition (experience sharing)
- The whole page turns gray
- R语言使用构建有序多分类逻辑回归模型、epiDisplay包的ordinal.or.display函数获取有序logistic回归模型的汇总统计信息(变量对应的优势比及其置信区间、以及假设检验的p值)
猜你喜欢

Dark horse shopping mall ---6 Brand, specification statistics, condition filtering, paging sorting, highlighting

ECSHOP upload video_ ECSHOP video list, video classification, video related product guide

揭秘GaussDB(for Redis):全面对比Codis

ECSHOP commodity page multi-attribute batch purchase plug-ins ECSHOP wholesale plug-ins multi-attribute order placing, multi-attribute batch purchase of commodities

2022年首期Techo Day腾讯技术开放日将于6月28日线上举办

【OceanBase】OceanBase简介及其与MySQL的比较

How to use ARIMA model for prediction?

Pd1.4 to hdmi2.0 adapter cable disassembly.

15、wpf之button样式小记

一篇文章讲清楚MySQL的聚簇/联合/覆盖索引、回表、索引下推
随机推荐
揭秘GaussDB(for Redis):全面对比Codis
Heyangdao store management system -- share the development source code of heyangdao system
Hook技术
网络 | traceroute,路由跟踪命令,用于确定 IP 数据包访问目标地址所经过的路径。
Why should Apple change objc_ Type declaration for msgsend
sklearnex 让你的 sklearn 机器学习模型训练快得飞起?
PyCaret 成功解决无法从‘sklearn.model_selection._search‘导入名称“_check_param_grid”
plt. GCA () picture frame and label
ARM V7 协处理器
Why do we do autocorrelation analysis? Explain application scenarios and specific operations
机器学习自学成才的十条戒律
Implementing Domain Driven Design - using the ABP framework - Summary of a series of articles
New and old cluster migration of Minio data
Does sklearex make your sklearn machine learning model training fly fast?
网络 | 衡量网络好坏的指标及测试方法
学习笔记 2022 综述 | 自动图机器学习,阐述 AGML 方法、库与方向
【OceanBase】OceanBase简介及其与MySQL的比较
揭秘GaussDB(for Redis):全面對比Codis
Explain factor analysis in simple terms, with case teaching (full)
R语言使用glm函数构建泊松对数线性回归模型处理三维列联表数据构建饱和模型、epiDisplay包的poisgof函数对拟合的泊松回归模型进行拟合优度检验(检验模型效果)