diff options
Diffstat (limited to 'dev')
-rw-r--r-- | dev/afccheck.c | 6 | ||||
-rw-r--r-- | dev/iphoneclient.c | 11 | ||||
-rw-r--r-- | dev/iphoneenterrecovery.c | 3 | ||||
-rw-r--r-- | dev/lckdclient.c | 4 | ||||
-rwxr-xr-x | dev/msync.py | 26 | ||||
-rw-r--r-- | dev/msyncclient.c | 6 |
6 files changed, 26 insertions, 30 deletions
diff --git a/dev/afccheck.c b/dev/afccheck.c index 88935a0..569acf1 100644 --- a/dev/afccheck.c +++ b/dev/afccheck.c @@ -93,15 +93,13 @@ int main(int argc, char *argv[]) lockdownd_client_t client = NULL; iphone_device_t phone = NULL; GError *err; - int port = 0; + uint16_t port = 0; afc_client_t afc = NULL; if (argc > 1 && !strcasecmp(argv[1], "--debug")) { iphone_set_debug_level(1); - iphone_set_debug_mask(DBGMASK_ALL); } else { iphone_set_debug_level(0); - iphone_set_debug_mask(DBGMASK_NONE); } if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) { @@ -109,7 +107,7 @@ int main(int argc, char *argv[]) return 1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "afccheck")) { iphone_device_free(phone); return 1; } diff --git a/dev/iphoneclient.c b/dev/iphoneclient.c index d62d23f..eab903c 100644 --- a/dev/iphoneclient.c +++ b/dev/iphoneclient.c @@ -29,7 +29,6 @@ #include <libiphone/lockdown.h> #include <libiphone/afc.h> #include <libiphone/notification_proxy.h> -#include "../src/utils.h" static void notifier(const char *notification) { @@ -40,7 +39,7 @@ static void notifier(const char *notification) static void perform_notification(iphone_device_t phone, lockdownd_client_t client, const char *notification) { - int nport = 0; + uint16_t nport = 0; np_client_t np; lockdownd_start_service(client, "com.apple.mobile.notification_proxy", &nport); @@ -60,8 +59,8 @@ static void perform_notification(iphone_device_t phone, lockdownd_client_t clien int main(int argc, char *argv[]) { unsigned int bytes = 0; - int port = 0, i = 0; - int npp; + uint16_t port = 0, i = 0; + uint16_t npp; lockdownd_client_t client = NULL; iphone_device_t phone = NULL; uint64_t lockfile = 0; @@ -69,10 +68,8 @@ int main(int argc, char *argv[]) if (argc > 1 && !strcasecmp(argv[1], "--debug")) { iphone_set_debug_level(1); - iphone_set_debug_mask(DBGMASK_ALL); } else { iphone_set_debug_level(0); - iphone_set_debug_mask(DBGMASK_NONE); } if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) { @@ -87,7 +84,7 @@ int main(int argc, char *argv[]) if (uuid) free(uuid); - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneclient")) { iphone_device_free(phone); printf("Exiting.\n"); return -1; diff --git a/dev/iphoneenterrecovery.c b/dev/iphoneenterrecovery.c index 1d4d332..153df15 100644 --- a/dev/iphoneenterrecovery.c +++ b/dev/iphoneenterrecovery.c @@ -51,7 +51,6 @@ int main(int argc, char *argv[]) /* parse cmdline args */ for (i = 1; i < argc; i++) { if (!strcmp(argv[i], "-d") || !strcmp(argv[i], "--debug")) { - iphone_set_debug_mask(DBGMASK_ALL); iphone_set_debug_level(1); continue; } @@ -74,7 +73,7 @@ int main(int argc, char *argv[]) return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "iphoneenterrecovery")) { iphone_device_free(phone); return -1; } diff --git a/dev/lckdclient.c b/dev/lckdclient.c index d866435..7b7604e 100644 --- a/dev/lckdclient.c +++ b/dev/lckdclient.c @@ -48,7 +48,7 @@ int main(int argc, char *argv[]) if (uuid) free(uuid); - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "lckdclient")) { iphone_device_free(phone); return -1; } @@ -92,7 +92,7 @@ int main(int argc, char *argv[]) } if (!strcmp(*args, "start") && len == 2) { - int port = 0; + uint16_t port = 0; if(LOCKDOWN_E_SUCCESS == lockdownd_start_service(client, *(args + 1), &port)) { printf("started service %s on port %i\n", *(args + 1), port); } diff --git a/dev/msync.py b/dev/msync.py index fe7f1fd..6bb85d7 100755 --- a/dev/msync.py +++ b/dev/msync.py @@ -1,6 +1,7 @@ #! /usr/bin/env python -from libiphone.iPhone import * +from iphone import * +from plist import * # get msync client def GetMobileSyncClient() : @@ -24,17 +25,18 @@ msync = GetMobileSyncClient() if not msync : exit(1) -array = PListNode(PLIST_ARRAY) -array.add_sub_string("SDMessageSyncDataClassWithDevice") -array.add_sub_string("com.apple.Contacts"); -array.add_sub_string("---"); -array.add_sub_string("2009-01-13 22:25:58 +0100"); -array.add_sub_uint(106); -array.add_sub_string("___EmptyParameterString___"); - -msync.send(array) -array = msync.receive() -print array.to_xml() +a = Array() +a.append( String("SDMessageSyncDataClassWithDevice") ) +a.append( String("") ) +a.append( String("com.apple.Contacts") ) +a.append( String("---") ) +a.append( String("2009-01-13 22:25:58 +0100") ) +a.append( Integer(106) ) +a.append( String("___EmptyParameterString___") ) + +msync.send(a) +a = msync.receive() +print a.to_xml() diff --git a/dev/msyncclient.c b/dev/msyncclient.c index 53018ac..c136ef2 100644 --- a/dev/msyncclient.c +++ b/dev/msyncclient.c @@ -141,19 +141,19 @@ static mobilesync_error_t mobilesync_get_all_contacts(mobilesync_client_t client int main(int argc, char *argv[]) { - int port = 0; + uint16_t port = 0; lockdownd_client_t client = NULL; iphone_device_t phone = NULL; if (argc > 1 && !strcasecmp(argv[1], "--debug")) - iphone_set_debug_mask(DBGMASK_MOBILESYNC); + iphone_set_debug_level(1); if (IPHONE_E_SUCCESS != iphone_device_new(&phone, NULL)) { printf("No iPhone found, is it plugged in?\n"); return -1; } - if (LOCKDOWN_E_SUCCESS != lockdownd_client_new(phone, &client)) { + if (LOCKDOWN_E_SUCCESS != lockdownd_client_new_with_handshake(phone, &client, "msyncclient")) { iphone_device_free(phone); return -1; } |