-
Notifications
You must be signed in to change notification settings - Fork 35
Description
What I'm finding in a bunch of cases is a need for unpack plugins to have access to multiple files at the same time in order to complete a full unpack. Here is an example... I ported the following go
code to python:
packsparseimg.go
The idea with this is that there is a rawprogram*.xml
file that holds information about how to unpack the img files that go with it. So for instance there can be several userdata_x.img
files, and the xml file contains the offsets of where to write the individual files in order to resemble the outer image.
This isn't a problem if the outer container format is known. For instance, if it's a tar
file I could add functionality to the patool
plugin to check for rawprogram*.xml
files and process them. But now if the outer container is a 7z
file, then I have to duplicate that functionality to the 7z
plugin. I can put this functionality in a helper class that's available from several plugins, but that doesn't feel very extensible.
What I'd like to see is a different type of plugin that registers a file pattern to look for in extracted files, if found, it calls this plugin with the directory that contains the extracted files so that it can re-assemble the .img files into something another plugin can then unpack in isolation.
In my opinion this makes it more module and extensible, but would like your opinion about this. Are you open to this plan? If I implement this in a fork will you consider a PR with this functionality? If this doesn't sound appealing or you have objections I'd love to hear them and I'll adjust accordingly.