One sentence summary of this PR (This should go in the CHANGELOG!)
Add option to the CLI to import and discover additional OFRAK Python packages when starting OFRAK.
Link to Related Issue(s)
This is similar to the existing --backend option which lets users choose one of a static set of backends, but that option didn't allow users to easily extend OFRAK and load their extensions in the CLI.
Please describe the changes in your request.
Add -i/--import option to dynamically import and discover additional Python modules
These don't have to be installed modules; they can be a local file (e.g. -i ./my_extension.py), detected with the presence of the OS's path separator (e.g. "/" for Mac or Linux) or the ".py" file extension at the end. Importing these requires adding their directory to the system path.
Limit the values passed to the "--backend" argument to only the valid disassemblers
Change how handing the "--backend" argument is handled to use the same mechanism as -i/--import
Anyone you think should look at this, specifically?
@rbs-jacob
Unfortunately doing these dynamic imports by package name adds a few seconds to the startup time.
…ting OFRAK from cli
One sentence summary of this PR (This should go in the CHANGELOG!)
Link to Related Issue(s) This is similar to the existing
--backend
option which lets users choose one of a static set of backends, but that option didn't allow users to easily extend OFRAK and load their extensions in the CLI.Please describe the changes in your request.
-i
/--import
option to dynamically import and discover additional Python modules-i ./my_extension.py
), detected with the presence of the OS's path separator (e.g. "/" for Mac or Linux) or the ".py" file extension at the end. Importing these requires adding their directory to the system path.-i
/--import
Anyone you think should look at this, specifically? @rbs-jacob Unfortunately doing these dynamic imports by package name adds a few seconds to the startup time.