Python 3 fix for computeunlock code
16.5.2024
Python 3 fix for computeunlock code
https://techcoderadio.blogspot.com/2025/04/old-huawei-unlockerpy-fixes-for-python-3.html
should be
def computeunlockcode(imei):
salt = '5e8dd316726b0335'
digest = hashlib.md5(((imei+salt).encode()).lower()).digest()
code = 0
for i in range(0,4):
code += (digest[i]^digest[4+i]^digest[8+i]^digest[12+i]) << (3-i)*8
code &= 0x1ffffff
code |= 0x2000000
return code
Comments
Post a Comment