summaryrefslogtreecommitdiffstats
path: root/tools/irecovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/irecovery.c')
-rw-r--r--tools/irecovery.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/tools/irecovery.c b/tools/irecovery.c
index a46d5df..912ac37 100644
--- a/tools/irecovery.c
+++ b/tools/irecovery.c
@@ -68,21 +68,15 @@ static void parse_command(irecv_client_t client, unsigned char* command, unsigne
68 debug("Executing %s\n", action); 68 debug("Executing %s\n", action);
69 if (!strcmp(cmd, "/exit")) { 69 if (!strcmp(cmd, "/exit")) {
70 quit = 1; 70 quit = 1;
71 } else 71 } else if (!strcmp(cmd, "/help")) {
72
73 if (!strcmp(cmd, "/help")) {
74 shell_usage(); 72 shell_usage();
75 } else 73 } else if (!strcmp(cmd, "/upload")) {
76
77 if (!strcmp(cmd, "/upload")) {
78 char* filename = strtok(NULL, " "); 74 char* filename = strtok(NULL, " ");
79 debug("Uploading files %s\n", filename); 75 debug("Uploading files %s\n", filename);
80 if (filename != NULL) { 76 if (filename != NULL) {
81 irecv_send_file(client, filename, 0); 77 irecv_send_file(client, filename, 0);
82 } 78 }
83 } else 79 } else if (!strcmp(cmd, "/deviceinfo")) {
84
85 if (!strcmp(cmd, "/deviceinfo")) {
86 int ret; 80 int ret;
87 unsigned int cpid, bdid; 81 unsigned int cpid, bdid;
88 unsigned long long ecid; 82 unsigned long long ecid;
@@ -112,25 +106,20 @@ static void parse_command(irecv_client_t client, unsigned char* command, unsigne
112 if(ret == IRECV_E_SUCCESS) { 106 if(ret == IRECV_E_SUCCESS) {
113 printf("IMEI: %s\n", imei); 107 printf("IMEI: %s\n", imei);
114 } 108 }
115 } else 109 } else if (!strcmp(cmd, "/exploit")) {
116
117 if (!strcmp(cmd, "/exploit")) {
118 char* filename = strtok(NULL, " "); 110 char* filename = strtok(NULL, " ");
119 debug("Sending exploit %s\n", filename); 111 debug("Sending exploit %s\n", filename);
120 if (filename != NULL) { 112 if (filename != NULL) {
121 irecv_send_file(client, filename, 0); 113 irecv_send_file(client, filename, 0);
122 } 114 }
123 irecv_send_exploit(client); 115 irecv_send_exploit(client);
124 } else 116 } else if (!strcmp(cmd, "/execute")) {
125 117 char* filename = strtok(NULL, " ");
126 if (!strcmp(cmd, "/execute")) { 118 debug("Executing script %s\n", filename);
127 char* filename = strtok(NULL, " "); 119 if (filename != NULL) {
128 debug("Executing script %s\n", filename); 120 irecv_execute_script(client, filename);
129 if (filename != NULL) {
130 irecv_execute_script(client, filename);
131 }
132 } 121 }
133 122 }
134 123
135 free(action); 124 free(action);
136} 125}