测试这个脚本,我测试了它,它对我来说效果很好,它甚至可以为 hg630/hg633 重新加密文件
解密:
Usage :hg633.py decrypt inputfile outputfile
加密:
Usage :hg633.py encrypt inputfile outputfile
解码加密的密码
Usage : hg633decode.py decrypt inputfile outputfile
修理
不是有效的配置文件...退出
换句话说,要让脚本将您的配置视为有效配置,请在脚本中添加具有相似值的行 XML_VERSION_TSTRING = b'TEDATA<?xml version="1.0" ?>'
这是解密配置文件的第一行
并修改
def check_config(new_config_file):
head = new_config_file[0:len(XML_VERSION_STRING)]
if head != XML_VERSION_STRING:
print("Not a valid config file...exiting")
到
def check_config(new_config_file):
head = new_config_file[0:len(XML_VERSION_STRING)]
head2 = new_config_file[0:len(XML_VERSION_TSTRING)]
if head != XML_VERSION_STRING:
if head2 != XML_VERSION_TSTRING:
print("Not a valid config file...exiting")
sys.exit()
解码管理员密码
sdecode.py encryptedstring
它将输出一个 sha-256 哈希值,这至少是密码存储在较新路由器中的方式,您可以在线搜索哈希值以进行快速破解。
我不知道如何重新加密 DG8045,因为即使我使用了 getinfo 函数中的密钥,签名仍然失败
如果有人能弄清楚如何计算 RSA_N RSA_D ,那将有很大帮助。