|
|
发表于 2017-12-23 18:10:00
|
显示全部楼层
ghyghoo8 发表于 2017-12-23 18:18
看我上面的评论,那个网址里,虚拟机里也可以操作。
或者可以把现在的系统Ghost备份,然后刷入2003,完事 ...
看起来好麻烦
我看别人用python解密就完事了,我是不会python才上来求助。执行代码如下
[ol]#!/usr/bin/env python# decrypt tp-link config.bin file# coded by no mail from Crypto.Cipher import DESfrom hashlib import md5import sys # backup your config.bin from 192.168.x.1# usage find PPPOE account# ./run.py wan_ppp_usr# keys: wan_ppp_usr,wan_ppp_pwd key = '\x47\x8D\xA5\x0B\xF9\xE3\xD2\xCF'crypto = DES.new(key, DES.MODE_ECB) data = open('config.bin', 'rb').read()data_decrypted = crypto.decrypt(data).rstrip('\0')assert data_decrypted[:16] == md5(data_decrypted[16:]).digest()data_decrypted_finally = data_decrypted[16:]data_decrypted_dict = {}data_decrypted_array = data_decrypted_finally.split('\r\n')for item in data_decrypted_array: if not item: continue item_array = item.split(' ', 1) item_key = item_array[0] item_value = item_array[1] data_decrypted_dict[item_key] = item_value if len(sys.argv) > 1: print data_decrypted_dict[sys.argv[1]]open('config.bin.txt', 'wb').write(data_decrypted_finally)[/ol]复制代码 |
|