mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 14:56:19 -04:00
39 lines
797 B
JavaScript
39 lines
797 B
JavaScript
![]() |
/**
|
||
|
* Node view for CyberChef.
|
||
|
*
|
||
|
* @author n1474335 [n1474335@gmail.com]
|
||
|
* @copyright Crown Copyright 2017
|
||
|
* @license Apache-2.0
|
||
|
*/
|
||
|
|
||
|
// Define global environment functions
|
||
|
global.ENVIRONMENT_IS_WORKER = function() {
|
||
|
return typeof importScripts === "function";
|
||
|
};
|
||
|
global.ENVIRONMENT_IS_NODE = function() {
|
||
|
return typeof process === "object" && typeof require === "function";
|
||
|
};
|
||
|
global.ENVIRONMENT_IS_WEB = function() {
|
||
|
return typeof window === "object";
|
||
|
};
|
||
|
|
||
|
import Chef from "../core/Chef";
|
||
|
|
||
|
const CyberChef = {
|
||
|
|
||
|
bake: function(input, recipeConfig) {
|
||
|
this.chef = new Chef();
|
||
|
return this.chef.bake(
|
||
|
input,
|
||
|
recipeConfig,
|
||
|
{},
|
||
|
0,
|
||
|
false
|
||
|
);
|
||
|
}
|
||
|
|
||
|
};
|
||
|
|
||
|
export default CyberChef;
|
||
|
export {CyberChef};
|