当前位置: 首页 > news >正文

navicat15已连接忘记密码

1.导出链接

2.使用文本打开 connections.ncx

UserName="root" Password=XXXX

3.复制加密密码,在线解密

代码在线运行 - 在线工具

php解密代码

<?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);}
};//需要指定版本两种,11或12
//$navicatPassword = new NavicatPassword(11);
//这里我指定的12的版本,原先指定的11,执行之后的密码是乱码
$navicatPassword = new NavicatPassword(12);//解密
//$decode = $navicatPassword->decrypt('5658213B');
$decode = $navicatPassword->decrypt('503AA930968F877F04770B47DD731DC0');
echo $decode."\n";
?>

 原文连接

http://www.lryc.cn/news/402142.html

相关文章:

  • 企业管理必备:学会寻找客户绝佳方法。
  • 昇思25天学习打卡营第29天 | 文本解码原理--以MindNLP为例
  • 元服务体验-服务发现
  • 设计模式学习(二)工厂模式——抽象工厂模式+注册表
  • 同三维T80004解码器视频使用操作说明书:高清HDMI解码器,高清SDI解码器,4K超清HDMI解码器,双路4K超高清解码器
  • Flutter应用开发:掌握StatefulWidget的实用技巧
  • SCADA系统在哪些行业中取得了不斐的成绩!
  • layui 监听弹窗关闭并刷新父级table
  • Webpack详解
  • 杰发科技AC7801 —— __attribute__指定地址存储常量
  • docker pull 不下来 还是走代理好啊
  • Java Scanner 类
  • OceanBase:引领下一代分布式数据库技术的前沿
  • Win11鼠标卡顿 - 解决方案
  • 使用 ABBYY FineReader PDF 15 在创建或转换 PDF 时自动生成书签
  • k8s集群新增节点
  • springAMQP自定义fanout交换机进行消息的广播
  • Nginx配置缺少导致CSS不起作用
  • 从代理模式到注解开发
  • 力扣刷题(自用)
  • 网站开发:使用VScode安装yarn包和运行前端项目
  • Linux_线程的使用
  • [word] word如何编写公式? #微信#知识分享
  • Pytest 框架快速入门
  • 抖音视频素材去哪里找啊?视频素材网站库分享
  • win10 langchain-chatchat-0.3.1安装及测试
  • Redis 教程:从入门到入坑
  • 计算机图形学入门31:动画与模拟的求解
  • Jmeter-单用户单表查询千条以上数据,前端页面分页怎么做
  • 夏日养猫攻略!你家猫咪缺水了吗?补水罐头秘籍大公开