void test()
{
printf("www.dllhook.com\nDyld image count is: %d.\n", _dyld_image_count());
for (int i = 0; i < _dyld_image_count(); i++) {
char *image_name = (char *)_dyld_get_image_name(i);
const struct mach_header *mh = _dyld_get_image_header(i);
intptr_t vmaddr_slide = _dyld_get_image_vmaddr_slide(i);
printf("Image name %s at address 0x%llx and ASLR slide 0x%lx.\n",
image_name, (mach_vm_address_t)mh, vmaddr_slide);
}
}
Image name /Users/piao/Library/Developer/Xcode/DerivedData/rc4-fwjlriqsnqejbrewprmjvnlvavvg/Build/Products/Debug/test at address 0x100000000 and ASLR slide 0x0.
Image name /Applications/Xcode.app/Contents/Developer/usr/lib/libBacktraceRecording.dylib at address 0x100004000 and ASLR slide 0x100004000.
Image name /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation at address 0x7fff8ed0f000 and ASLR slide 0xad76000.
Image name /usr/lib/libobjc.A.dylib at address 0x7fff8b33c000 and ASLR slide 0xad76000.
Image name /usr/lib/libc++.1.dylib at address 0x7fff95d7b000 and ASLR slide 0xad76000.
已有893位网友发表了看法:
发表评论