1 找到secure会话记录位置
Options->Global Options->General->Configuration Paths
这里面路径就是会话配置存储路径,这里面的ini文件名与会话的名称是对应的
文章来源地址https://www.toymoban.com/news/detail-828165.html
2 解码编译后的密码
SecureCRT 中的密码进行了加密,需要解码才能得到对应的明文,这是使用python解密
提前安装好python:
python网站:Python Release Python 3.12.2 | Python.org
python Windows 安装程序(64 位) 3.12.2 下载连接:https://www.python.org/ftp/python/3.12.2/python-3.12.2-amd64.exe
1 使用pip 安装Crypto模块 pip3 install pycryptodome
这个地方就要看大家的网速了
完成安装
2 编写python解码文件decrypt.py文章来源:https://www.toymoban.com/news/detail-828165.html
#!/usr/bin/env python3
#https://github.com/HyperSine/how-does-SecureCRT-encrypt-password
import os
from Crypto.Hash import SHA256
from Crypto.Cipher import AES, Blowfish
class SecureCRTCrypto:
def __init__(self):
'''
Initialize SecureCRTCrypto object.
'''
self.IV = b'\x00' * Blowfish.block_size
self.Key1 = b'\x24\xA6\x3D\xDE\x5B\xD3\xB3\x82\x9C\x7E\x06\xF4\x08\x16\xAA\x07'
self.Key2 = b'\x5F\xB0\x45\xA2\x94\x17\xD9\x16\xC6\xC6\xA2\xFF\x06\x41\x82\xB7'
def Encrypt(self, Plaintext : str):
'''
Encrypt plaintext and return corresponding ciphertext.
Args:
Plaintext: A string that will be encrypted.
Returns:
Hexlified ciphertext string.
'''
plain_bytes = Plaintext.encode('utf-16-le')
plain_bytes += b'\x00\x00'
padded_plain_bytes = plain_bytes + os.urandom(Blowfish.block_size - len(plain_bytes) % Blowfish.block_size)
cipher1 = Blowfish.new(self.Key1, Blowfish.MODE_CBC, iv = self.IV)
cipher2 = Blowfish.new(self.Key2, Blowfish.MODE_CBC, iv = self.IV)
return cipher1.encrypt(os.urandom(4) + cipher2.encrypt(padded_plain_bytes) + os.urandom(4)).hex()
def Decrypt(self, Ciphertext : str):
'''
Decrypt ciphertext and return corresponding plaintext.
Args:
Ciphertext: A hex string that will be decrypted.
Returns:
Plaintext string.
'''
cipher1 = Blowfish.new(self.Key1, Blowfish.MODE_CBC, iv = self.IV)
cipher2 = Blowfish.new(self.Key2, Blowfish.MODE_CBC, iv = self.IV)
ciphered_bytes = bytes.fromhex(Ciphertext)
if len(ciphered_bytes) <= 8:
到了这里,关于查看SecureCRT 记录的密码的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!