summaryrefslogtreecommitdiffstats
path: root/src/libirecovery.c
diff options
context:
space:
mode:
authorGravatar Joshua Hill2010-05-24 16:28:06 -0400
committerGravatar Joshua Hill2010-05-24 16:28:06 -0400
commit8482031ce77cb4914b5a04ba4704484cc6548dcd (patch)
treebce41a307f1470521f7c9168e1778881b805d1e4 /src/libirecovery.c
parent473ad5b0a574e03c68baa31dcfc4a3024ce131a7 (diff)
downloadlibirecovery-8482031ce77cb4914b5a04ba4704484cc6548dcd.tar.gz
libirecovery-8482031ce77cb4914b5a04ba4704484cc6548dcd.tar.bz2
Added irecv_send_exploit function to libirecovery.c and added -k flag in irecovery.c to trigger it.
Diffstat (limited to 'src/libirecovery.c')
-rw-r--r--src/libirecovery.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/libirecovery.c b/src/libirecovery.c
index 78745b1..6587fe0 100644
--- a/src/libirecovery.c
+++ b/src/libirecovery.c
@@ -428,6 +428,21 @@ irecv_error_t irecv_get_ecid(irecv_client_t client, unsigned long long* ecid) {
return IRECV_E_SUCCESS;
}
+
+irecv_error_t irecv_send_exploit(irecv_client_t client) {
+ if(client == NULL || client->handle == NULL) {
+ return IRECV_E_NO_DEVICE;
+ }
+
+ irecv_error_t error = irecv_set_interface(client, 1, 1);
+ if(error != IRECV_E_SUCCESS) {
+ return error;
+ }
+
+ libusb_control_transfer(client->handle, 0x21, 2, 0, 0, NULL, 0, 100);
+ return IRECV_E_SUCCESS;
+}
+
const char* irecv_strerror(irecv_error_t error) {
switch(error) {
case IRECV_E_SUCCESS: