Skip to content

Commit

Permalink
dump_stuff: Modified to allow dumping UISound for pre-4.0 system.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytm committed Mar 17, 2011
1 parent 5689156 commit 868b928
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions dump_stuff.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def __call__(self, prevLoc, instr, thread):
retval = 0
if isinstance(keysPtr, int):
keysSym = msa('addr', keysPtr)
if keysSym is not None and keysSym.name.startswith('_ssids'):
if keysSym is not None and 'ssids' in keysSym.name:
tmg = thread.memory.get
msall = self.msall

Expand Down Expand Up @@ -265,12 +265,13 @@ def uisound_fill_categories(mo, cat_addr, init_sym):
def uisound_main(opts):
with MachOLoader(opts.audioToolbox, opts.coreMedia, arch=opts.arch, sdk=opts.sdk, cache=opts.cache) as (mo, coreMediaMo):
msa1 = mo.symbols.any1
cmsa = coreMediaMo.symbols.any
cmsa1 = coreMediaMo.symbols.any1
try:
f_sym = msa1('name', '__Z24GetFileNameForThisActionmPcRb')
iphone_sound_sym = msa1('name', '__ZL12isPhoneSound')
cat_sym = cmsa1('name', '_gSystemSoundIDToCategory')
init_sym = cmsa1('name', '_initializeCMSessionMgr')
cat_sym = cmsa('name', '_gSystemSoundIDToCategory') or cmsa1('name', '__ZL24gSystemSoundIDToCategory')
init_sym = cmsa('name', '_initializeCMSessionMgr') or cmsa1('name', '__ZL34cmsmInitializeSSIDCategoryMappingsv')
except KeyError as e:
print("Error: Symbol '{0}' not found.".format(e.args[0]))
return
Expand Down

0 comments on commit 868b928

Please sign in to comment.