-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Getting started
CyberChef uses the Grunt build system, so it's very easy to install. You'll need to carry out the following steps to get going:
- Install Git
- Install Node.js and its package manager, npm
- Install Grunt:
npm install -g grunt-cli git clone https://github.com/gchq/CyberChef.gitcd CyberChefnpm install
npm will then install all the dependencies needed by Grunt.
Grunt has been configured with several tasks to aid in the development process:
grunt dev
Use this when developing new functionality. It will launch a persistent task which will automatically build an uncompressed, development version of CyberChef located in
build/dev. Whenever a source file is modified, the development version will be rebuilt.
grunt prod
When you are ready to create a production build, run this command. It will lint, test, concatenate, and compress all the source files and create a production-ready build in
build/prod. It will also create the inline version of CyberChef at the same location, calledcyberchef.htm.
grunt node
This will package up CyberChef as a NodeJS library, creating the file
build/node/CyberChef.js. It can then be loaded and used like so:> var chef = require("./CyberChef.js") undefined > chef.bake("test", [{"op":"To Hex","args":["Space"]}]) { result: '74 65 73 74', type: 'string', progress: 1, options: {}, duration: 2, error: false }
grunt test
This will run all the pre-configured tests and output the results to stdout.
grunt docs
Builds the codebase documentation and places it in the
docsdirectory.
-
build/-
dev/- This will be populated with an uncompressed development build of CyberChef by running thegrunt devcommand. -
prod/- This folder contains the most recently built production version of CyberChef including the inline version. It is populated by runninggrunt prod. -
node/- Populated with the packaged NodeJS version of CyberChef by running thegrunt nodecommand.
-
-
src/-
core/- Core CyberChef files that make up the heart of the application-
config/- Files specifying the operation configurations -
lib/- Libraries that we can't currently import through npm -
operations/- Operation objects
-
-
node/- Wrappers for the NodeJS version of CyberChef -
web/- The code which makes up the CyberChef web app-
css/-
lib/- Library CSS and Less files -
structure/- Structural styles to lay out the stage -
themes/- Look and feel styles
-
-
html/-
index.html- The CyberChef page structure
-
-
static/- Static files like images
-
-
-
docs/- Codebase documentation, populated by runninggrunt docs. -
test/-
tests/- Configuration for tests on operations and recipes
-
-
.babelrc- Babel transpilation configuration -
Gruntfile.js- Grunt build process configuration -
LICENSE- The Apache 2.0 licence information -
package.json- npm configuration and a list of all the dependencies -
README.md- An introduction to CyberChef