programminghoch10 / huawei-honor-bootloader-bruteforce

A simple script to bruteforce Huawei/Honor bootloader codes
Apache License 2.0
57 stars 2 forks source link

AttributeError: 'module' object has no attribute 'run' (Python 3.4) #8

Closed haematopoiesis closed 3 years ago

haematopoiesis commented 3 years ago

Device: Honor 5X (KIW-L21) EMUI version: 4.0 Operating system: Windows 7 Ultimate Python Ver. 3.4

After entering the IMEI, my device restarts to Fastboot & Rescue mode. Nothing happens. The following error appears:

Bruteforce is running...
Currently testing code 1000000000000000
Progress: 10.0%
Traceback (most recent call last):
  File "unlock.py", line 119, in <module>
    codeOEM = bruteforceBootloader(increment)
  File "unlock.py", line 33, in bruteforceBootloader
    output = subprocess.run("fastboot oem unlock " + str(algoOEMcode).zfill(16),
 shell=True, stderr=subprocess.PIPE).stderr.decode('utf-8')
AttributeError: 'module' object has no attribute 'run'
programminghoch10 commented 3 years ago

https://stackoverflow.com/questions/40590192/getting-an-error-attributeerror-module-object-has-no-attribute-run-while

The function required to run and parse the unlock command is only supported in Python 3.5 and newer.

Although it is possible to backport, it's just more convenient if you upgrade your python installation.

haematopoiesis commented 3 years ago

https://stackoverflow.com/questions/40590192/getting-an-error-attributeerror-module-object-has-no-attribute-run-while

The function required to run and parse the unlock command is only supported in Python 3.5 and newer.

Although it is possible to backport, it's just more convenient if you upgrade your python installation.

This fixed the issue and I'm running the script now. Thank you for the prompt reply.