Open superponible opened 4 weeks ago
That's just the error messages that the plugin spits out.
All argparse arguments are converted from _
to -
because you can't have variables with -
in the middle (because of the confusion with minus) done here in the current codebase. The error messages probably should be updated not to assume command line parameters (because there ARE other UIs for the volatility library, even though everyone forgets about them). So ideally, the error messages would say Only config options kernel_module or pid should be set, not both
and then it's up to the user to translate that into something for their UI. If we wanted, we could have a ConfigOptionException
that gets caught by the UI and the options in it translated for the UI, but it'd be opening up a (somewhat small) can of worms to try and do all that.
So the issue at the heart of this is "config options and UI options don't necessarily match up perfectly, so requirements on config options will throw errors that might not map perfectly to the UI". Happy for suggestions of how best to fix it, but those suggestions need to be UI independent. The CLI is not special, and shouldn't get special treatment.
Describe the bug The error messages in pedump don't match the expected arguments because of the hyphen vs underscore in kernel-module. @ikelos not sure if the error message should just be updated or the "kernel_module" argument should be changed to "kernel-module" at https://github.com/volatilityfoundation/volatility3/blob/develop/volatility3/framework/plugins/windows/pedump.py#L47, but that could affect any code that's expecting the underscore
To Reproduce Steps to reproduce the behavior:
Help shows "kernel-module"
The output message when the command is incorrect shows "kernel_module":
But if a user tried to run that way it would fail
As the actual argument is "kernel-module" even though the code is "kernel_module".