1
0
mirror of https://github.com/Mrs4s/MiraiGo.git synced 2025-06-18 21:45:04 +08:00

fix RequestQImei panic

This commit is contained in:
Mrs4s 2023-03-19 15:02:33 +08:00
parent fd83d24f67
commit b8bef924a0
No known key found for this signature in database
GPG Key ID: 3186E98FA19CE3A7

View File

@ -63,6 +63,9 @@ func (info *Device) RequestQImei() {
return return
} }
encryptedResponse, _ := base64.StdEncoding.DecodeString(gjson.GetBytes(resp, "data").String()) encryptedResponse, _ := base64.StdEncoding.DecodeString(gjson.GetBytes(resp, "data").String())
if len(encryptedResponse) == 0 {
return
}
decryptedResponse := aesDecrypt(encryptedResponse, []byte(cryptKey)) decryptedResponse := aesDecrypt(encryptedResponse, []byte(cryptKey))
info.QImei16 = gjson.GetBytes(decryptedResponse, "q16").String() info.QImei16 = gjson.GetBytes(decryptedResponse, "q16").String()
info.QImei36 = gjson.GetBytes(decryptedResponse, "q36").String() info.QImei36 = gjson.GetBytes(decryptedResponse, "q36").String()