2016-11-28 10:42:58 +00:00
|
|
|
/**
|
|
|
|
* @author n1474335 [n1474335@gmail.com]
|
|
|
|
* @copyright Crown Copyright 2016
|
|
|
|
* @license Apache-2.0
|
|
|
|
*/
|
|
|
|
|
2017-03-21 22:41:44 +00:00
|
|
|
require("bootstrap");
|
|
|
|
require("bootstrap-colorpicker");
|
|
|
|
require("bootstrap-switch");
|
|
|
|
var CanvasComponents = require("../../lib/canvascomponents.js");
|
|
|
|
|
|
|
|
var HTMLApp = require("./HTMLApp.js"),
|
|
|
|
Categories = require("../../config/Categories.js"),
|
|
|
|
OperationConfig = require("../../config/OperationConfig.js");
|
|
|
|
|
2016-11-28 10:42:58 +00:00
|
|
|
/**
|
|
|
|
* Main function used to build the CyberChef web app.
|
|
|
|
*/
|
|
|
|
var main = function() {
|
2017-01-31 18:24:56 +00:00
|
|
|
var defaultFavourites = [
|
2016-11-28 10:42:58 +00:00
|
|
|
"To Base64",
|
|
|
|
"From Base64",
|
|
|
|
"To Hex",
|
|
|
|
"From Hex",
|
|
|
|
"To Hexdump",
|
|
|
|
"From Hexdump",
|
|
|
|
"URL Decode",
|
|
|
|
"Regular expression",
|
|
|
|
"Entropy",
|
|
|
|
"Fork"
|
|
|
|
];
|
2017-02-09 15:09:33 +00:00
|
|
|
|
2017-01-31 18:24:56 +00:00
|
|
|
var defaultOptions = {
|
|
|
|
updateUrl : true,
|
|
|
|
showHighlighter : true,
|
|
|
|
treatAsUtf8 : true,
|
|
|
|
wordWrap : true,
|
|
|
|
showErrors : true,
|
|
|
|
errorTimeout : 4000,
|
|
|
|
autoBakeThreshold : 200,
|
|
|
|
attemptHighlight : true,
|
2016-11-28 10:42:58 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
document.removeEventListener("DOMContentLoaded", main, false);
|
2017-01-31 18:24:56 +00:00
|
|
|
window.app = new HTMLApp(Categories, OperationConfig, defaultFavourites, defaultOptions);
|
2016-11-28 10:42:58 +00:00
|
|
|
window.app.setup();
|
|
|
|
};
|
|
|
|
|
|
|
|
// Fix issues with browsers that don't support console.log()
|
|
|
|
window.console = console || {log: function() {}, error: function() {}};
|
|
|
|
|
2017-02-07 20:31:15 +00:00
|
|
|
window.compileTime = moment.tz("<%= compileTime %>", "DD/MM/YYYY HH:mm:ss z", "UTC").valueOf();
|
2017-01-31 18:24:56 +00:00
|
|
|
window.compileMessage = "<%= compileMsg %>";
|
2016-11-28 10:42:58 +00:00
|
|
|
|
|
|
|
document.addEventListener("DOMContentLoaded", main, false);
|