summaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 34126d7..e42440f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -31,10 +31,12 @@
31#include "plist.h" 31#include "plist.h"
32#include "lockdown.h" 32#include "lockdown.h"
33#include "AFC.h" 33#include "AFC.h"
34#include "userpref.h"
34 35
35int debug = 1; 36int debug = 1;
36 37
37int main(int argc, char *argv[]) { 38int main(int argc, char *argv[]) {
39 char* host_id = NULL;
38 iPhone *phone = get_iPhone(); 40 iPhone *phone = get_iPhone();
39 if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1; 41 if (argc > 1 && !strcasecmp(argv[1], "--debug")) debug = 1;
40 else debug = 0; 42 else debug = 0;
@@ -51,9 +53,12 @@ int main(int argc, char *argv[]) {
51 } 53 }
52 54
53 printf("Now starting SSL.\n"); 55 printf("Now starting SSL.\n");
54// if (!lockdownd_start_SSL_session(control, "29942970-207913891623273984")) { 56 host_id = get_host_id();
57 if (host_id && !lockdownd_start_SSL_session(control, host_id)) {
55 printf("Error happened in GnuTLS...\n"); 58 printf("Error happened in GnuTLS...\n");
56 } else { 59 } else {
60 free(host_id);
61 host_id = NULL;
57 printf("... we're in SSL with the phone... !?\n"); 62 printf("... we're in SSL with the phone... !?\n");
58 port = lockdownd_start_service(control, "com.apple.afc"); 63 port = lockdownd_start_service(control, "com.apple.afc");
59 } 64 }