new Chef()
The main controller for CyberChef.
- Copyright:
-
- Crown Copyright 2016
- License:
-
- Apache-2.0
- Source:
Methods
-
bake(input_text, recipe_config, options, progress [, step])
-
Runs the recipe over the input.
Parameters:
Name Type Argument Description input_text
string The input data as a string
recipe_config
Array.<Object> The recipe configuration object
options
Object The options object storing various user choices
Properties
Name Type Description attemp_highlight
boolean Whether or not to attempt highlighting
progress
number The position in the recipe to start from
step
number <optional>
The number of operations to execute
- Source:
Returns:
-
response
- Type
- Object
-
response.result - The output of the recipe
- Type
- string
-
response.type - The data type of the result
- Type
- string
-
response.progress - The position that we have got to in the recipe
- Type
- number
-
response.options - The app options object (which may have been changed)
- Type
- number
-
response.duration - The number of ms it took to execute the recipe
- Type
- number
-
response.error - The error object thrown by a failed operation (false if no error)
- Type
- number
-
silent_bake(recipe_config)
-
When a browser tab is unfocused and the browser has to run lots of dynamic content in other tabs,
it swaps out the memory for that tab. If the CyberChef tab has been unfocused for more than a
minute, we run a silent bake which will force the browser to load and cache all the relevant
JavaScript code needed to do a real bake.This will stop baking taking a long time when the CyberChef browser tab has been unfocused for a
long time and the browser has swapped out all its memory.The output will not be modified (hence "silent" bake).
This will only actually execute the recipe if auto-bake is enabled, otherwise it will just load
the recipe, ingredients and dish.Parameters:
Name Type Description recipe_config
Array.<Object> The recipe configuration object
- Source:
Returns:
The time it took to run the silent bake in milliseconds.
- Type
- number