Run CyberChef in a server and provide an API for clients to send Cyberchef recipes to bake.
CyberChef has a useful Node.js API, but sometimes we want to be able to programmatically run CyberChef recipes in languages other than JavaScript. By running this server, you can use CyberChef operations in any language, as long as you can communicate via HTTP.
Assuming you've downloaded the repository and are running it locally:
curl -X POST -H "Content-Type:application/json" -d '{"input":"... ---:.-.. --- -. --. --..--:.- -. -..:- .... .- -. -.- ...:..-. --- .-.:.- .-.. .-..:- .... .:..-. .. ... ....", "recipe":{"op":"from morse code", "args": {"wordDelimiter": "Colon"}}}' localhost:3000/bake
response:
SO LONG, AND THANKS FOR ALL THE FISH
- Compatible with recipes saved from CyberChef.
After using CyberChef to experiment and find a suitable recipe, the exported recipe JSON can be used to post to the
/bake
endpoint. Just copy/paste it in as yourrecipe
property as part of the POST body.
- Clone the repository
cd
into the project and runnpm install
- Run
npm run
- In a browser, navigate to
localhost:3000
to see usage documentation.
For full documentation of the API, you can find the swagger page hosted at the root url. See Installing to run the application and browse the docs.
Currently the server just has one endpoint: /bake
. This endpoint accepts a POST request with the following body:
Parameter | Type | Description |
---|---|---|
input | String | The input data for the recipe. Currently accepts strings. |
recipe | String or Object or Array | One or more operations, with optional arguments. Uses default arguments if they're not defined here. |
{
"input": "One, two, three, four.",
"recipe": "to decimal"
}
// response: 79 110 101 44 32 116 119 111 44 32 116 104 114 101 101 44 32 102 111 117 114 46
For more information on how operation names are handled, see the Node API docs
{
"input": "One, two, three, four.",
"recipe": {
"op": "to decimal",
"args": {
"delimiter": "Colon"
}
}
}
// response: 79:110:101:44:32:116:119:111:44:32:116:104:114:101:101:44:32:102:111:117:114:46
{
"input": "One, two, three, four.",
"recipe": {
"op": "to decimal",
"args": ["Colon"]
}
}
// response: 79:110:101:44:32:116:119:111:44:32:116:104:114:101:101:44:32:102:111:117:114:46
{
"input": "One, two, three, four.",
"recipe": [
{
"op":"to decimal",
"args": {
"delimiter": "CRLF"
}
},
{
"op": "swap endianness",
"args": ["Raw"]
},
"MD4"
]
}
// response: 31d6cfe0d16ae931b73c59d7e0c089c0
CyberChef-server is released under the Apache 2.0 Licence and is covered by Crown Copyright.