Skip to content

Determine 32 bit and 64 bit process correctly. #7

Open
wants to merge 1 commit into from

2 participants

@rtibdewal

Issue 6. 32 bit injection process cannot inject 64 bit process and vice
versa
Issue 3. Cannot inject in Google Chrome

@rtibdewal rtibdewal 64 bit and 32 bit injection problems fixed.
Issue 6. 32 bit injection process cannot inject 64 bit process and vice
versa
Issue 3. Cannot inject in Google Chrome
0824d3a
@comex
Owner
comex commented Nov 2, 2011

The style is inconsistent and you should not be blindly retrying things over and over. I'll look at this, though.

@rtibdewal

Sorry, I am new to git and fairly new to programming. I am learning and will try to follow your comments and I really prefer inject_and_interpose over mach_star.

The only important change is to guess whether the process is whether injectee process is 64-bit, rest of changes are due to Auto-Indentation option.

  • bool proc64 = info.all_image_info_addr > 0;

  • pid_t pid;

  • pid_for_task(task, &pid);
  • bool proc64 = IsProcess64Bit(pid);
@rtibdewal rtibdewal commented on the diff Nov 3, 2011
#if defined(__i386__) || defined(__x86_64__) || defined(__ppc__)
// Try to guess whether the process is 64-bit,
- bool proc64 = info.all_image_info_addr > 0;
+ //bool proc64 = info.all_image_info_addr > 0;
@rtibdewal
rtibdewal added a note Nov 3, 2011

Here we get incorrect value of proc64 if injectee process is 32 bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@rtibdewal

Sorry but now I get what you meant in previous comment. My fix is no good for 32 bit injectees. You can scrap it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.