移远5G模块,开启adb, 需要输入一个key来开启
import crypt
#sn = '18700338'
#sn = '40901409'
sn = '12741851'
def generateUnlockKey(sn):
"""
@param sn: the serial number to generate an unlock key for
"""
salt = "$1${0}$".format(sn)
c = crypt.crypt("SH_adb_quectel", salt)
print("Salt: {0}\nCrypt: {1}\nCode: {2}\n".format(salt, c, c[12:27]))
return c[12:27]
xx = generateUnlockKey(sn)
print(xx)
def old_key(salt):
code = crypt.crypt("SH_adb_quectel", "$1$" + salt)
#code = crypt.crypt("SH_adb_quectel", "$1$" + salt + '$')
code = code[12:27]
return code
yy = old_key(sn)
print('jiandan=', yy)