mirror of
https://github.com/gchq/CyberChef
synced 2025-01-09 02:58:46 +00:00
65 lines
1.7 KiB
JavaScript
Executable file
65 lines
1.7 KiB
JavaScript
Executable file
/**
|
|
* @author n1474335 [n1474335@gmail.com]
|
|
* @copyright Crown Copyright 2016
|
|
* @license Apache-2.0
|
|
*/
|
|
|
|
// Styles
|
|
import "./stylesheets/index.js";
|
|
|
|
// Libs
|
|
import "babel-polyfill";
|
|
import "bootstrap";
|
|
import "bootstrap-switch";
|
|
import "bootstrap-colorpicker";
|
|
import CanvasComponents from "../core/lib/canvascomponents.js";
|
|
|
|
// CyberChef
|
|
import App from "./App.js";
|
|
import Categories from "../core/config/Categories.js";
|
|
import OperationConfig from "../core/config/MetaConfig.js";
|
|
|
|
|
|
/**
|
|
* Main function used to build the CyberChef web app.
|
|
*/
|
|
function main() {
|
|
const defaultFavourites = [
|
|
"To Base64",
|
|
"From Base64",
|
|
"To Hex",
|
|
"From Hex",
|
|
"To Hexdump",
|
|
"From Hexdump",
|
|
"URL Decode",
|
|
"Regular expression",
|
|
"Entropy",
|
|
"Fork"
|
|
];
|
|
|
|
const defaultOptions = {
|
|
updateUrl: true,
|
|
showHighlighter: true,
|
|
treatAsUtf8: true,
|
|
wordWrap: true,
|
|
showErrors: true,
|
|
errorTimeout: 4000,
|
|
attemptHighlight: true,
|
|
theme: "classic",
|
|
useMetaKey: false,
|
|
outputFileThreshold: 1024,
|
|
logLevel: "info"
|
|
};
|
|
|
|
document.removeEventListener("DOMContentLoaded", main, false);
|
|
window.app = new App(Categories, OperationConfig, defaultFavourites, defaultOptions);
|
|
window.app.setup();
|
|
}
|
|
|
|
window.compileTime = moment.tz(COMPILE_TIME, "DD/MM/YYYY HH:mm:ss z", "UTC").valueOf();
|
|
window.compileMessage = COMPILE_MSG;
|
|
|
|
// Make libs available to operation outputs
|
|
window.CanvasComponents = CanvasComponents;
|
|
|
|
document.addEventListener("DOMContentLoaded", main, false);
|