mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-24 16:56:15 -04:00
Resolved conflicts
This commit is contained in:
commit
e2161ec934
25 changed files with 811 additions and 208 deletions
|
@ -113,7 +113,7 @@ const Categories = [
|
|||
]
|
||||
},
|
||||
{
|
||||
name: "Logical operations",
|
||||
name: "Arithmetic / Logic",
|
||||
ops: [
|
||||
"XOR",
|
||||
"XOR Brute Force",
|
||||
|
@ -122,6 +122,13 @@ const Categories = [
|
|||
"AND",
|
||||
"ADD",
|
||||
"SUB",
|
||||
"Sum",
|
||||
"Subtract",
|
||||
"Multiply",
|
||||
"Divide",
|
||||
"Mean",
|
||||
"Median",
|
||||
"Standard Deviation",
|
||||
"Bit shift left",
|
||||
"Bit shift right",
|
||||
"Rotate left",
|
||||
|
@ -302,6 +309,7 @@ const Categories = [
|
|||
ops: [
|
||||
"Entropy",
|
||||
"Frequency distribution",
|
||||
"Chi Square",
|
||||
"Detect File Type",
|
||||
"Scan for Embedded Files",
|
||||
"Disassemble x86",
|
||||
|
@ -320,6 +328,7 @@ const Categories = [
|
|||
"Fork",
|
||||
"Merge",
|
||||
"Register",
|
||||
"Label",
|
||||
"Jump",
|
||||
"Conditional Jump",
|
||||
"Return",
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import Arithmetic from "../operations/Arithmetic.js";
|
||||
import Base from "../operations/Base.js";
|
||||
import Base58 from "../operations/Base58.js";
|
||||
import Base64 from "../operations/Base64.js";
|
||||
|
@ -137,15 +138,15 @@ const OperationConfig = {
|
|||
},
|
||||
"Jump": {
|
||||
module: "Default",
|
||||
description: "Jump forwards or backwards over the specified number of operations.",
|
||||
description: "Jump forwards or backwards to the specified Label",
|
||||
inputType: "string",
|
||||
outputType: "string",
|
||||
flowControl: true,
|
||||
args: [
|
||||
{
|
||||
name: "Number of operations to jump over",
|
||||
type: "number",
|
||||
value: 0
|
||||
name: "Label name",
|
||||
type: "string",
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
name: "Maximum jumps (if jumping backwards)",
|
||||
|
@ -156,7 +157,7 @@ const OperationConfig = {
|
|||
},
|
||||
"Conditional Jump": {
|
||||
module: "Default",
|
||||
description: "Conditionally jump forwards or backwards over the specified number of operations based on whether the data matches the specified regular expression.",
|
||||
description: "Conditionally jump forwards or backwards to the specified Label based on whether the data matches the specified regular expression.",
|
||||
inputType: "string",
|
||||
outputType: "string",
|
||||
flowControl: true,
|
||||
|
@ -167,9 +168,14 @@ const OperationConfig = {
|
|||
value: ""
|
||||
},
|
||||
{
|
||||
name: "Number of operations to jump over if match found",
|
||||
type: "number",
|
||||
value: 0
|
||||
name: "Invert match",
|
||||
type: "boolean",
|
||||
value: false
|
||||
},
|
||||
{
|
||||
name: "Label name",
|
||||
type: "shortString",
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
name: "Maximum jumps (if jumping backwards)",
|
||||
|
@ -178,6 +184,20 @@ const OperationConfig = {
|
|||
}
|
||||
]
|
||||
},
|
||||
"Label": {
|
||||
module: "Default",
|
||||
description: "Provides a location for conditional and fixed jumps to redirect execution to.",
|
||||
inputType: "string",
|
||||
outputType: "string",
|
||||
flowControl: true,
|
||||
args: [
|
||||
{
|
||||
name: "Name",
|
||||
type: "shortString",
|
||||
value: ""
|
||||
}
|
||||
]
|
||||
},
|
||||
"Return": {
|
||||
module: "Default",
|
||||
description: "End execution of operations at this point in the recipe.",
|
||||
|
@ -500,6 +520,97 @@ const OperationConfig = {
|
|||
}
|
||||
]
|
||||
},
|
||||
"Sum": {
|
||||
module: "Default",
|
||||
description: "Adds together a list of numbers. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>18.5</code>",
|
||||
inputType: "string",
|
||||
outputType: "number",
|
||||
args: [
|
||||
{
|
||||
name: "Delimiter",
|
||||
type: "option",
|
||||
value: Arithmetic.DELIM_OPTIONS
|
||||
}
|
||||
]
|
||||
},
|
||||
"Subtract": {
|
||||
module: "Default",
|
||||
description: "Subtracts a list of numbers. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>1.5</code>",
|
||||
inputType: "string",
|
||||
outputType: "number",
|
||||
args: [
|
||||
{
|
||||
name: "Delimiter",
|
||||
type: "option",
|
||||
value: Arithmetic.DELIM_OPTIONS
|
||||
}
|
||||
]
|
||||
},
|
||||
"Multiply": {
|
||||
module: "Default",
|
||||
description: "Multiplies a list of numbers. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>40</code>",
|
||||
inputType: "string",
|
||||
outputType: "number",
|
||||
args: [
|
||||
{
|
||||
name: "Delimiter",
|
||||
type: "option",
|
||||
value: Arithmetic.DELIM_OPTIONS
|
||||
}
|
||||
]
|
||||
},
|
||||
"Divide": {
|
||||
module: "Default",
|
||||
description: "Divides a list of numbers. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>2.5</code>",
|
||||
inputType: "string",
|
||||
outputType: "number",
|
||||
args: [
|
||||
{
|
||||
name: "Delimiter",
|
||||
type: "option",
|
||||
value: Arithmetic.DELIM_OPTIONS
|
||||
}
|
||||
]
|
||||
},
|
||||
"Mean": {
|
||||
module: "Default",
|
||||
description: "Computes the mean (average) of a number list. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5 .5</code> becomes <code>4.75</code>",
|
||||
inputType: "string",
|
||||
outputType: "number",
|
||||
args: [
|
||||
{
|
||||
name: "Delimiter",
|
||||
type: "option",
|
||||
value: Arithmetic.DELIM_OPTIONS
|
||||
}
|
||||
]
|
||||
},
|
||||
"Median": {
|
||||
module: "Default",
|
||||
description: "Computes the median of a number list. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 1 .5</code> becomes <code>4.5</code>",
|
||||
inputType: "string",
|
||||
outputType: "number",
|
||||
args: [
|
||||
{
|
||||
name: "Delimiter",
|
||||
type: "option",
|
||||
value: Arithmetic.DELIM_OPTIONS
|
||||
}
|
||||
]
|
||||
},
|
||||
"Standard Deviation": {
|
||||
module: "Default",
|
||||
description: "Computes the standard deviation of a number list. If an item in the string is not a number it is excluded from the list.<br><br>e.g. <code>0x0a 8 .5</code> becomes <code>4.089281382128433</code>",
|
||||
inputType: "string",
|
||||
outputType: "number",
|
||||
args: [
|
||||
{
|
||||
name: "Delimiter",
|
||||
type: "option",
|
||||
value: Arithmetic.DELIM_OPTIONS
|
||||
}
|
||||
]
|
||||
},
|
||||
"From Hex": {
|
||||
module: "Default",
|
||||
description: "Converts a hexadecimal byte string back into its raw value.<br><br>e.g. <code>ce 93 ce b5 ce b9 ce ac 20 cf 83 ce bf cf 85 0a</code> becomes the UTF-8 encoded string <code>Γειά σου</code>",
|
||||
|
@ -3186,6 +3297,13 @@ const OperationConfig = {
|
|||
}
|
||||
]
|
||||
},
|
||||
"Chi Square": {
|
||||
module: "Default",
|
||||
description: "Calculates the Chi Square distribution of values.",
|
||||
inputType: "byteArray",
|
||||
outputType: "number",
|
||||
args: []
|
||||
},
|
||||
"Numberwang": {
|
||||
module: "Default",
|
||||
description: "Based on the popular gameshow by Mitchell and Webb.",
|
||||
|
@ -3821,7 +3939,7 @@ const OperationConfig = {
|
|||
"Generate HOTP": {
|
||||
module: "Default",
|
||||
description: "The HMAC-based One-Time Password algorithm (HOTP) is an algorithm that computes a one-time password from a shared secret key and an incrementing counter. It has been adopted as Internet Engineering Task Force standard RFC 4226, is the cornerstone of Initiative For Open Authentication (OATH), and is used in a number of two-factor authentication systems.<br><br>Enter the secret as the input or leave it blank for a random secret to be generated.",
|
||||
inputType: "string",
|
||||
inputType: "byteArray",
|
||||
outputType: "string",
|
||||
args: [
|
||||
{
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import FlowControl from "../../FlowControl.js";
|
||||
import Arithmetic from "../../operations/Arithmetic.js";
|
||||
import Base from "../../operations/Base.js";
|
||||
import Base58 from "../../operations/Base58.js";
|
||||
import Base64 from "../../operations/Base64.js";
|
||||
|
@ -38,6 +39,7 @@ import UUID from "../../operations/UUID.js";
|
|||
* Libraries:
|
||||
* - Utils.js
|
||||
* - otp
|
||||
* - crypto
|
||||
*
|
||||
* @author n1474335 [n1474335@gmail.com]
|
||||
* @copyright Crown Copyright 2017
|
||||
|
@ -141,6 +143,7 @@ OpModules.Default = {
|
|||
"Microsoft Script Decoder": MS.runDecodeScript,
|
||||
"Entropy": Entropy.runEntropy,
|
||||
"Frequency distribution": Entropy.runFreqDistrib,
|
||||
"Chi Square": Entropy.runChiSq,
|
||||
"Detect File Type": FileType.runDetect,
|
||||
"Scan for Embedded Files": FileType.runScanForEmbeddedFiles,
|
||||
"Generate UUID": UUID.runGenerateV4,
|
||||
|
@ -150,11 +153,19 @@ OpModules.Default = {
|
|||
"Fork": FlowControl.runFork,
|
||||
"Merge": FlowControl.runMerge,
|
||||
"Register": FlowControl.runRegister,
|
||||
"Label": FlowControl.runComment,
|
||||
"Jump": FlowControl.runJump,
|
||||
"Conditional Jump": FlowControl.runCondJump,
|
||||
"Return": FlowControl.runReturn,
|
||||
"Comment": FlowControl.runComment,
|
||||
"PHP Deserialize": PHP.runDeserialize,
|
||||
"Sum": Arithmetic.runSum,
|
||||
"Subtract": Arithmetic.runSub,
|
||||
"Multiply": Arithmetic.runMulti,
|
||||
"Divide": Arithmetic.runDiv,
|
||||
"Mean": Arithmetic.runMean,
|
||||
"Median": Arithmetic.runMedian,
|
||||
"Standard Deviation": Arithmetic.runStdDev,
|
||||
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue