mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 16:26:16 -04:00
36 lines
804 B
JavaScript
36 lines
804 B
JavaScript
/**
|
|
* Create a REPL server for chef
|
|
*
|
|
*
|
|
* @author d98762656 [d98762625@gmail.com]
|
|
* @copyright Crown Copyright 2018
|
|
* @license Apache-2.0
|
|
*/
|
|
|
|
import chef from "./index.mjs";
|
|
import repl from "repl";
|
|
|
|
|
|
/* eslint no-console: ["off"] */
|
|
|
|
console.log(`
|
|
______ __ ________ ____
|
|
/ ____/_ __/ /_ ___ _____/ ____/ /_ ___ / __/
|
|
/ / / / / / __ \\/ _ \\/ ___/ / / __ \\/ _ \\/ /_
|
|
/ /___/ /_/ / /_/ / __/ / / /___/ / / / __/ __/
|
|
\\____/\\__, /_.___/\\___/_/ \\____/_/ /_/\\___/_/
|
|
/____/
|
|
|
|
`);
|
|
const replServer = repl.start({
|
|
prompt: "chef > ",
|
|
});
|
|
|
|
global.File = chef.File;
|
|
|
|
Object.keys(chef).forEach((key) => {
|
|
if (key !== "operations") {
|
|
replServer.context[key] = chef[key];
|
|
}
|
|
});
|
|
|