添加bootram 密码计算脚本

This commit is contained in:
ranchuan
2025-08-11 16:07:00 +08:00
parent 285f9a516e
commit c4eee52fb9
2 changed files with 31 additions and 1 deletions

View File

@@ -10,3 +10,8 @@
2024.10.15 2024.10.15
烧录文件可能会加密bin的第一个字节表示加密方式 第二个字节表示加密种子,加密算法根据这个种子来计算 烧录文件可能会加密bin的第一个字节表示加密方式 第二个字节表示加密种子,加密算法根据这个种子来计算
好像加密方式都用的方式3 异或所以取第一个字节与3异或就能得到加密种子 好像加密方式都用的方式3 异或所以取第一个字节与3异或就能得到加密种子
2025.8.11
添加计算bootram password的脚本 进入bootram之后输入 f i 查看chip id
然后运行python pass.py chip_id 计算password
然后在bootram中输入 PSS password 来解除限制

25
pass.py Normal file
View File

@@ -0,0 +1,25 @@
import sys
from bin.crc import CRC32
def bootram_pssword(chip_id:str):
data=bytearray(b'Aerospace C.Power')
data+=bytearray(chip_id.encode('utf-8'))
off=64-len(data)
if(off>0):
data+=bytearray(b'\x5A'*off)
pss=CRC32(data)
# print(f"data={data} len={len(data)}")
print(f"bootram_pssword:{pss:08x}")
return pss
print(f"chip_id err.")
return 0
if __name__ == '__main__':
bootram_pssword(sys.argv[1])