请问如何查看mysql的root密码
用navichat打开
目前已经登录
4条回答 默认 最新
- CL有毒 2023-03-16 09:48关注
先导出连接,并且勾选导出密码
用文本编辑器打开导出的文件,是xml格式的,很好看懂,连接的Password属性是密文(16进制)
先把密码从16进制转化为二进制数组,然后再用AES CBC模式解密,密钥"libcckeylibcckey",偏移"libcciv libcciv "(中间和末尾有空格),比如java代码
public class Main { public static void main(String[] args) throws Exception { String aesKey = "libcckeylibcckey"; String aesIv = "libcciv libcciv "; String password = "503AA930968F877F04770B47DD731DC0";// root SecretKeySpec secretKeySpec = new SecretKeySpec(aesKey.getBytes(StandardCharsets.UTF_8), "AES"); IvParameterSpec iv = new IvParameterSpec(aesIv.getBytes(StandardCharsets.UTF_8)); Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, secretKeySpec, iv); byte[] bytes = hexToBytes(password); byte[] decrypted = cipher.doFinal(bytes); System.out.println(new String(decrypted, StandardCharsets.UTF_8)); } private static byte[] hexToBytes(String hex) { int hexlen = hex.length(); byte[] result; if (hexlen % 2 == 1) { //奇数 hexlen++; result = new byte[(hexlen / 2)]; hex = "0" + hex; } else { //偶数 result = new byte[(hexlen / 2)]; } int j = 0; for (int i = 0; i < hexlen; i += 2) { result[j] = (byte) Integer.parseInt(hex.substring(i, i + 2), 16); j++; } return result; } }
或者直接使用在线解密工具:
https://the-x.cn/cryptography/Aes.aspx
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 1无用
悬赏问题
- ¥170 如图所示配置eNSP
- ¥20 docker里部署springboot项目,访问不到扬声器
- ¥15 netty整合springboot之后自动重连失效
- ¥15 悬赏!微信开发者工具报错,求帮改
- ¥20 wireshark抓不到vlan
- ¥20 关于#stm32#的问题:需要指导自动酸碱滴定仪的原理图程序代码及仿真
- ¥20 设计一款异域新娘的视频相亲软件需要哪些技术支持
- ¥15 stata安慰剂检验作图但是真实值不出现在图上
- ¥15 c程序不知道为什么得不到结果
- ¥15 键盘指令混乱情况下的启动盘系统重装