首页 > 编程知识 正文

华为解bl锁是什么意思,如何破解华为bl锁

时间:2023-05-04 22:18:47 阅读:272348 作者:1557

大小单双稳赢技巧

穷举法解华为bl锁 python3代码测试截图

灵感来自于:https://blog.csdn.net/qq_40169767/article/details/90481748
但是我不懂shell脚本,那个脚本又运行不了,所以我用python写了一个,
穷举要0.05s*9999999999999999/60*60*24*365=15,854,895年
不推荐使用,如果你时间多运气好的话可以试试,

python3代码 使用 adb reboot bootloader 命令 让手机进入fastboot模式后运行此代码即可 import subprocessimport randomimport ioimport logging# 日志配置logging.basicConfig(filename='fuckBl.log',level=logging.DEBUG , format=' %(asctime)s - %(levelname)s - %(message)s')# 执行命令并返回结果def execCommond(cmd): logging.info(cmd) proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, bufsize=-1) proc.wait() stream_stdout = io.TextIOWrapper(proc.stdout, encoding='utf-8') stream_stderr = io.TextIOWrapper(proc.stderr, encoding='utf-8') str_stdout = str(stream_stdout.read()) str_stderr = str(stream_stderr.read()) logging.info(str_stdout) logging.warning(str_stderr) result=str_stdout+str_stderr return result# 测试一个码是否成功def testAKey(key): result=execCommond('fastboot oem unlock %s'%(str(key))) if 'OKAY' in result: return True return False# 检测当前设备解锁状态def checkDeviceStatus(): result=execCommond('fastboot oem get-bootinfo') if 'locked' in result: return False return True# 获取设备列表(fastboot)def getDevices(): result=execCommond('fastboot devices') results=result.split('n') return resultscurrentNum=0# 获取一个码 可选是否随机def getCode(random=True): global currentNum num=0 if random: num=random.randint(0,9999999999999999) else: num=currentNum currentNum=currentNum+1 return str(num).zfill(16)# 测试循环def main(): deviceStatus=checkDeviceStatus() while True: code=getCode(random=False) # 可修改为True使用随机变量 if testAKey(code) and checkDeviceStatus(): print('尝试 {%s} : √'%(code)) break print('尝试 {%s} : ×'%(code)) print('解锁成功:{%s}'%(code),)if __name__ == '__main__': main() 测试截图

版权声明:该文观点仅代表作者本人。处理文章:请发送邮件至 三1五14八八95#扣扣.com 举报,一经查实,本站将立刻删除。