summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2013-11-29 21:49:51 +0100
committerGravatar Nikias Bassen2013-11-29 21:49:51 +0100
commit380447da66ee832d54bea97c37d0ae8e9f8b68a7 (patch)
tree1142f3904ec0ceeb3229571f1581fa89e85a29bd
parent82222c539c768cdb2acee1569dc64f4e785dfe12 (diff)
downloadlibirecovery-380447da66ee832d54bea97c37d0ae8e9f8b68a7.tar.gz
libirecovery-380447da66ee832d54bea97c37d0ae8e9f8b68a7.tar.bz2
win32: fix iBoot string parsing for DFU and recovery mode
-rw-r--r--src/libirecovery.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index a2e54b1..23e1501 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -447,7 +447,7 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec
continue;
}
- char* serial_str[256];
+ char serial_str[256];
serial_str[0] = '\0';
if ((sscanf(result, "\\\\?\\usb#vid_%*04x&pid_%*04x#%s#", serial_str) != 1) || (serial_str[0] == '\0')) {
mobiledevice_closepipes(_client);
@@ -469,6 +469,8 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec
}
irecv_load_device_info_from_iboot_string(_client, serial_str);
+ irecv_copy_nonce_with_tag(_client, "NONC", &_client->device_info.ap_nonce, &_client->device_info.ap_nonce_size);
+ irecv_copy_nonce_with_tag(_client, "SNON", &_client->device_info.sep_nonce, &_client->device_info.sep_nonce_size);
if (ecid != 0) {
if (_client->device_info.ecid != ecid) {
@@ -544,6 +546,10 @@ irecv_error_t mobiledevice_connect(irecv_client_t* client, unsigned long long ec
}
}
+ irecv_load_device_info_from_iboot_string(_client, serial_str);
+ irecv_copy_nonce_with_tag(_client, "NONC", &_client->device_info.ap_nonce, &_client->device_info.ap_nonce_size);
+ irecv_copy_nonce_with_tag(_client, "SNON", &_client->device_info.sep_nonce, &_client->device_info.sep_nonce_size);
+
if (ecid != 0) {
if (_client->device_info.ecid != ecid) {
mobiledevice_closepipes(_client);