Skip to content

Cleanly passing through arbitrary flags to extraction tools (e.g. -no-xattrs to sasquatch) #1245

@mzpqnxow

Description

@mzpqnxow

Hello. Thanks for the continued work on this tool.

Description

This is a general feature request, though I'll use a specific example to describe the potential use

I occasionally work with firmware that makes use of extended attributes (xattrs). The default behavior of sasquatch appears to be to try to preserve them while extracting:

20:39:45 › sasquatch --help 2>&1 | grep xattr
	-no[-xattrs]		don't extract xattrs in file system
	-x[attrs]		extract xattrs in file system (default)              <-- "default"
	-u[ser-xattrs]		only extract user xattrs in file system.
				Enables extracting xattrs

I would like to inhibit setting xattrs

More generally, I would like to be able to pass arbitrary command-line flags to any extraction tool

Describe the solution you'd like

It would be useful if one could influence the command-line flags that are set for extraction tools. Perhaps as some sort of opaque string passthrough (e.g. --tool-options="sasquatch:-no-xattrs") or something the developers would prefer (configuration file, environment variable are a few other options that come to mind...)

Describe alternatives you've considered

The other alternatives are:

  1. Modify the code to insert the flags (either in-place, or, probably by copying the core plugins to a different directory, modifying them, and then pointing --plugins-path at that directory)
  2. Use wrappers (e.g. cp /usr/bin/sasquatch /usr/bin/sasquatch.real, then have /usr/bin/sasquatch as a shell script that just does /usr/bin/sasquatch.real -no-xattrs "$@" or something)
  3. Using tool-specific configuration files (I don't think this is a thing for sasquatch, though - and it's not a great generic solution since each tool would have its own convention anyway)
  4. ...

Additional context

Apologies in advanced if there is a way to do this - I'm still relatively new to unblob - proficient with its use, but have rarely delved into any advanced features - a testament to how well it's designed and implemented. I'll be thankful for pointers to any documentation particularly relevant to this, in case there's already a way to do it

Thanks!

Metadata

Metadata

Assignees

Labels

dependenciesPull requests that update a dependency fileenhancementNew feature or requestformat:filesystempythonPull requests that update Python codequestionFurther information is requested

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions