You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be very helpful to have a command line interface for performing CyberChef operations on local files without the need for a GUI web app.
@d98762625 suggested I create this ticket to be a better venue than PR #1043 for the design discussion of what CyberChef's official CLI could look like.
Design considerations
An ideal CLI would have a fairly simple interface. The only inputs needed are:
A recipe, being a list of operations to perform
A list of files upon which to perform the operations
A directory or file into which to place the output
In keeping with a common paradigm in unix-like operating systems, if no input files are given, then input should come from stdin; likewise, if no output destination is specified, then output should go to stdout. This is to accommodate the very common practice of chaining several single-purpose commands together to address specific needs.
A CLI would not replace the web app, and should not be designed with feature-parity to the web app in mind. The thrust of this ticket is to get command-line access to the operations which CyberChef provides, for use on data which shouldn't or can't easily be loaded into the web app.
A CLI would not replace the Node API, and should not be designed to expose every last detail of that API. Using the CLI should be easier for the general case than writing a program.
Specifying recipes
There are many ways one could specify a recipe to the CLI, and this is probably where most of the complexity will come from. The CLI could possibly support multiple ways of receiving the recipe. Some possibilities:
String of JSON from a file
eg. from CyberChef's "Save Recipe → Clean JSON" or "→ Compact JSON" dialog
List of "Chef Format" operations in a file
eg. from CyberChef's "Save Recipe → Chef Format" dialog
Simplified semantic format leveraging the flexibility of chef.bake(): 'tobase64:A-Za-z0-9+/=' to-hex:none
I ordered these roughly from least to most end-user friendly, but they aren't mutually exclusive. Some use cases are easier when loading a pre-composed recipe from a file, while others are easier by specifying operations on the command line.
The text was updated successfully, but these errors were encountered:
It would be very helpful to have a command line interface for performing CyberChef operations on local files without the need for a GUI web app.
@d98762625 suggested I create this ticket to be a better venue than PR #1043 for the design discussion of what CyberChef's official CLI could look like.
Design considerations
An ideal CLI would have a fairly simple interface. The only inputs needed are:
In keeping with a common paradigm in unix-like operating systems, if no input files are given, then input should come from stdin; likewise, if no output destination is specified, then output should go to stdout. This is to accommodate the very common practice of chaining several single-purpose commands together to address specific needs.
A CLI would not replace the web app, and should not be designed with feature-parity to the web app in mind. The thrust of this ticket is to get command-line access to the operations which CyberChef provides, for use on data which shouldn't or can't easily be loaded into the web app.
A CLI would not replace the Node API, and should not be designed to expose every last detail of that API. Using the CLI should be easier for the general case than writing a program.
Specifying recipes
There are many ways one could specify a recipe to the CLI, and this is probably where most of the complexity will come from. The CLI could possibly support multiple ways of receiving the recipe. Some possibilities:
To_Base64('A-Za-z0-9+/=') To_Hex('None')
chef.bake()
:'tobase64:A-Za-z0-9+/=' to-hex:none
I ordered these roughly from least to most end-user friendly, but they aren't mutually exclusive. Some use cases are easier when loading a pre-composed recipe from a file, while others are easier by specifying operations on the command line.
The text was updated successfully, but these errors were encountered: