From 2480dca47396baa0b773c911c6bd95e970751e6d Mon Sep 17 00:00:00 2001 From: d98762625 Date: Fri, 6 Jul 2018 11:13:38 +0100 Subject: [PATCH] Make help function use OperationConfig.json file Tidy up Gruntfile execs --- .gitignore | 1 + Gruntfile.js | 28 +- package-lock.json | 195 +-- package.json | 2 +- src/node/apiUtils.mjs | 64 +- src/node/config/scripts/generateNodeIndex.mjs | 13 +- src/node/repl-index.mjs | 1254 +++++++++++++++++ test/tests/nodeApi/nodeApi.mjs | 4 +- 8 files changed, 1396 insertions(+), 165 deletions(-) create mode 100644 src/node/repl-index.mjs diff --git a/.gitignore b/.gitignore index 186bf9b7..fff823ce 100755 --- a/.gitignore +++ b/.gitignore @@ -10,5 +10,6 @@ src/core/config/modules/* src/core/config/OperationConfig.json src/core/operations/index.mjs src/node/index.mjs +src/node/config/OperationConfig.json **/*.DS_Store \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index 793e9da1..eb64adb8 100755 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -22,15 +22,15 @@ module.exports = function (grunt) { // Tasks grunt.registerTask("dev", "A persistent task which creates a development build whenever source files are modified.", - ["clean:dev", "exec:generateOpsIndex", "exec:generateConfig", "concurrent:dev"]); + ["clean:dev", "exec:generateConfig", "concurrent:dev"]); grunt.registerTask("node", "Compiles CyberChef into a single NodeJS module.", - ["clean:node", "clean:config", "exec:generateOpsIndex", "exec:generateNodeIndex", "webpack:node", "chmod:build"]); + ["clean", "exec:generateConfig", "exec:generateNodeIndex", "webpack:node", "chmod:build"]); grunt.registerTask("test", "A task which runs all the tests in test/tests.", - ["clean", "exec:generateOpsIndex", "exec:generateNodeIndex", "exec:generateConfig", "exec:tests"]); + ["clean", "exec:generateConfig", "exec:generateNodeIndex", "exec:generateConfig", "exec:tests"]); grunt.registerTask("docs", "Compiles documentation in the /docs directory.", @@ -38,7 +38,7 @@ module.exports = function (grunt) { grunt.registerTask("prod", "Creates a production-ready build. Use the --msg flag to add a compile message.", - ["eslint", "clean:prod", "exec:generateOpsIndex", "exec:generateConfig", "webpack:web", "inline", "chmod"]); + ["eslint", "clean:prod", "exec:generateConfig", "webpack:web", "inline", "chmod"]); grunt.registerTask("default", "Lints the code base", @@ -46,7 +46,7 @@ module.exports = function (grunt) { grunt.registerTask("inline", "Compiles a production build of CyberChef into a single, portable web page.", - ["exec:generateOpsIndex", "exec:generateConfig", "webpack:webInline", "runInliner", "clean:inlineScripts"]); + ["exec:generateConfig", "webpack:webInline", "runInliner", "clean:inlineScripts"]); grunt.registerTask("runInliner", runInliner); @@ -135,7 +135,7 @@ module.exports = function (grunt) { dev: ["build/dev/*"], prod: ["build/prod/*"], node: ["build/node/*"], - config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs", "src/node/index.mjs"], + config: ["src/core/config/OperationConfig.json", "src/core/config/modules/*", "src/code/operations/index.mjs", "src/node/index.mjs", "src/node/config/OperationConfig.json"], docs: ["docs/*", "!docs/*.conf.json", "!docs/*.ico", "!docs/*.png"], inlineScripts: ["build/prod/scripts.js"], }, @@ -379,6 +379,7 @@ module.exports = function (grunt) { generateConfig: { command: [ "echo '\n--- Regenerating config files. ---'", + "node --experimental-modules src/core/config/scripts/generateOpsIndex.mjs", "mkdir -p src/core/config/modules", "echo 'export default {};\n' > src/core/config/modules/OpModules.mjs", "echo '[]\n' > src/core/config/OperationConfig.json", @@ -386,17 +387,16 @@ module.exports = function (grunt) { "echo '--- Config scripts finished. ---\n'" ].join(";") }, - generateOpsIndex: { - command: [ - "echo '\n--- Regenerating operations index. ---'", - "node --experimental-modules src/core/config/scripts/generateOpsIndex.mjs", - "echo '\n--- Ops index generated. ---'", - ].join(";") - }, generateNodeIndex: { command: [ "echo '\n--- Regenerating node index ---'", - "mkdir -p src/core/config/modules", + + "echo 'Copying OperationConfig.json and wiping original'", + "cp src/core/config/OperationConfig.json src/node/config/OperationConfig.json", + "echo 'export default {};\n' > src/core/config/modules/OpModules.mjs", + "echo '[]\n' > src/core/config/OperationConfig.json", + "echo '\n OperationConfig.json copied to src/node/config. Modules wiped.'", + "echo 'export default {};\n' > src/core/config/modules/OpModules.mjs", "echo '[]\n' > src/core/config/OperationConfig.json", "node --experimental-modules src/node/config/scripts/generateNodeIndex.mjs", diff --git a/package-lock.json b/package-lock.json index 138c9ea7..4a2ddfba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4845,9 +4845,9 @@ "dev": true }, "grunt": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.2.tgz", - "integrity": "sha1-TmpeaVtwRy/VME9fqeNCNoNqc7w=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.0.3.tgz", + "integrity": "sha512-/JzmZNPfKorlCrrmxWqQO4JVodO+DVd5XX4DkocL/1WlLlKVLE9+SdEIempOAxDhWPysLle6afvn/hg7Ck2k9g==", "dev": true, "requires": { "coffeescript": "1.10.0", @@ -4858,16 +4858,49 @@ "glob": "7.0.6", "grunt-cli": "1.2.0", "grunt-known-options": "1.1.0", - "grunt-legacy-log": "1.0.2", - "grunt-legacy-util": "1.0.0", + "grunt-legacy-log": "2.0.0", + "grunt-legacy-util": "1.1.1", "iconv-lite": "0.4.23", "js-yaml": "3.5.5", "minimatch": "3.0.4", + "mkdirp": "0.5.1", "nopt": "3.0.6", "path-is-absolute": "1.0.1", - "rimraf": "2.2.8" + "rimraf": "2.6.2" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "1.9.1" + } + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "chalk": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.1.tgz", + "integrity": "sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==", + "dev": true, + "requires": { + "ansi-styles": "3.2.1", + "escape-string-regexp": "1.0.5", + "supports-color": "5.4.0" + } + }, + "colors": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", + "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "dev": true + }, "esprima": { "version": "2.7.3", "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", @@ -4900,6 +4933,49 @@ "resolve": "1.1.7" } }, + "grunt-legacy-log": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-2.0.0.tgz", + "integrity": "sha512-1m3+5QvDYfR1ltr8hjiaiNjddxGdQWcH0rw1iKKiQnF0+xtgTazirSTGu68RchPyh1OBng1bBUjLmX8q9NpoCw==", + "dev": true, + "requires": { + "colors": "1.1.2", + "grunt-legacy-log-utils": "2.0.1", + "hooker": "0.2.3", + "lodash": "4.17.10" + } + }, + "grunt-legacy-log-utils": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.0.1.tgz", + "integrity": "sha512-o7uHyO/J+i2tXG8r2bZNlVk20vlIFJ9IEYyHMCQGfWYru8Jv3wTqKZzvV30YW9rWEjq0eP3cflQ1qWojIe9VFA==", + "dev": true, + "requires": { + "chalk": "2.4.1", + "lodash": "4.17.10" + } + }, + "grunt-legacy-util": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.1.1.tgz", + "integrity": "sha512-9zyA29w/fBe6BIfjGENndwoe1Uy31BIXxTH3s8mga0Z5Bz2Sp4UCjkeyv2tI449ymkx3x26B+46FV4fXEddl5A==", + "dev": true, + "requires": { + "async": "1.5.2", + "exit": "0.1.2", + "getobject": "0.1.0", + "hooker": "0.2.3", + "lodash": "4.17.10", + "underscore.string": "3.3.4", + "which": "1.3.0" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, "js-yaml": { "version": "3.5.5", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.5.5.tgz", @@ -4910,11 +4986,24 @@ "esprima": "2.7.3" } }, - "rimraf": { - "version": "2.2.8", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz", - "integrity": "sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=", - "dev": true + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "3.0.0" + } + }, + "underscore.string": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.4.tgz", + "integrity": "sha1-LCo/n4PmR2L9xF5s6sZRQoZCE9s=", + "dev": true, + "requires": { + "sprintf-js": "1.0.3", + "util-deprecate": "1.0.2" + } } } }, @@ -5097,82 +5186,6 @@ "integrity": "sha1-pCdO6zL6dl2lp6OxcSYXzjsUQUk=", "dev": true }, - "grunt-legacy-log": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-1.0.2.tgz", - "integrity": "sha512-WdedTJ/6zCXnI/coaouzqvkI19uwqbcPkdsXiDRKJyB5rOUlOxnCnTVbpeUdEckKVir2uHF3rDBYppj2p6N3+g==", - "dev": true, - "requires": { - "colors": "1.1.2", - "grunt-legacy-log-utils": "1.0.0", - "hooker": "0.2.3", - "lodash": "4.17.10" - }, - "dependencies": { - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", - "dev": true - } - } - }, - "grunt-legacy-log-utils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-1.0.0.tgz", - "integrity": "sha1-p7ji0Ps1taUPSvmG/BEnSevJbz0=", - "dev": true, - "requires": { - "chalk": "1.1.3", - "lodash": "4.3.0" - }, - "dependencies": { - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=", - "dev": true - } - } - }, - "grunt-legacy-util": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-1.0.0.tgz", - "integrity": "sha1-OGqnjcbtUJhsKxiVcmWxtIq7m4Y=", - "dev": true, - "requires": { - "async": "1.5.2", - "exit": "0.1.2", - "getobject": "0.1.0", - "hooker": "0.2.3", - "lodash": "4.3.0", - "underscore.string": "3.2.3", - "which": "1.2.14" - }, - "dependencies": { - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", - "dev": true - }, - "lodash": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.3.0.tgz", - "integrity": "sha1-79nEpuxT87BUEkKZFcPkgk5NJaQ=", - "dev": true - }, - "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", - "dev": true, - "requires": { - "isexe": "2.0.0" - } - } - } - }, "grunt-webpack": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/grunt-webpack/-/grunt-webpack-3.1.2.tgz", @@ -5441,7 +5454,7 @@ "integrity": "sha512-xG6E3g2V/huu/WwRcrX3AFRmAUFkU7PWlgF/QFLtuRitI+NxvJcYTFthb24rB7/mhKE3khSIxB11A8IQTJ2N9w==", "dev": true, "requires": { - "grunt": "1.0.2", + "grunt": "1.0.3", "grunt-contrib-copy": "1.0.0", "grunt-contrib-jshint": "1.1.0", "grunt-contrib-watch": "1.1.0", @@ -10862,12 +10875,6 @@ } } }, - "underscore.string": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.2.3.tgz", - "integrity": "sha1-gGmSYzZl1eX8tNsfs6hi62jp5to=", - "dev": true - }, "union-value": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.0.tgz", diff --git a/package.json b/package.json index 829e30e1..8153aa42 100644 --- a/package.json +++ b/package.json @@ -39,7 +39,7 @@ "exports-loader": "^0.7.0", "extract-text-webpack-plugin": "^4.0.0-alpha0", "file-loader": "^1.1.11", - "grunt": ">=1.0.2", + "grunt": "^1.0.3", "grunt-accessibility": "~6.0.0", "grunt-chmod": "~1.1.1", "grunt-concurrent": "^2.3.1", diff --git a/src/node/apiUtils.mjs b/src/node/apiUtils.mjs index 08a3d62e..c3fefd24 100644 --- a/src/node/apiUtils.mjs +++ b/src/node/apiUtils.mjs @@ -7,6 +7,7 @@ */ import SyncDish from "./SyncDish"; +import OperationConfig from "./config/OperationConfig.json"; /** * Extract default arg value from operation argument @@ -134,56 +135,31 @@ export function decapitalise(name) { } -/** - * Extract properties from an operation by instantiating it and - * returning some of its properties for reference. - * @param {Operation} Operation - the operation to extract info from - * @returns {Object} operation properties - */ -function extractOperationInfo(Operation) { - const operation = new Operation(); - return { - name: decapitalise(operation.name).replace(/ /g, ""), - module: operation.module, - description: operation.description, - inputType: operation.inputType, - outputType: operation.outputType, - // Make arg names lowercase, no spaces to encourage non-sentence - // caps in repl - args: Object.assign([], operation.args).map((s) => { - s.name = decapitalise(s.name).replace(/ /g, ""); - return s; - }) - }; -} - - /** * @namespace Api - * @param {Operation[]} operations - an object filled with operations. * @param {String} searchTerm - the name of the operation to get help for. * Case and whitespace are ignored in search. - * @returns {Function} taking search term and outputting description. + * @returns {Object} Describe function matching searchTerm. */ -export function help(operations) { - return function(searchTerm) { - let sanitised = false; - if (typeof searchTerm === "string") { - sanitised = searchTerm; - } else if (typeof searchTerm === "function") { - sanitised = searchTerm.opName; - } +export function help(searchTerm) { + let sanitised = false; + if (typeof searchTerm === "string") { + sanitised = searchTerm; + } else if (typeof searchTerm === "function") { + sanitised = searchTerm.opName; + } - if (!sanitised) { - return null; - } - - const operation = operations - .find(o => o.name.toLowerCase() === sanitised.replace(/ /g, "").toLowerCase()); - if (operation) { - return extractOperationInfo(operation); - } + if (!sanitised) { return null; - }; + } + + const key = Object.keys(OperationConfig) + .find(o => o.replace(/ /g, "").toLowerCase() === sanitised.replace(/ /g, "").toLowerCase()); + if (key) { + const result = OperationConfig[key]; + result.name = key; + return result; + } + return null; } diff --git a/src/node/config/scripts/generateNodeIndex.mjs b/src/node/config/scripts/generateNodeIndex.mjs index ffc321fb..1e11fb1e 100644 --- a/src/node/config/scripts/generateNodeIndex.mjs +++ b/src/node/config/scripts/generateNodeIndex.mjs @@ -28,7 +28,7 @@ if (!fs.existsSync(dir)) { } let code = `/** -* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateOpsIndex.mjs +* THIS FILE IS AUTOMATICALLY GENERATED BY src/node/config/scripts/generateNodeIndex.mjs * * @author d98762625 [d98762625@gmail.com] * @copyright Crown Copyright ${new Date().getUTCFullYear()} @@ -79,14 +79,7 @@ code += ` }; } const chef = generateChef(); -chef.help = help([\n`; - -includedOperations.forEach((op) => { - code += ` core_${op},\n`; -}); - -code +=`]); - +chef.help = help; `; includedOperations.forEach((op) => { @@ -108,6 +101,6 @@ code += "};\n"; fs.writeFileSync( - path.join(dir, "/index.mjs"), + path.join(dir, "./index.mjs"), code ); diff --git a/src/node/repl-index.mjs b/src/node/repl-index.mjs new file mode 100644 index 00000000..e8f0f19b --- /dev/null +++ b/src/node/repl-index.mjs @@ -0,0 +1,1254 @@ +/** +* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateOpsIndex.mjs +* +* @author d98762625 [d98762625@gmail.com] +* @copyright Crown Copyright 2018 +* @license Apache-2.0 +*/ + +/* eslint camelcase: 0 */ +/* eslint no-console: 0 */ + +import repl from "repl"; +import "babel-polyfill"; +import { wrap, help } from "./apiUtils"; +import { + ADD as core_ADD, + AESDecrypt as core_AESDecrypt, + AESEncrypt as core_AESEncrypt, + AND as core_AND, + AddLineNumbers as core_AddLineNumbers, + Adler32Checksum as core_Adler32Checksum, + AffineCipherDecode as core_AffineCipherDecode, + AffineCipherEncode as core_AffineCipherEncode, + AnalyseHash as core_AnalyseHash, + AtbashCipher as core_AtbashCipher, + BSONDeserialise as core_BSONDeserialise, + BSONSerialise as core_BSONSerialise, + Bcrypt as core_Bcrypt, + BcryptCompare as core_BcryptCompare, + BcryptParse as core_BcryptParse, + BifidCipherDecode as core_BifidCipherDecode, + BifidCipherEncode as core_BifidCipherEncode, + BitShiftLeft as core_BitShiftLeft, + BitShiftRight as core_BitShiftRight, + BlowfishDecrypt as core_BlowfishDecrypt, + BlowfishEncrypt as core_BlowfishEncrypt, + Bzip2Decompress as core_Bzip2Decompress, + CRC16Checksum as core_CRC16Checksum, + CRC32Checksum as core_CRC32Checksum, + CSSBeautify as core_CSSBeautify, + CSSMinify as core_CSSMinify, + CSSSelector as core_CSSSelector, + CTPH as core_CTPH, + CartesianProduct as core_CartesianProduct, + ChangeIPFormat as core_ChangeIPFormat, + ChiSquare as core_ChiSquare, + CompareCTPHHashes as core_CompareCTPHHashes, + CompareSSDEEPHashes as core_CompareSSDEEPHashes, + ConvertArea as core_ConvertArea, + ConvertDataUnits as core_ConvertDataUnits, + ConvertDistance as core_ConvertDistance, + ConvertMass as core_ConvertMass, + ConvertSpeed as core_ConvertSpeed, + CountOccurrences as core_CountOccurrences, + DESDecrypt as core_DESDecrypt, + DESEncrypt as core_DESEncrypt, + DecodeNetBIOSName as core_DecodeNetBIOSName, + DecodeText as core_DecodeText, + DeriveEVPKey as core_DeriveEVPKey, + DerivePBKDF2Key as core_DerivePBKDF2Key, + DetectFileType as core_DetectFileType, + Diff as core_Diff, + DisassembleX86 as core_DisassembleX86, + Divide as core_Divide, + DropBytes as core_DropBytes, + EncodeNetBIOSName as core_EncodeNetBIOSName, + EncodeText as core_EncodeText, + Entropy as core_Entropy, + EscapeString as core_EscapeString, + EscapeUnicodeCharacters as core_EscapeUnicodeCharacters, + ExpandAlphabetRange as core_ExpandAlphabetRange, + ExtractDates as core_ExtractDates, + ExtractDomains as core_ExtractDomains, + ExtractEXIF as core_ExtractEXIF, + ExtractEmailAddresses as core_ExtractEmailAddresses, + ExtractFilePaths as core_ExtractFilePaths, + ExtractIPAddresses as core_ExtractIPAddresses, + ExtractMACAddresses as core_ExtractMACAddresses, + ExtractURLs as core_ExtractURLs, + Filter as core_Filter, + FindReplace as core_FindReplace, + Fletcher16Checksum as core_Fletcher16Checksum, + Fletcher32Checksum as core_Fletcher32Checksum, + Fletcher64Checksum as core_Fletcher64Checksum, + Fletcher8Checksum as core_Fletcher8Checksum, + FormatMACAddresses as core_FormatMACAddresses, + FrequencyDistribution as core_FrequencyDistribution, + FromBCD as core_FromBCD, + FromBase as core_FromBase, + FromBase32 as core_FromBase32, + FromBase58 as core_FromBase58, + FromBase64 as core_FromBase64, + FromBinary as core_FromBinary, + FromCharcode as core_FromCharcode, + FromDecimal as core_FromDecimal, + FromHTMLEntity as core_FromHTMLEntity, + FromHex as core_FromHex, + FromHexContent as core_FromHexContent, + FromHexdump as core_FromHexdump, + FromMorseCode as core_FromMorseCode, + FromOctal as core_FromOctal, + FromPunycode as core_FromPunycode, + FromQuotedPrintable as core_FromQuotedPrintable, + FromUNIXTimestamp as core_FromUNIXTimestamp, + GenerateAllHashes as core_GenerateAllHashes, + GenerateHOTP as core_GenerateHOTP, + GeneratePGPKeyPair as core_GeneratePGPKeyPair, + GenerateTOTP as core_GenerateTOTP, + GenerateUUID as core_GenerateUUID, + GenericCodeBeautify as core_GenericCodeBeautify, + GroupIPAddresses as core_GroupIPAddresses, + Gunzip as core_Gunzip, + Gzip as core_Gzip, + HAS160 as core_HAS160, + HMAC as core_HMAC, + HTTPRequest as core_HTTPRequest, + HammingDistance as core_HammingDistance, + Head as core_Head, + HexToObjectIdentifier as core_HexToObjectIdentifier, + HexToPEM as core_HexToPEM, + JPathExpression as core_JPathExpression, + JSONBeautify as core_JSONBeautify, + JSONMinify as core_JSONMinify, + JavaScriptBeautify as core_JavaScriptBeautify, + JavaScriptMinify as core_JavaScriptMinify, + JavaScriptParser as core_JavaScriptParser, + Keccak as core_Keccak, + MD2 as core_MD2, + MD4 as core_MD4, + MD5 as core_MD5, + MD6 as core_MD6, + Magic as core_Magic, + Mean as core_Mean, + Median as core_Median, + MicrosoftScriptDecoder as core_MicrosoftScriptDecoder, + Multiply as core_Multiply, + NOT as core_NOT, + Numberwang as core_Numberwang, + OR as core_OR, + ObjectIdentifierToHex as core_ObjectIdentifierToHex, + OffsetChecker as core_OffsetChecker, + PEMToHex as core_PEMToHex, + PGPDecrypt as core_PGPDecrypt, + PGPDecryptAndVerify as core_PGPDecryptAndVerify, + PGPEncrypt as core_PGPEncrypt, + PGPEncryptAndSign as core_PGPEncryptAndSign, + PHPDeserialize as core_PHPDeserialize, + PadLines as core_PadLines, + ParseASN1HexString as core_ParseASN1HexString, + ParseColourCode as core_ParseColourCode, + ParseDateTime as core_ParseDateTime, + ParseIPRange as core_ParseIPRange, + ParseIPv4Header as core_ParseIPv4Header, + ParseIPv6Address as core_ParseIPv6Address, + ParseUNIXFilePermissions as core_ParseUNIXFilePermissions, + ParseURI as core_ParseURI, + ParseUserAgent as core_ParseUserAgent, + ParseX509Certificate as core_ParseX509Certificate, + PowerSet as core_PowerSet, + PseudoRandomNumberGenerator as core_PseudoRandomNumberGenerator, + RC2Decrypt as core_RC2Decrypt, + RC2Encrypt as core_RC2Encrypt, + RC4 as core_RC4, + RC4Drop as core_RC4Drop, + RIPEMD as core_RIPEMD, + ROT13 as core_ROT13, + ROT47 as core_ROT47, + RawDeflate as core_RawDeflate, + RawInflate as core_RawInflate, + Register as core_Register, + RegularExpression as core_RegularExpression, + RemoveEXIF as core_RemoveEXIF, + RemoveLineNumbers as core_RemoveLineNumbers, + RemoveNullBytes as core_RemoveNullBytes, + RemoveWhitespace as core_RemoveWhitespace, + RenderImage as core_RenderImage, + Return as core_Return, + Reverse as core_Reverse, + RotateLeft as core_RotateLeft, + RotateRight as core_RotateRight, + SHA0 as core_SHA0, + SHA1 as core_SHA1, + SHA2 as core_SHA2, + SHA3 as core_SHA3, + SQLBeautify as core_SQLBeautify, + SQLMinify as core_SQLMinify, + SSDEEP as core_SSDEEP, + SUB as core_SUB, + ScanForEmbeddedFiles as core_ScanForEmbeddedFiles, + Scrypt as core_Scrypt, + SetDifference as core_SetDifference, + SetIntersection as core_SetIntersection, + SetUnion as core_SetUnion, + Shake as core_Shake, + ShowBase64Offsets as core_ShowBase64Offsets, + Sleep as core_Sleep, + Snefru as core_Snefru, + Sort as core_Sort, + Split as core_Split, + StandardDeviation as core_StandardDeviation, + Strings as core_Strings, + StripHTMLTags as core_StripHTMLTags, + StripHTTPHeaders as core_StripHTTPHeaders, + Substitute as core_Substitute, + Subtract as core_Subtract, + Sum as core_Sum, + SwapEndianness as core_SwapEndianness, + SymmetricDifference as core_SymmetricDifference, + SyntaxHighlighter as core_SyntaxHighlighter, + TCPIPChecksum as core_TCPIPChecksum, + Tail as core_Tail, + TakeBytes as core_TakeBytes, + ToBCD as core_ToBCD, + ToBase as core_ToBase, + ToBase32 as core_ToBase32, + ToBase58 as core_ToBase58, + ToBase64 as core_ToBase64, + ToBinary as core_ToBinary, + ToCamelCase as core_ToCamelCase, + ToCharcode as core_ToCharcode, + ToDecimal as core_ToDecimal, + ToHTMLEntity as core_ToHTMLEntity, + ToHex as core_ToHex, + ToHexContent as core_ToHexContent, + ToHexdump as core_ToHexdump, + ToKebabCase as core_ToKebabCase, + ToLowerCase as core_ToLowerCase, + ToMorseCode as core_ToMorseCode, + ToOctal as core_ToOctal, + ToPunycode as core_ToPunycode, + ToQuotedPrintable as core_ToQuotedPrintable, + ToSnakeCase as core_ToSnakeCase, + ToTable as core_ToTable, + ToUNIXTimestamp as core_ToUNIXTimestamp, + ToUpperCase as core_ToUpperCase, + TranslateDateTimeFormat as core_TranslateDateTimeFormat, + TripleDESDecrypt as core_TripleDESDecrypt, + TripleDESEncrypt as core_TripleDESEncrypt, + UNIXTimestampToWindowsFiletime as core_UNIXTimestampToWindowsFiletime, + URLDecode as core_URLDecode, + URLEncode as core_URLEncode, + UnescapeString as core_UnescapeString, + UnescapeUnicodeCharacters as core_UnescapeUnicodeCharacters, + Unique as core_Unique, + VigenèreDecode as core_VigenèreDecode, + VigenèreEncode as core_VigenèreEncode, + Whirlpool as core_Whirlpool, + WindowsFiletimeToUNIXTimestamp as core_WindowsFiletimeToUNIXTimestamp, + XKCDRandomNumber as core_XKCDRandomNumber, + XMLBeautify as core_XMLBeautify, + XMLMinify as core_XMLMinify, + XOR as core_XOR, + XORBruteForce as core_XORBruteForce, + XPathExpression as core_XPathExpression, + ZlibDeflate as core_ZlibDeflate, + ZlibInflate as core_ZlibInflate, + +} from "../core/operations/index"; + +// 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"; +}; + +/** + * generateChef + * + * Creates decapitalised, wrapped ops in chef object for default export. + */ +function generateChef() { + return { + "ADD": wrap(core_ADD), + "AESDecrypt": wrap(core_AESDecrypt), + "AESEncrypt": wrap(core_AESEncrypt), + "AND": wrap(core_AND), + "addLineNumbers": wrap(core_AddLineNumbers), + "adler32Checksum": wrap(core_Adler32Checksum), + "affineCipherDecode": wrap(core_AffineCipherDecode), + "affineCipherEncode": wrap(core_AffineCipherEncode), + "analyseHash": wrap(core_AnalyseHash), + "atbashCipher": wrap(core_AtbashCipher), + "BSONDeserialise": wrap(core_BSONDeserialise), + "BSONSerialise": wrap(core_BSONSerialise), + "bcrypt": wrap(core_Bcrypt), + "bcryptCompare": wrap(core_BcryptCompare), + "bcryptParse": wrap(core_BcryptParse), + "bifidCipherDecode": wrap(core_BifidCipherDecode), + "bifidCipherEncode": wrap(core_BifidCipherEncode), + "bitShiftLeft": wrap(core_BitShiftLeft), + "bitShiftRight": wrap(core_BitShiftRight), + "blowfishDecrypt": wrap(core_BlowfishDecrypt), + "blowfishEncrypt": wrap(core_BlowfishEncrypt), + "bzip2Decompress": wrap(core_Bzip2Decompress), + "CRC16Checksum": wrap(core_CRC16Checksum), + "CRC32Checksum": wrap(core_CRC32Checksum), + "CSSBeautify": wrap(core_CSSBeautify), + "CSSMinify": wrap(core_CSSMinify), + "CSSSelector": wrap(core_CSSSelector), + "CTPH": wrap(core_CTPH), + "cartesianProduct": wrap(core_CartesianProduct), + "changeIPFormat": wrap(core_ChangeIPFormat), + "chiSquare": wrap(core_ChiSquare), + "compareCTPHHashes": wrap(core_CompareCTPHHashes), + "compareSSDEEPHashes": wrap(core_CompareSSDEEPHashes), + "convertArea": wrap(core_ConvertArea), + "convertDataUnits": wrap(core_ConvertDataUnits), + "convertDistance": wrap(core_ConvertDistance), + "convertMass": wrap(core_ConvertMass), + "convertSpeed": wrap(core_ConvertSpeed), + "countOccurrences": wrap(core_CountOccurrences), + "DESDecrypt": wrap(core_DESDecrypt), + "DESEncrypt": wrap(core_DESEncrypt), + "decodeNetBIOSName": wrap(core_DecodeNetBIOSName), + "decodeText": wrap(core_DecodeText), + "deriveEVPKey": wrap(core_DeriveEVPKey), + "derivePBKDF2Key": wrap(core_DerivePBKDF2Key), + "detectFileType": wrap(core_DetectFileType), + "diff": wrap(core_Diff), + "disassembleX86": wrap(core_DisassembleX86), + "divide": wrap(core_Divide), + "dropBytes": wrap(core_DropBytes), + "encodeNetBIOSName": wrap(core_EncodeNetBIOSName), + "encodeText": wrap(core_EncodeText), + "entropy": wrap(core_Entropy), + "escapeString": wrap(core_EscapeString), + "escapeUnicodeCharacters": wrap(core_EscapeUnicodeCharacters), + "expandAlphabetRange": wrap(core_ExpandAlphabetRange), + "extractDates": wrap(core_ExtractDates), + "extractDomains": wrap(core_ExtractDomains), + "extractEXIF": wrap(core_ExtractEXIF), + "extractEmailAddresses": wrap(core_ExtractEmailAddresses), + "extractFilePaths": wrap(core_ExtractFilePaths), + "extractIPAddresses": wrap(core_ExtractIPAddresses), + "extractMACAddresses": wrap(core_ExtractMACAddresses), + "extractURLs": wrap(core_ExtractURLs), + "filter": wrap(core_Filter), + "findReplace": wrap(core_FindReplace), + "fletcher16Checksum": wrap(core_Fletcher16Checksum), + "fletcher32Checksum": wrap(core_Fletcher32Checksum), + "fletcher64Checksum": wrap(core_Fletcher64Checksum), + "fletcher8Checksum": wrap(core_Fletcher8Checksum), + "formatMACAddresses": wrap(core_FormatMACAddresses), + "frequencyDistribution": wrap(core_FrequencyDistribution), + "fromBCD": wrap(core_FromBCD), + "fromBase": wrap(core_FromBase), + "fromBase32": wrap(core_FromBase32), + "fromBase58": wrap(core_FromBase58), + "fromBase64": wrap(core_FromBase64), + "fromBinary": wrap(core_FromBinary), + "fromCharcode": wrap(core_FromCharcode), + "fromDecimal": wrap(core_FromDecimal), + "fromHTMLEntity": wrap(core_FromHTMLEntity), + "fromHex": wrap(core_FromHex), + "fromHexContent": wrap(core_FromHexContent), + "fromHexdump": wrap(core_FromHexdump), + "fromMorseCode": wrap(core_FromMorseCode), + "fromOctal": wrap(core_FromOctal), + "fromPunycode": wrap(core_FromPunycode), + "fromQuotedPrintable": wrap(core_FromQuotedPrintable), + "fromUNIXTimestamp": wrap(core_FromUNIXTimestamp), + "generateAllHashes": wrap(core_GenerateAllHashes), + "generateHOTP": wrap(core_GenerateHOTP), + "generatePGPKeyPair": wrap(core_GeneratePGPKeyPair), + "generateTOTP": wrap(core_GenerateTOTP), + "generateUUID": wrap(core_GenerateUUID), + "genericCodeBeautify": wrap(core_GenericCodeBeautify), + "groupIPAddresses": wrap(core_GroupIPAddresses), + "gunzip": wrap(core_Gunzip), + "gzip": wrap(core_Gzip), + "HAS160": wrap(core_HAS160), + "HMAC": wrap(core_HMAC), + "HTTPRequest": wrap(core_HTTPRequest), + "hammingDistance": wrap(core_HammingDistance), + "head": wrap(core_Head), + "hexToObjectIdentifier": wrap(core_HexToObjectIdentifier), + "hexToPEM": wrap(core_HexToPEM), + "JPathExpression": wrap(core_JPathExpression), + "JSONBeautify": wrap(core_JSONBeautify), + "JSONMinify": wrap(core_JSONMinify), + "javaScriptBeautify": wrap(core_JavaScriptBeautify), + "javaScriptMinify": wrap(core_JavaScriptMinify), + "javaScriptParser": wrap(core_JavaScriptParser), + "keccak": wrap(core_Keccak), + "MD2": wrap(core_MD2), + "MD4": wrap(core_MD4), + "MD5": wrap(core_MD5), + "MD6": wrap(core_MD6), + "magic": wrap(core_Magic), + "mean": wrap(core_Mean), + "median": wrap(core_Median), + "microsoftScriptDecoder": wrap(core_MicrosoftScriptDecoder), + "multiply": wrap(core_Multiply), + "NOT": wrap(core_NOT), + "numberwang": wrap(core_Numberwang), + "OR": wrap(core_OR), + "objectIdentifierToHex": wrap(core_ObjectIdentifierToHex), + "offsetChecker": wrap(core_OffsetChecker), + "PEMToHex": wrap(core_PEMToHex), + "PGPDecrypt": wrap(core_PGPDecrypt), + "PGPDecryptAndVerify": wrap(core_PGPDecryptAndVerify), + "PGPEncrypt": wrap(core_PGPEncrypt), + "PGPEncryptAndSign": wrap(core_PGPEncryptAndSign), + "PHPDeserialize": wrap(core_PHPDeserialize), + "padLines": wrap(core_PadLines), + "parseASN1HexString": wrap(core_ParseASN1HexString), + "parseColourCode": wrap(core_ParseColourCode), + "parseDateTime": wrap(core_ParseDateTime), + "parseIPRange": wrap(core_ParseIPRange), + "parseIPv4Header": wrap(core_ParseIPv4Header), + "parseIPv6Address": wrap(core_ParseIPv6Address), + "parseUNIXFilePermissions": wrap(core_ParseUNIXFilePermissions), + "parseURI": wrap(core_ParseURI), + "parseUserAgent": wrap(core_ParseUserAgent), + "parseX509Certificate": wrap(core_ParseX509Certificate), + "powerSet": wrap(core_PowerSet), + "pseudoRandomNumberGenerator": wrap(core_PseudoRandomNumberGenerator), + "RC2Decrypt": wrap(core_RC2Decrypt), + "RC2Encrypt": wrap(core_RC2Encrypt), + "RC4": wrap(core_RC4), + "RC4Drop": wrap(core_RC4Drop), + "RIPEMD": wrap(core_RIPEMD), + "ROT13": wrap(core_ROT13), + "ROT47": wrap(core_ROT47), + "rawDeflate": wrap(core_RawDeflate), + "rawInflate": wrap(core_RawInflate), + "register": wrap(core_Register), + "regularExpression": wrap(core_RegularExpression), + "removeEXIF": wrap(core_RemoveEXIF), + "removeLineNumbers": wrap(core_RemoveLineNumbers), + "removeNullBytes": wrap(core_RemoveNullBytes), + "removeWhitespace": wrap(core_RemoveWhitespace), + "renderImage": wrap(core_RenderImage), + "Return": wrap(core_Return), + "reverse": wrap(core_Reverse), + "rotateLeft": wrap(core_RotateLeft), + "rotateRight": wrap(core_RotateRight), + "SHA0": wrap(core_SHA0), + "SHA1": wrap(core_SHA1), + "SHA2": wrap(core_SHA2), + "SHA3": wrap(core_SHA3), + "SQLBeautify": wrap(core_SQLBeautify), + "SQLMinify": wrap(core_SQLMinify), + "SSDEEP": wrap(core_SSDEEP), + "SUB": wrap(core_SUB), + "scanForEmbeddedFiles": wrap(core_ScanForEmbeddedFiles), + "scrypt": wrap(core_Scrypt), + "setDifference": wrap(core_SetDifference), + "setIntersection": wrap(core_SetIntersection), + "setUnion": wrap(core_SetUnion), + "shake": wrap(core_Shake), + "showBase64Offsets": wrap(core_ShowBase64Offsets), + "sleep": wrap(core_Sleep), + "snefru": wrap(core_Snefru), + "sort": wrap(core_Sort), + "split": wrap(core_Split), + "standardDeviation": wrap(core_StandardDeviation), + "strings": wrap(core_Strings), + "stripHTMLTags": wrap(core_StripHTMLTags), + "stripHTTPHeaders": wrap(core_StripHTTPHeaders), + "substitute": wrap(core_Substitute), + "subtract": wrap(core_Subtract), + "sum": wrap(core_Sum), + "swapEndianness": wrap(core_SwapEndianness), + "symmetricDifference": wrap(core_SymmetricDifference), + "syntaxHighlighter": wrap(core_SyntaxHighlighter), + "TCPIPChecksum": wrap(core_TCPIPChecksum), + "tail": wrap(core_Tail), + "takeBytes": wrap(core_TakeBytes), + "toBCD": wrap(core_ToBCD), + "toBase": wrap(core_ToBase), + "toBase32": wrap(core_ToBase32), + "toBase58": wrap(core_ToBase58), + "toBase64": wrap(core_ToBase64), + "toBinary": wrap(core_ToBinary), + "toCamelCase": wrap(core_ToCamelCase), + "toCharcode": wrap(core_ToCharcode), + "toDecimal": wrap(core_ToDecimal), + "toHTMLEntity": wrap(core_ToHTMLEntity), + "toHex": wrap(core_ToHex), + "toHexContent": wrap(core_ToHexContent), + "toHexdump": wrap(core_ToHexdump), + "toKebabCase": wrap(core_ToKebabCase), + "toLowerCase": wrap(core_ToLowerCase), + "toMorseCode": wrap(core_ToMorseCode), + "toOctal": wrap(core_ToOctal), + "toPunycode": wrap(core_ToPunycode), + "toQuotedPrintable": wrap(core_ToQuotedPrintable), + "toSnakeCase": wrap(core_ToSnakeCase), + "toTable": wrap(core_ToTable), + "toUNIXTimestamp": wrap(core_ToUNIXTimestamp), + "toUpperCase": wrap(core_ToUpperCase), + "translateDateTimeFormat": wrap(core_TranslateDateTimeFormat), + "tripleDESDecrypt": wrap(core_TripleDESDecrypt), + "tripleDESEncrypt": wrap(core_TripleDESEncrypt), + "UNIXTimestampToWindowsFiletime": wrap(core_UNIXTimestampToWindowsFiletime), + "URLDecode": wrap(core_URLDecode), + "URLEncode": wrap(core_URLEncode), + "unescapeString": wrap(core_UnescapeString), + "unescapeUnicodeCharacters": wrap(core_UnescapeUnicodeCharacters), + "unique": wrap(core_Unique), + "vigenèreDecode": wrap(core_VigenèreDecode), + "vigenèreEncode": wrap(core_VigenèreEncode), + "whirlpool": wrap(core_Whirlpool), + "windowsFiletimeToUNIXTimestamp": wrap(core_WindowsFiletimeToUNIXTimestamp), + "XKCDRandomNumber": wrap(core_XKCDRandomNumber), + "XMLBeautify": wrap(core_XMLBeautify), + "XMLMinify": wrap(core_XMLMinify), + "XOR": wrap(core_XOR), + "XORBruteForce": wrap(core_XORBruteForce), + "XPathExpression": wrap(core_XPathExpression), + "zlibDeflate": wrap(core_ZlibDeflate), + "zlibInflate": wrap(core_ZlibInflate), + }; +} + +const chef = generateChef(); +chef.help = help([ + core_ADD, + core_AESDecrypt, + core_AESEncrypt, + core_AND, + core_AddLineNumbers, + core_Adler32Checksum, + core_AffineCipherDecode, + core_AffineCipherEncode, + core_AnalyseHash, + core_AtbashCipher, + core_BSONDeserialise, + core_BSONSerialise, + core_Bcrypt, + core_BcryptCompare, + core_BcryptParse, + core_BifidCipherDecode, + core_BifidCipherEncode, + core_BitShiftLeft, + core_BitShiftRight, + core_BlowfishDecrypt, + core_BlowfishEncrypt, + core_Bzip2Decompress, + core_CRC16Checksum, + core_CRC32Checksum, + core_CSSBeautify, + core_CSSMinify, + core_CSSSelector, + core_CTPH, + core_CartesianProduct, + core_ChangeIPFormat, + core_ChiSquare, + core_CompareCTPHHashes, + core_CompareSSDEEPHashes, + core_ConvertArea, + core_ConvertDataUnits, + core_ConvertDistance, + core_ConvertMass, + core_ConvertSpeed, + core_CountOccurrences, + core_DESDecrypt, + core_DESEncrypt, + core_DecodeNetBIOSName, + core_DecodeText, + core_DeriveEVPKey, + core_DerivePBKDF2Key, + core_DetectFileType, + core_Diff, + core_DisassembleX86, + core_Divide, + core_DropBytes, + core_EncodeNetBIOSName, + core_EncodeText, + core_Entropy, + core_EscapeString, + core_EscapeUnicodeCharacters, + core_ExpandAlphabetRange, + core_ExtractDates, + core_ExtractDomains, + core_ExtractEXIF, + core_ExtractEmailAddresses, + core_ExtractFilePaths, + core_ExtractIPAddresses, + core_ExtractMACAddresses, + core_ExtractURLs, + core_Filter, + core_FindReplace, + core_Fletcher16Checksum, + core_Fletcher32Checksum, + core_Fletcher64Checksum, + core_Fletcher8Checksum, + core_FormatMACAddresses, + core_FrequencyDistribution, + core_FromBCD, + core_FromBase, + core_FromBase32, + core_FromBase58, + core_FromBase64, + core_FromBinary, + core_FromCharcode, + core_FromDecimal, + core_FromHTMLEntity, + core_FromHex, + core_FromHexContent, + core_FromHexdump, + core_FromMorseCode, + core_FromOctal, + core_FromPunycode, + core_FromQuotedPrintable, + core_FromUNIXTimestamp, + core_GenerateAllHashes, + core_GenerateHOTP, + core_GeneratePGPKeyPair, + core_GenerateTOTP, + core_GenerateUUID, + core_GenericCodeBeautify, + core_GroupIPAddresses, + core_Gunzip, + core_Gzip, + core_HAS160, + core_HMAC, + core_HTTPRequest, + core_HammingDistance, + core_Head, + core_HexToObjectIdentifier, + core_HexToPEM, + core_JPathExpression, + core_JSONBeautify, + core_JSONMinify, + core_JavaScriptBeautify, + core_JavaScriptMinify, + core_JavaScriptParser, + core_Keccak, + core_MD2, + core_MD4, + core_MD5, + core_MD6, + core_Magic, + core_Mean, + core_Median, + core_MicrosoftScriptDecoder, + core_Multiply, + core_NOT, + core_Numberwang, + core_OR, + core_ObjectIdentifierToHex, + core_OffsetChecker, + core_PEMToHex, + core_PGPDecrypt, + core_PGPDecryptAndVerify, + core_PGPEncrypt, + core_PGPEncryptAndSign, + core_PHPDeserialize, + core_PadLines, + core_ParseASN1HexString, + core_ParseColourCode, + core_ParseDateTime, + core_ParseIPRange, + core_ParseIPv4Header, + core_ParseIPv6Address, + core_ParseUNIXFilePermissions, + core_ParseURI, + core_ParseUserAgent, + core_ParseX509Certificate, + core_PowerSet, + core_PseudoRandomNumberGenerator, + core_RC2Decrypt, + core_RC2Encrypt, + core_RC4, + core_RC4Drop, + core_RIPEMD, + core_ROT13, + core_ROT47, + core_RawDeflate, + core_RawInflate, + core_Register, + core_RegularExpression, + core_RemoveEXIF, + core_RemoveLineNumbers, + core_RemoveNullBytes, + core_RemoveWhitespace, + core_RenderImage, + core_Return, + core_Reverse, + core_RotateLeft, + core_RotateRight, + core_SHA0, + core_SHA1, + core_SHA2, + core_SHA3, + core_SQLBeautify, + core_SQLMinify, + core_SSDEEP, + core_SUB, + core_ScanForEmbeddedFiles, + core_Scrypt, + core_SetDifference, + core_SetIntersection, + core_SetUnion, + core_Shake, + core_ShowBase64Offsets, + core_Sleep, + core_Snefru, + core_Sort, + core_Split, + core_StandardDeviation, + core_Strings, + core_StripHTMLTags, + core_StripHTTPHeaders, + core_Substitute, + core_Subtract, + core_Sum, + core_SwapEndianness, + core_SymmetricDifference, + core_SyntaxHighlighter, + core_TCPIPChecksum, + core_Tail, + core_TakeBytes, + core_ToBCD, + core_ToBase, + core_ToBase32, + core_ToBase58, + core_ToBase64, + core_ToBinary, + core_ToCamelCase, + core_ToCharcode, + core_ToDecimal, + core_ToHTMLEntity, + core_ToHex, + core_ToHexContent, + core_ToHexdump, + core_ToKebabCase, + core_ToLowerCase, + core_ToMorseCode, + core_ToOctal, + core_ToPunycode, + core_ToQuotedPrintable, + core_ToSnakeCase, + core_ToTable, + core_ToUNIXTimestamp, + core_ToUpperCase, + core_TranslateDateTimeFormat, + core_TripleDESDecrypt, + core_TripleDESEncrypt, + core_UNIXTimestampToWindowsFiletime, + core_URLDecode, + core_URLEncode, + core_UnescapeString, + core_UnescapeUnicodeCharacters, + core_Unique, + core_VigenèreDecode, + core_VigenèreEncode, + core_Whirlpool, + core_WindowsFiletimeToUNIXTimestamp, + core_XKCDRandomNumber, + core_XMLBeautify, + core_XMLMinify, + core_XOR, + core_XORBruteForce, + core_XPathExpression, + core_ZlibDeflate, + core_ZlibInflate, +]); + +const ADD = chef.ADD; +const AESDecrypt = chef.AESDecrypt; +const AESEncrypt = chef.AESEncrypt; +const AND = chef.AND; +const addLineNumbers = chef.addLineNumbers; +const adler32Checksum = chef.adler32Checksum; +const affineCipherDecode = chef.affineCipherDecode; +const affineCipherEncode = chef.affineCipherEncode; +const analyseHash = chef.analyseHash; +const atbashCipher = chef.atbashCipher; +const BSONDeserialise = chef.BSONDeserialise; +const BSONSerialise = chef.BSONSerialise; +const bcrypt = chef.bcrypt; +const bcryptCompare = chef.bcryptCompare; +const bcryptParse = chef.bcryptParse; +const bifidCipherDecode = chef.bifidCipherDecode; +const bifidCipherEncode = chef.bifidCipherEncode; +const bitShiftLeft = chef.bitShiftLeft; +const bitShiftRight = chef.bitShiftRight; +const blowfishDecrypt = chef.blowfishDecrypt; +const blowfishEncrypt = chef.blowfishEncrypt; +const bzip2Decompress = chef.bzip2Decompress; +const CRC16Checksum = chef.CRC16Checksum; +const CRC32Checksum = chef.CRC32Checksum; +const CSSBeautify = chef.CSSBeautify; +const CSSMinify = chef.CSSMinify; +const CSSSelector = chef.CSSSelector; +const CTPH = chef.CTPH; +const cartesianProduct = chef.cartesianProduct; +const changeIPFormat = chef.changeIPFormat; +const chiSquare = chef.chiSquare; +const compareCTPHHashes = chef.compareCTPHHashes; +const compareSSDEEPHashes = chef.compareSSDEEPHashes; +const convertArea = chef.convertArea; +const convertDataUnits = chef.convertDataUnits; +const convertDistance = chef.convertDistance; +const convertMass = chef.convertMass; +const convertSpeed = chef.convertSpeed; +const countOccurrences = chef.countOccurrences; +const DESDecrypt = chef.DESDecrypt; +const DESEncrypt = chef.DESEncrypt; +const decodeNetBIOSName = chef.decodeNetBIOSName; +const decodeText = chef.decodeText; +const deriveEVPKey = chef.deriveEVPKey; +const derivePBKDF2Key = chef.derivePBKDF2Key; +const detectFileType = chef.detectFileType; +const diff = chef.diff; +const disassembleX86 = chef.disassembleX86; +const divide = chef.divide; +const dropBytes = chef.dropBytes; +const encodeNetBIOSName = chef.encodeNetBIOSName; +const encodeText = chef.encodeText; +const entropy = chef.entropy; +const escapeString = chef.escapeString; +const escapeUnicodeCharacters = chef.escapeUnicodeCharacters; +const expandAlphabetRange = chef.expandAlphabetRange; +const extractDates = chef.extractDates; +const extractDomains = chef.extractDomains; +const extractEXIF = chef.extractEXIF; +const extractEmailAddresses = chef.extractEmailAddresses; +const extractFilePaths = chef.extractFilePaths; +const extractIPAddresses = chef.extractIPAddresses; +const extractMACAddresses = chef.extractMACAddresses; +const extractURLs = chef.extractURLs; +const filter = chef.filter; +const findReplace = chef.findReplace; +const fletcher16Checksum = chef.fletcher16Checksum; +const fletcher32Checksum = chef.fletcher32Checksum; +const fletcher64Checksum = chef.fletcher64Checksum; +const fletcher8Checksum = chef.fletcher8Checksum; +const formatMACAddresses = chef.formatMACAddresses; +const frequencyDistribution = chef.frequencyDistribution; +const fromBCD = chef.fromBCD; +const fromBase = chef.fromBase; +const fromBase32 = chef.fromBase32; +const fromBase58 = chef.fromBase58; +const fromBase64 = chef.fromBase64; +const fromBinary = chef.fromBinary; +const fromCharcode = chef.fromCharcode; +const fromDecimal = chef.fromDecimal; +const fromHTMLEntity = chef.fromHTMLEntity; +const fromHex = chef.fromHex; +const fromHexContent = chef.fromHexContent; +const fromHexdump = chef.fromHexdump; +const fromMorseCode = chef.fromMorseCode; +const fromOctal = chef.fromOctal; +const fromPunycode = chef.fromPunycode; +const fromQuotedPrintable = chef.fromQuotedPrintable; +const fromUNIXTimestamp = chef.fromUNIXTimestamp; +const generateAllHashes = chef.generateAllHashes; +const generateHOTP = chef.generateHOTP; +const generatePGPKeyPair = chef.generatePGPKeyPair; +const generateTOTP = chef.generateTOTP; +const generateUUID = chef.generateUUID; +const genericCodeBeautify = chef.genericCodeBeautify; +const groupIPAddresses = chef.groupIPAddresses; +const gunzip = chef.gunzip; +const gzip = chef.gzip; +const HAS160 = chef.HAS160; +const HMAC = chef.HMAC; +const HTTPRequest = chef.HTTPRequest; +const hammingDistance = chef.hammingDistance; +const head = chef.head; +const hexToObjectIdentifier = chef.hexToObjectIdentifier; +const hexToPEM = chef.hexToPEM; +const JPathExpression = chef.JPathExpression; +const JSONBeautify = chef.JSONBeautify; +const JSONMinify = chef.JSONMinify; +const javaScriptBeautify = chef.javaScriptBeautify; +const javaScriptMinify = chef.javaScriptMinify; +const javaScriptParser = chef.javaScriptParser; +const keccak = chef.keccak; +const MD2 = chef.MD2; +const MD4 = chef.MD4; +const MD5 = chef.MD5; +const MD6 = chef.MD6; +const magic = chef.magic; +const mean = chef.mean; +const median = chef.median; +const microsoftScriptDecoder = chef.microsoftScriptDecoder; +const multiply = chef.multiply; +const NOT = chef.NOT; +const numberwang = chef.numberwang; +const OR = chef.OR; +const objectIdentifierToHex = chef.objectIdentifierToHex; +const offsetChecker = chef.offsetChecker; +const PEMToHex = chef.PEMToHex; +const PGPDecrypt = chef.PGPDecrypt; +const PGPDecryptAndVerify = chef.PGPDecryptAndVerify; +const PGPEncrypt = chef.PGPEncrypt; +const PGPEncryptAndSign = chef.PGPEncryptAndSign; +const PHPDeserialize = chef.PHPDeserialize; +const padLines = chef.padLines; +const parseASN1HexString = chef.parseASN1HexString; +const parseColourCode = chef.parseColourCode; +const parseDateTime = chef.parseDateTime; +const parseIPRange = chef.parseIPRange; +const parseIPv4Header = chef.parseIPv4Header; +const parseIPv6Address = chef.parseIPv6Address; +const parseUNIXFilePermissions = chef.parseUNIXFilePermissions; +const parseURI = chef.parseURI; +const parseUserAgent = chef.parseUserAgent; +const parseX509Certificate = chef.parseX509Certificate; +const powerSet = chef.powerSet; +const pseudoRandomNumberGenerator = chef.pseudoRandomNumberGenerator; +const RC2Decrypt = chef.RC2Decrypt; +const RC2Encrypt = chef.RC2Encrypt; +const RC4 = chef.RC4; +const RC4Drop = chef.RC4Drop; +const RIPEMD = chef.RIPEMD; +const ROT13 = chef.ROT13; +const ROT47 = chef.ROT47; +const rawDeflate = chef.rawDeflate; +const rawInflate = chef.rawInflate; +const register = chef.register; +const regularExpression = chef.regularExpression; +const removeEXIF = chef.removeEXIF; +const removeLineNumbers = chef.removeLineNumbers; +const removeNullBytes = chef.removeNullBytes; +const removeWhitespace = chef.removeWhitespace; +const renderImage = chef.renderImage; +const Return = chef.Return; +const reverse = chef.reverse; +const rotateLeft = chef.rotateLeft; +const rotateRight = chef.rotateRight; +const SHA0 = chef.SHA0; +const SHA1 = chef.SHA1; +const SHA2 = chef.SHA2; +const SHA3 = chef.SHA3; +const SQLBeautify = chef.SQLBeautify; +const SQLMinify = chef.SQLMinify; +const SSDEEP = chef.SSDEEP; +const SUB = chef.SUB; +const scanForEmbeddedFiles = chef.scanForEmbeddedFiles; +const scrypt = chef.scrypt; +const setDifference = chef.setDifference; +const setIntersection = chef.setIntersection; +const setUnion = chef.setUnion; +const shake = chef.shake; +const showBase64Offsets = chef.showBase64Offsets; +const sleep = chef.sleep; +const snefru = chef.snefru; +const sort = chef.sort; +const split = chef.split; +const standardDeviation = chef.standardDeviation; +const strings = chef.strings; +const stripHTMLTags = chef.stripHTMLTags; +const stripHTTPHeaders = chef.stripHTTPHeaders; +const substitute = chef.substitute; +const subtract = chef.subtract; +const sum = chef.sum; +const swapEndianness = chef.swapEndianness; +const symmetricDifference = chef.symmetricDifference; +const syntaxHighlighter = chef.syntaxHighlighter; +const TCPIPChecksum = chef.TCPIPChecksum; +const tail = chef.tail; +const takeBytes = chef.takeBytes; +const toBCD = chef.toBCD; +const toBase = chef.toBase; +const toBase32 = chef.toBase32; +const toBase58 = chef.toBase58; +const toBase64 = chef.toBase64; +const toBinary = chef.toBinary; +const toCamelCase = chef.toCamelCase; +const toCharcode = chef.toCharcode; +const toDecimal = chef.toDecimal; +const toHTMLEntity = chef.toHTMLEntity; +const toHex = chef.toHex; +const toHexContent = chef.toHexContent; +const toHexdump = chef.toHexdump; +const toKebabCase = chef.toKebabCase; +const toLowerCase = chef.toLowerCase; +const toMorseCode = chef.toMorseCode; +const toOctal = chef.toOctal; +const toPunycode = chef.toPunycode; +const toQuotedPrintable = chef.toQuotedPrintable; +const toSnakeCase = chef.toSnakeCase; +const toTable = chef.toTable; +const toUNIXTimestamp = chef.toUNIXTimestamp; +const toUpperCase = chef.toUpperCase; +const translateDateTimeFormat = chef.translateDateTimeFormat; +const tripleDESDecrypt = chef.tripleDESDecrypt; +const tripleDESEncrypt = chef.tripleDESEncrypt; +const UNIXTimestampToWindowsFiletime = chef.UNIXTimestampToWindowsFiletime; +const URLDecode = chef.URLDecode; +const URLEncode = chef.URLEncode; +const unescapeString = chef.unescapeString; +const unescapeUnicodeCharacters = chef.unescapeUnicodeCharacters; +const unique = chef.unique; +const vigenèreDecode = chef.vigenèreDecode; +const vigenèreEncode = chef.vigenèreEncode; +const whirlpool = chef.whirlpool; +const windowsFiletimeToUNIXTimestamp = chef.windowsFiletimeToUNIXTimestamp; +const XKCDRandomNumber = chef.XKCDRandomNumber; +const XMLBeautify = chef.XMLBeautify; +const XMLMinify = chef.XMLMinify; +const XOR = chef.XOR; +const XORBruteForce = chef.XORBruteForce; +const XPathExpression = chef.XPathExpression; +const zlibDeflate = chef.zlibDeflate; +const zlibInflate = chef.zlibInflate; + +console.log("Welcome to CyberChef"); +const replServer = repl.start({ + promt: "chef >", +}); + +replServer.context.ADD = ADD; +replServer.context.AESDecrypt = AESDecrypt; +replServer.context.AESEncrypt = AESEncrypt; +replServer.context.AND = AND; +replServer.context.addLineNumbers = addLineNumbers; +replServer.context.adler32Checksum = adler32Checksum; +replServer.context.affineCipherDecode = affineCipherDecode; +replServer.context.affineCipherEncode = affineCipherEncode; +replServer.context.analyseHash = analyseHash; +replServer.context.atbashCipher = atbashCipher; +replServer.context.BSONDeserialise = BSONDeserialise; +replServer.context.BSONSerialise = BSONSerialise; +replServer.context.bcrypt = bcrypt; +replServer.context.bcryptCompare = bcryptCompare; +replServer.context.bcryptParse = bcryptParse; +replServer.context.bifidCipherDecode = bifidCipherDecode; +replServer.context.bifidCipherEncode = bifidCipherEncode; +replServer.context.bitShiftLeft = bitShiftLeft; +replServer.context.bitShiftRight = bitShiftRight; +replServer.context.blowfishDecrypt = blowfishDecrypt; +replServer.context.blowfishEncrypt = blowfishEncrypt; +replServer.context.bzip2Decompress = bzip2Decompress; +replServer.context.CRC16Checksum = CRC16Checksum; +replServer.context.CRC32Checksum = CRC32Checksum; +replServer.context.CSSBeautify = CSSBeautify; +replServer.context.CSSMinify = CSSMinify; +replServer.context.CSSSelector = CSSSelector; +replServer.context.CTPH = CTPH; +replServer.context.cartesianProduct = cartesianProduct; +replServer.context.changeIPFormat = changeIPFormat; +replServer.context.chiSquare = chiSquare; +replServer.context.compareCTPHHashes = compareCTPHHashes; +replServer.context.compareSSDEEPHashes = compareSSDEEPHashes; +replServer.context.convertArea = convertArea; +replServer.context.convertDataUnits = convertDataUnits; +replServer.context.convertDistance = convertDistance; +replServer.context.convertMass = convertMass; +replServer.context.convertSpeed = convertSpeed; +replServer.context.countOccurrences = countOccurrences; +replServer.context.DESDecrypt = DESDecrypt; +replServer.context.DESEncrypt = DESEncrypt; +replServer.context.decodeNetBIOSName = decodeNetBIOSName; +replServer.context.decodeText = decodeText; +replServer.context.deriveEVPKey = deriveEVPKey; +replServer.context.derivePBKDF2Key = derivePBKDF2Key; +replServer.context.detectFileType = detectFileType; +replServer.context.diff = diff; +replServer.context.disassembleX86 = disassembleX86; +replServer.context.divide = divide; +replServer.context.dropBytes = dropBytes; +replServer.context.encodeNetBIOSName = encodeNetBIOSName; +replServer.context.encodeText = encodeText; +replServer.context.entropy = entropy; +replServer.context.escapeString = escapeString; +replServer.context.escapeUnicodeCharacters = escapeUnicodeCharacters; +replServer.context.expandAlphabetRange = expandAlphabetRange; +replServer.context.extractDates = extractDates; +replServer.context.extractDomains = extractDomains; +replServer.context.extractEXIF = extractEXIF; +replServer.context.extractEmailAddresses = extractEmailAddresses; +replServer.context.extractFilePaths = extractFilePaths; +replServer.context.extractIPAddresses = extractIPAddresses; +replServer.context.extractMACAddresses = extractMACAddresses; +replServer.context.extractURLs = extractURLs; +replServer.context.filter = filter; +replServer.context.findReplace = findReplace; +replServer.context.fletcher16Checksum = fletcher16Checksum; +replServer.context.fletcher32Checksum = fletcher32Checksum; +replServer.context.fletcher64Checksum = fletcher64Checksum; +replServer.context.fletcher8Checksum = fletcher8Checksum; +replServer.context.formatMACAddresses = formatMACAddresses; +replServer.context.frequencyDistribution = frequencyDistribution; +replServer.context.fromBCD = fromBCD; +replServer.context.fromBase = fromBase; +replServer.context.fromBase32 = fromBase32; +replServer.context.fromBase58 = fromBase58; +replServer.context.fromBase64 = fromBase64; +replServer.context.fromBinary = fromBinary; +replServer.context.fromCharcode = fromCharcode; +replServer.context.fromDecimal = fromDecimal; +replServer.context.fromHTMLEntity = fromHTMLEntity; +replServer.context.fromHex = fromHex; +replServer.context.fromHexContent = fromHexContent; +replServer.context.fromHexdump = fromHexdump; +replServer.context.fromMorseCode = fromMorseCode; +replServer.context.fromOctal = fromOctal; +replServer.context.fromPunycode = fromPunycode; +replServer.context.fromQuotedPrintable = fromQuotedPrintable; +replServer.context.fromUNIXTimestamp = fromUNIXTimestamp; +replServer.context.generateAllHashes = generateAllHashes; +replServer.context.generateHOTP = generateHOTP; +replServer.context.generatePGPKeyPair = generatePGPKeyPair; +replServer.context.generateTOTP = generateTOTP; +replServer.context.generateUUID = generateUUID; +replServer.context.genericCodeBeautify = genericCodeBeautify; +replServer.context.groupIPAddresses = groupIPAddresses; +replServer.context.gunzip = gunzip; +replServer.context.gzip = gzip; +replServer.context.HAS160 = HAS160; +replServer.context.HMAC = HMAC; +replServer.context.HTTPRequest = HTTPRequest; +replServer.context.hammingDistance = hammingDistance; +replServer.context.head = head; +replServer.context.hexToObjectIdentifier = hexToObjectIdentifier; +replServer.context.hexToPEM = hexToPEM; +replServer.context.JPathExpression = JPathExpression; +replServer.context.JSONBeautify = JSONBeautify; +replServer.context.JSONMinify = JSONMinify; +replServer.context.javaScriptBeautify = javaScriptBeautify; +replServer.context.javaScriptMinify = javaScriptMinify; +replServer.context.javaScriptParser = javaScriptParser; +replServer.context.keccak = keccak; +replServer.context.MD2 = MD2; +replServer.context.MD4 = MD4; +replServer.context.MD5 = MD5; +replServer.context.MD6 = MD6; +replServer.context.magic = magic; +replServer.context.mean = mean; +replServer.context.median = median; +replServer.context.microsoftScriptDecoder = microsoftScriptDecoder; +replServer.context.multiply = multiply; +replServer.context.NOT = NOT; +replServer.context.numberwang = numberwang; +replServer.context.OR = OR; +replServer.context.objectIdentifierToHex = objectIdentifierToHex; +replServer.context.offsetChecker = offsetChecker; +replServer.context.PEMToHex = PEMToHex; +replServer.context.PGPDecrypt = PGPDecrypt; +replServer.context.PGPDecryptAndVerify = PGPDecryptAndVerify; +replServer.context.PGPEncrypt = PGPEncrypt; +replServer.context.PGPEncryptAndSign = PGPEncryptAndSign; +replServer.context.PHPDeserialize = PHPDeserialize; +replServer.context.padLines = padLines; +replServer.context.parseASN1HexString = parseASN1HexString; +replServer.context.parseColourCode = parseColourCode; +replServer.context.parseDateTime = parseDateTime; +replServer.context.parseIPRange = parseIPRange; +replServer.context.parseIPv4Header = parseIPv4Header; +replServer.context.parseIPv6Address = parseIPv6Address; +replServer.context.parseUNIXFilePermissions = parseUNIXFilePermissions; +replServer.context.parseURI = parseURI; +replServer.context.parseUserAgent = parseUserAgent; +replServer.context.parseX509Certificate = parseX509Certificate; +replServer.context.powerSet = powerSet; +replServer.context.pseudoRandomNumberGenerator = pseudoRandomNumberGenerator; +replServer.context.RC2Decrypt = RC2Decrypt; +replServer.context.RC2Encrypt = RC2Encrypt; +replServer.context.RC4 = RC4; +replServer.context.RC4Drop = RC4Drop; +replServer.context.RIPEMD = RIPEMD; +replServer.context.ROT13 = ROT13; +replServer.context.ROT47 = ROT47; +replServer.context.rawDeflate = rawDeflate; +replServer.context.rawInflate = rawInflate; +replServer.context.register = register; +replServer.context.regularExpression = regularExpression; +replServer.context.removeEXIF = removeEXIF; +replServer.context.removeLineNumbers = removeLineNumbers; +replServer.context.removeNullBytes = removeNullBytes; +replServer.context.removeWhitespace = removeWhitespace; +replServer.context.renderImage = renderImage; +replServer.context.Return = Return; +replServer.context.reverse = reverse; +replServer.context.rotateLeft = rotateLeft; +replServer.context.rotateRight = rotateRight; +replServer.context.SHA0 = SHA0; +replServer.context.SHA1 = SHA1; +replServer.context.SHA2 = SHA2; +replServer.context.SHA3 = SHA3; +replServer.context.SQLBeautify = SQLBeautify; +replServer.context.SQLMinify = SQLMinify; +replServer.context.SSDEEP = SSDEEP; +replServer.context.SUB = SUB; +replServer.context.scanForEmbeddedFiles = scanForEmbeddedFiles; +replServer.context.scrypt = scrypt; +replServer.context.setDifference = setDifference; +replServer.context.setIntersection = setIntersection; +replServer.context.setUnion = setUnion; +replServer.context.shake = shake; +replServer.context.showBase64Offsets = showBase64Offsets; +replServer.context.sleep = sleep; +replServer.context.snefru = snefru; +replServer.context.sort = sort; +replServer.context.split = split; +replServer.context.standardDeviation = standardDeviation; +replServer.context.strings = strings; +replServer.context.stripHTMLTags = stripHTMLTags; +replServer.context.stripHTTPHeaders = stripHTTPHeaders; +replServer.context.substitute = substitute; +replServer.context.subtract = subtract; +replServer.context.sum = sum; +replServer.context.swapEndianness = swapEndianness; +replServer.context.symmetricDifference = symmetricDifference; +replServer.context.syntaxHighlighter = syntaxHighlighter; +replServer.context.TCPIPChecksum = TCPIPChecksum; +replServer.context.tail = tail; +replServer.context.takeBytes = takeBytes; +replServer.context.toBCD = toBCD; +replServer.context.toBase = toBase; +replServer.context.toBase32 = toBase32; +replServer.context.toBase58 = toBase58; +replServer.context.toBase64 = toBase64; +replServer.context.toBinary = toBinary; +replServer.context.toCamelCase = toCamelCase; +replServer.context.toCharcode = toCharcode; +replServer.context.toDecimal = toDecimal; +replServer.context.toHTMLEntity = toHTMLEntity; +replServer.context.toHex = toHex; +replServer.context.toHexContent = toHexContent; +replServer.context.toHexdump = toHexdump; +replServer.context.toKebabCase = toKebabCase; +replServer.context.toLowerCase = toLowerCase; +replServer.context.toMorseCode = toMorseCode; +replServer.context.toOctal = toOctal; +replServer.context.toPunycode = toPunycode; +replServer.context.toQuotedPrintable = toQuotedPrintable; +replServer.context.toSnakeCase = toSnakeCase; +replServer.context.toTable = toTable; +replServer.context.toUNIXTimestamp = toUNIXTimestamp; +replServer.context.toUpperCase = toUpperCase; +replServer.context.translateDateTimeFormat = translateDateTimeFormat; +replServer.context.tripleDESDecrypt = tripleDESDecrypt; +replServer.context.tripleDESEncrypt = tripleDESEncrypt; +replServer.context.UNIXTimestampToWindowsFiletime = UNIXTimestampToWindowsFiletime; +replServer.context.URLDecode = URLDecode; +replServer.context.URLEncode = URLEncode; +replServer.context.unescapeString = unescapeString; +replServer.context.unescapeUnicodeCharacters = unescapeUnicodeCharacters; +replServer.context.unique = unique; +replServer.context.vigenèreDecode = vigenèreDecode; +replServer.context.vigenèreEncode = vigenèreEncode; +replServer.context.whirlpool = whirlpool; +replServer.context.windowsFiletimeToUNIXTimestamp = windowsFiletimeToUNIXTimestamp; +replServer.context.XKCDRandomNumber = XKCDRandomNumber; +replServer.context.XMLBeautify = XMLBeautify; +replServer.context.XMLMinify = XMLMinify; +replServer.context.XOR = XOR; +replServer.context.XORBruteForce = XORBruteForce; +replServer.context.XPathExpression = XPathExpression; +replServer.context.zlibDeflate = zlibDeflate; +replServer.context.zlibInflate = zlibInflate; diff --git a/test/tests/nodeApi/nodeApi.mjs b/test/tests/nodeApi/nodeApi.mjs index 4705829d..485f9e0f 100644 --- a/test/tests/nodeApi/nodeApi.mjs +++ b/test/tests/nodeApi/nodeApi.mjs @@ -115,7 +115,7 @@ TestRegister.addApiTests([ it("chef.help: should describe a operation", () => { const result = chef.help("tripleDESDecrypt"); - assert.strictEqual(result.name, "tripleDESDecrypt"); + assert.strictEqual(result.name, "Triple DES Decrypt"); assert.strictEqual(result.module, "Ciphers"); assert.strictEqual(result.inputType, "string"); assert.strictEqual(result.outputType, "string"); @@ -130,7 +130,7 @@ TestRegister.addApiTests([ it("chef.help: takes a wrapped operation as input", () => { const result = chef.help(chef.toBase32); - assert.strictEqual(result.name, "toBase32"); + assert.strictEqual(result.name, "To Base32"); assert.strictEqual(result.module, "Default"); }) ]);