Skip to content

Commit

Permalink
Update drizzleDumper.c
Browse files Browse the repository at this point in the history
  • Loading branch information
DrizzleRisk committed Aug 12, 2016
1 parent f1a37b5 commit 2971f87
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions drizzleDumper.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ int main(int argc, char *argv[]) {
}
printf("[*] clone pid is %d\n", clone_pid);

memory_region memory;
//ptrace cloned process
printf("[*] ptrace [clone_pid] %d\n", clone_pid);
mem_file = attach_get_memory(clone_pid);
memory_region memory;
//ptrace cloned process
printf("[*] ptrace [clone_pid] %d\n", clone_pid);
mem_file = attach_get_memory(clone_pid);
if(mem_file == -10201)
{
continue;
Expand All @@ -80,12 +80,12 @@ int main(int argc, char *argv[]) {
}
else if(mem_file == -30903)
{
//continue
//continue
}

/*
* Begin Scanning
*/
/*
* Begin Scanning
*/
dumped_file_name = malloc(strlen(static_safe_location) + strlen(package_name) + strlen(suffix));
sprintf(dumped_file_name, "%s%s%s", static_safe_location, package_name, suffix);
printf("[*] Scanning dex ...\n");
Expand Down Expand Up @@ -197,8 +197,7 @@ int find_magic_memory(uint32_t clone_pid, int memory_fd, memory_region *memory ,
char mem_address_start[10]={0};
char mem_address_end[10]={0};
char mem_info[1024]={0};

sscanf(mem_line, "%8[^-]-%8[^ ]%*s%*s%*s%*s%s", mem_address_start, mem_address_end,mem_info);
sscanf(mem_line, "%8[^-]-%8[^ ]%*s%*s%*s%*s%s", mem_address_start, mem_address_end,mem_info);
memset(mem_line , 0 ,1024);
uint32_t mem_start = strtoul(mem_address_start, NULL, 16);
memory->start = mem_start;
Expand Down Expand Up @@ -254,9 +253,9 @@ int find_magic_memory(uint32_t clone_pid, int memory_fd, memory_region *memory ,

if(dump_memory(buffer , len , each_filename) == 1)
{
printf(" [+] dex dump into %s\n", each_filename);
free(buffer);
continue;
printf(" [+] dex dump into %s\n", each_filename);
free(buffer);
continue;
}
else
{
Expand Down

0 comments on commit 2971f87

Please sign in to comment.