As shown in #203, currently the shodan convert command only supports converting .json.gz files to one of the supported file types listed in the CLI help menu.
There are currently no guardrails in place that would prevent a user from converting a file type other than .json.gz to any file type.
Enhancement
I am proposing the following:
Implement input validation to ensure that the input file type has a file extension of json.gz. Implementation should be contained within a function so that it is referenced as a keyword parameter in the @click.argument input argument.
Implement input validation to ensure that the output format for the shodan convert command is one of the supported file types. Implementation should be contained within a function so that it is referenced as a keyword parameter @click.argument for the format argument.
Issue
As shown in #203, currently the
shodan convert
command only supports converting .json.gz files to one of the supported file types listed in the CLI help menu.There are currently no guardrails in place that would prevent a user from converting a file type other than .json.gz to any file type.
Enhancement
I am proposing the following:
Implement input validation to ensure that the input file type has a file extension of json.gz. Implementation should be contained within a function so that it is referenced as a keyword parameter in the
@click.argument
input argument.Implement input validation to ensure that the output format for the
shodan convert
command is one of the supported file types. Implementation should be contained within a function so that it is referenced as a keyword parameter@click.argument
for the format argument.