Open nand-nor opened 4 years ago
May potentially be support for this in a more heavyweight arg parsing crate (possible such as clap?). Would not mind upgrading from argparse
to a better mechanism-- argparse
, while nice for many reasons, is somewhat limited and it may be the case that the complexity of this program requires something more heavyweight. Need to do more research into potential options.
Need to add an additional mechanism to specify complex injection and modification options (see issues #4 and #3, which depend on this to work) .
Intention is to enable users to specify a config file in json format, such as
path/to/dedelf.json
where the contents ofdedelf.json
includes some combination of the following:Where
mode
may be one of the following:injection
,modify
,ordual
. Ifinjection
mode, provide desired fields under theinjection-options
header, add the same formodify
mode, and provide any desired injection options (if not wanting the defaults) along with at least 1 modification option (seeexec-options
fields,header-sec-options
fields, etc. Optionally specify outfile-- if omitted then the bytes will be written to the infile name with_inj
appended to the string.Users should omit the fields relating to functionality that is not to be applied, rather than leave then blank. Any blank fields retained in the .json will be treated as an error and halt program execution. Note: need to look up if this is possible for json parsing in this manner...