ChiChou / bagbak

Yet another frida based iOS dumpdecrypted. Also decrypts app extensions
MIT License
1.12k stars 184 forks source link

feature request: delete folder after using -z #98

Closed asdfzxcvbn closed 1 year ago

asdfzxcvbn commented 1 year ago

as of right now, using the -z option will dump a folder and then zip the folder into a .ipa. since you can see inside the ipa, keeping the folder is just a waste of space imo. could you add add an option to delete the folder after creating the ipa? thanks for all your work on this project by the way!

asdfzxcvbn commented 1 year ago

i would also love to see an option to automatically remove UISupportedDevices from the Info.plist when using -z!

ChiChou commented 1 year ago

-z now deletes the intermediate folder from v2.6.4

ChiChou commented 1 year ago

This tool aims at getting the package as-is. For the Info.plist post process, you can easily write a python script with a few lines:

import plistlib

plist_file = 'Info.plist'
with open(plist_file, 'rb') as fp:
    info_plist = plistlib.load(fp)

if 'UISupportedDevices' in info_plist:
    del info_plist['UISupportedDevices']

with open(plist_file, 'wb') as fp:
    plistlib.dump(info_plist, fp)

If you are on macOS, this is even simpler with a single line of shell command:

/usr/libexec/PlistBuddy -c 'Delete :UISupportedDevices' Info.plist

Such feature does not align with the design of this project. Besides, unlike Python, node.js does not provide a library api to manipulate plist format. This will require extra dependencies while I want to minimized them.

asdfzxcvbn commented 1 year ago

thank you!

asdfzxcvbn commented 1 year ago

-z now deletes the intermediate folder from v2.6.4

just to let you know: (node:10893) [DEP0147] DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead