mirror of
https://github.com/gchq/CyberChef.git
synced 2025-04-23 16:26:16 -04:00
Merge branch 'control' of https://github.com/bwhitn/CyberChef into bwhitn-control
This commit is contained in:
commit
b48e940f2d
5 changed files with 87 additions and 31 deletions
|
@ -60,14 +60,15 @@ TestRegister.addTests([
|
|||
expectedOutput: "U29tZSBkYXRhIHdpdGggYSAxIGluIGl0\n53 6f 6d 65 20 64 61 74 61 20 77 69 74 68 20 61 20 32 20 69 6e 20 69 74\n",
|
||||
recipeConfig: [
|
||||
{"op": "Fork", "args": ["\\n", "\\n", false]},
|
||||
{"op": "Conditional Jump", "args": ["1", "2", "10"]},
|
||||
{"op": "Conditional Jump", "args": ["1", false, "skipReturn", "10"]},
|
||||
{"op": "To Hex", "args": ["Space"]},
|
||||
{"op": "Return", "args": []},
|
||||
{"op": "Label", "args": ["skipReturn"]},
|
||||
{"op": "To Base64", "args": ["A-Za-z0-9+/="]}
|
||||
]
|
||||
},
|
||||
{
|
||||
name: "Jump: skips 0",
|
||||
name: "Jump: Empty Label",
|
||||
input: [
|
||||
"should be changed",
|
||||
].join("\n"),
|
||||
|
@ -77,7 +78,7 @@ TestRegister.addTests([
|
|||
recipeConfig: [
|
||||
{
|
||||
op: "Jump",
|
||||
args: [0, 10],
|
||||
args: ["", 10],
|
||||
},
|
||||
{
|
||||
op: "Find / Replace",
|
||||
|
@ -105,7 +106,7 @@ TestRegister.addTests([
|
|||
recipeConfig: [
|
||||
{
|
||||
op: "Jump",
|
||||
args: [1, 10],
|
||||
args: ["skipReplace", 10],
|
||||
},
|
||||
{
|
||||
op: "Find / Replace",
|
||||
|
@ -120,6 +121,10 @@ TestRegister.addTests([
|
|||
true,
|
||||
],
|
||||
},
|
||||
{
|
||||
op: "Label",
|
||||
args: ["skipReplace"]
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
@ -137,7 +142,7 @@ TestRegister.addTests([
|
|||
recipeConfig: [
|
||||
{
|
||||
op: "Conditional Jump",
|
||||
args: ["match", 0, 0],
|
||||
args: ["match", false, "", 0],
|
||||
},
|
||||
{
|
||||
op: "Find / Replace",
|
||||
|
@ -212,7 +217,7 @@ TestRegister.addTests([
|
|||
recipeConfig: [
|
||||
{
|
||||
op: "Conditional Jump",
|
||||
args: ["match", 1, 10],
|
||||
args: ["match", false, "skip match", 10],
|
||||
},
|
||||
{
|
||||
op: "Find / Replace",
|
||||
|
@ -227,6 +232,9 @@ TestRegister.addTests([
|
|||
true,
|
||||
],
|
||||
},
|
||||
{
|
||||
op: "Label", args: ["skip match"],
|
||||
},
|
||||
{
|
||||
op: "Find / Replace",
|
||||
args: [
|
||||
|
@ -251,9 +259,13 @@ TestRegister.addTests([
|
|||
"replaced",
|
||||
].join("\n"),
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Label",
|
||||
args: ["back to the beginning"],
|
||||
},
|
||||
{
|
||||
op: "Jump",
|
||||
args: [1],
|
||||
args: ["skip replace"],
|
||||
},
|
||||
{
|
||||
op: "Find / Replace",
|
||||
|
@ -268,9 +280,13 @@ TestRegister.addTests([
|
|||
true,
|
||||
],
|
||||
},
|
||||
{
|
||||
op: "Label",
|
||||
args: ["skip replace"],
|
||||
},
|
||||
{
|
||||
op: "Conditional Jump",
|
||||
args: ["match", -2, 10],
|
||||
args: ["match", false, "back to the beginning", 10],
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue