From 8482031ce77cb4914b5a04ba4704484cc6548dcd Mon Sep 17 00:00:00 2001 From: Joshua Hill Date: Mon, 24 May 2010 16:28:06 -0400 Subject: Added irecv_send_exploit function to libirecovery.c and added -k flag in irecovery.c to trigger it. --- src/libirecovery.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/libirecovery.c') 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: -- cgit v1.1-32-gdbae