Last active
February 23, 2023 09:13
-
-
Save didix21/cbafb3feea58deeef7942c9255d8fbeb to your computer and use it in GitHub Desktop.
Get framework uuid of an IPA
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import os, sys, re | |
import fnmatch | |
# Usage get-dwarfdump-uuid.py <path> | |
def get_framework_name(root: str) -> str: | |
match = re.search(r'(\w+)\.framework', root) | |
return match[0][:match[0].index('.framework')] | |
def dwarfdump_uuid(binary_path: str): | |
os.system(f'dwarfdump -u {binary_path}') | |
def main(): | |
path = sys.argv[1:] | |
for root, _, filenames in os.walk(path[0]): | |
if root.endswith('.framework'): | |
framework_binary = f'{root}/{get_framework_name(root)}' | |
dwarfdump_uuid(framework_binary) | |
for filename in fnmatch.filter(filenames, '*.dylib'): | |
dylib = f'{root}/{filename}' | |
dwarfdump_uuid(dylib) | |
if __name__ == '__main__': | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment