mirror of
https://github.com/gchq/CyberChef.git
synced 2025-06-17 03:35:07 -04:00
Made some naming changes to Label-related operations.
This commit is contained in:
parent
b48e940f2d
commit
12fc8c22dd
4 changed files with 31 additions and 34 deletions
|
@ -216,29 +216,6 @@ const FlowControl = {
|
|||
return state;
|
||||
},
|
||||
|
||||
/**
|
||||
* Returns the index of a label.
|
||||
*
|
||||
* @param {Object} state
|
||||
* @param {string} name
|
||||
* @returns {number}
|
||||
*/
|
||||
|
||||
_getLabelIndex: function(name, state) {
|
||||
let index = -1;
|
||||
for (let o = 0; o < state.opList.length; o++) {
|
||||
let operation = state.opList[o];
|
||||
if (operation.getConfig().op === "Label"){
|
||||
let ings = operation.getIngValues();
|
||||
if (name === ings[0]) {
|
||||
index = o;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return index;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Return operation.
|
||||
|
@ -268,6 +245,26 @@ const FlowControl = {
|
|||
return state;
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* Returns the index of a label.
|
||||
*
|
||||
* @param {Object} state
|
||||
* @param {string} name
|
||||
* @returns {number}
|
||||
*/
|
||||
_getLabelIndex: function(name, state) {
|
||||
for (let o = 0; o < state.opList.length; o++) {
|
||||
let operation = state.opList[o];
|
||||
if (operation.name === "Label"){
|
||||
let ings = operation.getIngValues();
|
||||
if (name === ings[0]) {
|
||||
return o;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
},
|
||||
};
|
||||
|
||||
export default FlowControl;
|
||||
|
|
|
@ -137,13 +137,13 @@ 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: "The Label to Jump to",
|
||||
name: "Label name",
|
||||
type: "string",
|
||||
value: ""
|
||||
},
|
||||
|
@ -156,7 +156,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,13 +167,13 @@ const OperationConfig = {
|
|||
value: ""
|
||||
},
|
||||
{
|
||||
name: "Negative match (logical NOT)",
|
||||
name: "Invert match",
|
||||
type: "boolean",
|
||||
value: false
|
||||
},
|
||||
{
|
||||
name: "The Label to Jump to",
|
||||
type: "string",
|
||||
name: "Label name",
|
||||
type: "shortString",
|
||||
value: ""
|
||||
},
|
||||
{
|
||||
|
@ -185,14 +185,14 @@ const OperationConfig = {
|
|||
},
|
||||
"Label": {
|
||||
module: "Default",
|
||||
description: "Provides a location for for conditional and fixed jumps to jump.",
|
||||
description: "Provides a location for conditional and fixed jumps to redirect execution to.",
|
||||
inputType: "string",
|
||||
outputType: "string",
|
||||
flowControl: true,
|
||||
args: [
|
||||
{
|
||||
name: "Jump Label",
|
||||
type: "string",
|
||||
name: "Name",
|
||||
type: "shortString",
|
||||
value: ""
|
||||
}
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue