Skip to main content

MachoAnalysis is a collection of utils written in python2 to help developers analysis Mach-O Binaries.At this time,it can help us to figure out which module call some target functions,and the dependencies between the modules in a binary.

UseAge

To figure out which module call some target functions,you can do this in your python script:

import macho_analysis;

module_array = macho_analysis.utils.findCallingSymbolModule("_NSLog","linkmap_path","disassemblyfile_path")];

The findCallingSymbolModule function take three arguments,which are the name of the symbol(in this case,is the _NSLog),the path to the linkmap file which is generated by xcode, and the path to disassembly code file generated by otool(otool -t -V -arch [arch] [macho_path]) util in xcode app.It returns an array contains the name of all the modules that call the symbol.

To find the dependencies between the modules,you can do this in your python script:

import macho_analysis;

lib_dep_hash = macho_analysis.utils.findDependency(lib_path_array,'armv7');

The findDependency function takes two arguments,the first is an array contains the paths to the libs,and the second is the arch name which will be passed to the nm utils in the xcode.It returns a dictionary,the key is the lib name,and its value is also a dictionary,which map the lib’s undefined symbol to the module that defines it.

Prerequisites

We need xcode to run this tool.

Release files for macho_analysis 0.011

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for macho_analysis 0.011
File Size Uploaded
macho_analysis-0.011.tar.gz 4.6 kB Details

Release files / macho_analysis-0.011.tar.gz

Download URL macho_analysis-0.011.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
8d3f14283a26050bf284678bc142f945b22e174a932b3d4164d752a5816189bb
BLAKE2b-256 checksum
How to use checksums
e6cb2436c77189e7c50ef5bffbaba5740d0b596dec9c3f6895281f274e69495a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.011 This release

1 release file

0.01

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page