mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-20 23:06:16 -04:00
Added module framework
This commit is contained in:
parent
9f19afc943
commit
a61cf6a68a
22 changed files with 762 additions and 274 deletions
154
src/core/config/modules/Default.js
Normal file
154
src/core/config/modules/Default.js
Normal file
|
@ -0,0 +1,154 @@
|
|||
import FlowControl from "../../FlowControl.js";
|
||||
import Base from "../../operations/Base.js";
|
||||
import Base58 from "../../operations/Base58.js";
|
||||
import Base64 from "../../operations/Base64.js";
|
||||
import BCD from "../../operations/BCD.js";
|
||||
import BitwiseOp from "../../operations/BitwiseOp.js";
|
||||
import ByteRepr from "../../operations/ByteRepr.js";
|
||||
import Convert from "../../operations/Convert.js";
|
||||
import DateTime from "../../operations/DateTime.js";
|
||||
import Endian from "../../operations/Endian.js";
|
||||
import Entropy from "../../operations/Entropy.js";
|
||||
import Extract from "../../operations/Extract.js";
|
||||
import FileType from "../../operations/FileType.js";
|
||||
import Hexdump from "../../operations/Hexdump.js";
|
||||
import HTML from "../../operations/HTML.js";
|
||||
import MAC from "../../operations/MAC.js";
|
||||
import MorseCode from "../../operations/MorseCode.js";
|
||||
import NetBIOS from "../../operations/NetBIOS.js";
|
||||
import Numberwang from "../../operations/Numberwang.js";
|
||||
import OS from "../../operations/OS.js";
|
||||
import QuotedPrintable from "../../operations/QuotedPrintable.js";
|
||||
import Rotate from "../../operations/Rotate.js";
|
||||
import SeqUtils from "../../operations/SeqUtils.js";
|
||||
import StrUtils from "../../operations/StrUtils.js";
|
||||
import Tidy from "../../operations/Tidy.js";
|
||||
import Unicode from "../../operations/Unicode.js";
|
||||
import URL_ from "../../operations/URL.js";
|
||||
import UUID from "../../operations/UUID.js";
|
||||
|
||||
|
||||
/**
|
||||
* Default module.
|
||||
*
|
||||
* The Default module is for operations that are expected to be very commonly used or
|
||||
* do not require any libraries. This module is loaded into the app at compile time.
|
||||
*
|
||||
* Libraries:
|
||||
* - Utils.js
|
||||
* - CryptoJS
|
||||
*
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
* @copyright Crown Copyright 2017
|
||||
* @license Apache-2.0
|
||||
*/
|
||||
let OpModules = self.OpModules || {};
|
||||
|
||||
OpModules.Default = {
|
||||
"To Hexdump": Hexdump.runTo,
|
||||
"From Hexdump": Hexdump.runFrom,
|
||||
"To Hex": ByteRepr.runToHex,
|
||||
"From Hex": ByteRepr.runFromHex,
|
||||
"To Octal": ByteRepr.runToOct,
|
||||
"From Octal": ByteRepr.runFromOct,
|
||||
"To Charcode": ByteRepr.runToCharcode,
|
||||
"From Charcode": ByteRepr.runFromCharcode,
|
||||
"To Decimal": ByteRepr.runToDecimal,
|
||||
"From Decimal": ByteRepr.runFromDecimal,
|
||||
"To Binary": ByteRepr.runToBinary,
|
||||
"From Binary": ByteRepr.runFromBinary,
|
||||
"To Hex Content": ByteRepr.runToHexContent,
|
||||
"From Hex Content": ByteRepr.runFromHexContent,
|
||||
"To Base64": Base64.runTo,
|
||||
"From Base64": Base64.runFrom,
|
||||
"Show Base64 offsets": Base64.runOffsets,
|
||||
"To Base32": Base64.runTo32,
|
||||
"From Base32": Base64.runFrom32,
|
||||
"To Base58": Base58.runTo,
|
||||
"From Base58": Base58.runFrom,
|
||||
"To Base": Base.runTo,
|
||||
"From Base": Base.runFrom,
|
||||
"To BCD": BCD.runToBCD,
|
||||
"From BCD": BCD.runFromBCD,
|
||||
"To HTML Entity": HTML.runToEntity,
|
||||
"From HTML Entity": HTML.runFromEntity,
|
||||
"Strip HTML tags": HTML.runStripTags,
|
||||
"Parse colour code": HTML.runParseColourCode,
|
||||
"URL Encode": URL_.runTo,
|
||||
"URL Decode": URL_.runFrom,
|
||||
"Parse URI": URL_.runParse,
|
||||
"Unescape Unicode Characters": Unicode.runUnescape,
|
||||
"To Quoted Printable": QuotedPrintable.runTo,
|
||||
"From Quoted Printable": QuotedPrintable.runFrom,
|
||||
"Swap endianness": Endian.runSwapEndianness,
|
||||
"ROT13": Rotate.runRot13,
|
||||
"ROT47": Rotate.runRot47,
|
||||
"Rotate left": Rotate.runRotl,
|
||||
"Rotate right": Rotate.runRotr,
|
||||
"XOR": BitwiseOp.runXor,
|
||||
"XOR Brute Force": BitwiseOp.runXorBrute,
|
||||
"OR": BitwiseOp.runXor,
|
||||
"NOT": BitwiseOp.runNot,
|
||||
"AND": BitwiseOp.runAnd,
|
||||
"ADD": BitwiseOp.runAdd,
|
||||
"SUB": BitwiseOp.runSub,
|
||||
"To Morse Code": MorseCode.runTo,
|
||||
"From Morse Code": MorseCode.runFrom,
|
||||
"Format MAC addresses": MAC.runFormat,
|
||||
"Encode NetBIOS Name": NetBIOS.runEncodeName,
|
||||
"Decode NetBIOS Name": NetBIOS.runDecodeName,
|
||||
"Regular expression": StrUtils.runRegex,
|
||||
"Offset checker": StrUtils.runOffsetChecker,
|
||||
"To Upper case": StrUtils.runUpper,
|
||||
"To Lower case": StrUtils.runLower,
|
||||
"Find / Replace": StrUtils.runFindReplace,
|
||||
"Split": StrUtils.runSplit,
|
||||
"Filter": StrUtils.runFilter,
|
||||
"Parse escaped string": StrUtils.runParseEscapedString,
|
||||
"Head": StrUtils.runHead,
|
||||
"Tail": StrUtils.runTail,
|
||||
"Remove whitespace": Tidy.runRemoveWhitespace,
|
||||
"Remove null bytes": Tidy.runRemoveNulls,
|
||||
"Drop bytes": Tidy.runDropBytes,
|
||||
"Take bytes": Tidy.runTakeBytes,
|
||||
"Pad lines": Tidy.runPad,
|
||||
"Reverse": SeqUtils.runReverse,
|
||||
"Sort": SeqUtils.runSort,
|
||||
"Unique": SeqUtils.runUnique,
|
||||
"Count occurrences": SeqUtils.runCount,
|
||||
"Add line numbers": SeqUtils.runAddLineNumbers,
|
||||
"Remove line numbers": SeqUtils.runRemoveLineNumbers,
|
||||
"Expand alphabet range": SeqUtils.runExpandAlphRange,
|
||||
"Convert distance": Convert.runDistance,
|
||||
"Convert area": Convert.runArea,
|
||||
"Convert mass": Convert.runMass,
|
||||
"Convert speed": Convert.runSpeed,
|
||||
"Convert data units": Convert.runDataSize,
|
||||
"Parse UNIX file permissions": OS.runParseUnixPerms,
|
||||
"Parse DateTime": DateTime.runParse,
|
||||
"Translate DateTime Format": DateTime.runTranslateFormat,
|
||||
"From UNIX Timestamp": DateTime.runFromUnixTimestamp,
|
||||
"To UNIX Timestamp": DateTime.runToUnixTimestamp,
|
||||
"Strings": Extract.runStrings,
|
||||
"Extract IP addresses": Extract.runIp,
|
||||
"Extract email addresses": Extract.runEmail,
|
||||
"Extract MAC addresses": Extract.runMac,
|
||||
"Extract URLs": Extract.runUrls,
|
||||
"Extract domains": Extract.runDomains,
|
||||
"Extract file paths": Extract.runFilePaths,
|
||||
"Extract dates": Extract.runDates,
|
||||
"Entropy": Entropy.runEntropy,
|
||||
"Frequency distribution": Entropy.runFreqDistrib,
|
||||
"Detect File Type": FileType.runDetect,
|
||||
"Scan for Embedded Files": FileType.runScanForEmbeddedFiles,
|
||||
"Generate UUID": UUID.runGenerateV4,
|
||||
"Numberwang": Numberwang.run,
|
||||
"Fork": FlowControl.runFork,
|
||||
"Merge": FlowControl.runMerge,
|
||||
"Jump": FlowControl.runJump,
|
||||
"Conditional Jump": FlowControl.runCondJump,
|
||||
"Return": FlowControl.runReturn,
|
||||
"Comment": FlowControl.runComment,
|
||||
};
|
||||
|
||||
export default OpModules;
|
Loading…
Add table
Add a link
Reference in a new issue