Posts

Showing posts with the label Unlocker

Old Huawei unlocker.py fixes for Python 3

  12.5.2024 Old Huawei unlocker.py fixes for Python 3 https://github.com/mcphail/linux_huawei_unlocker/blob/master/unlocker.py Python 3 mods/fixes #!/usr/bin/env python # # unlocker.py # - Remove simlock on huawei modems # # Copyright (C) 2013 Neil McPhail #        neil@mcphail.homedns.org # # Unlock code generator Copyright (C) 2010 dogbert #                                     dogber1@gmail.com # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of ...

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