Recursive Download of Apps Folder
Hi,
First of all, good job on objection.
As per title, it should be trivial to implement a recursive file download functionality or something like folder download which would help for quicker local analysis of files, such as opening all plist files together, grepping against all of them and so on.
@leonjza can I +1 this enhancement? Looking at the source, modifying _download_android and _download_ios to call _ls_android/_ls_ios (respectively), and determine if there's a file to be downloaded (or an entire folder) shouldn't be that difficult.
If it's something you'd like me to do a PR for, let me know.
@leonjza this is something I'd like to take on, can you assign this to me? Just wanting to make sure you're okay with this being implemented.
Current thoughts are:
- Modify
_ls_android/_ls_iosto externalize the actual logic calling the API into separate functions - Create new
_download_folder_android/_download_folder_iosfunctions which recurse through the respective_lsAPI commands from above and grab a list of files and directories - directories are passed back in to above_lscommands, and files are passed to_download_androidand_download_ios - Create
download_foldermethod, similar todownloadmethod that forwards to the OS-specific replacement - Write appropriate code to interface new method with CLI (likely copying
file download-related code tofolder download) - (optional) Refactor
download/_downloadmethods todownload_file/_download_fileto clearly show difference between file/folder downloads.
Hey, sounds awesome and thank you for taking the time! 🙌
I was wondering about this one, and also had some thoughts about it:
- Maybe we could just update the commands & hooks to trigger recursively if the target path we specify ends with
/or/*(or maybe even just automatically determine the target is a path irrespective)? - We could update hooks to use things like fileExistsAtPath:isDirectory: to easily determine if the target is a path.
- Once a path destination is detected, prompt for recursive download.
- Profit :P
As for extracting the _ls_* commands, I agree with your suggestion and think it makes sense to extract them to be easily used internally.
+1 for this feature, without this checking for data leaks is a mess with objection currently.
Much easier to: 1) download all files + 2) grep for leak on everything
Could this be given more priority please?
+1 for this feature. Is it in development yet? Do you guys need any help /contribution?