objection icon indicating copy to clipboard operation
objection copied to clipboard

Recursive Download of Apps Folder

Open ngkogkos opened this issue 7 years ago • 6 comments

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.

ngkogkos avatar Oct 17 '18 12:10 ngkogkos

@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.

aph3rson avatar May 24 '19 18:05 aph3rson

@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_ios to externalize the actual logic calling the API into separate functions
  • Create new _download_folder_android/_download_folder_ios functions which recurse through the respective _ls API commands from above and grab a list of files and directories - directories are passed back in to above _ls commands, and files are passed to _download_android and _download_ios
  • Create download_folder method, similar to download method that forwards to the OS-specific replacement
  • Write appropriate code to interface new method with CLI (likely copying file download-related code to folder download)
  • (optional) Refactor download/_download methods to download_file/_download_file to clearly show difference between file/folder downloads.

aph3rson avatar Jun 07 '19 17:06 aph3rson

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.

leonjza avatar Jun 07 '19 19:06 leonjza

+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?

7a avatar Mar 30 '20 15:03 7a

+1 for this feature. Is it in development yet? Do you guys need any help /contribution?

adayrodri avatar Aug 30 '22 14:08 adayrodri