2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-22 03:03:26 +00:00

Compare commits

..

4 Commits

Author SHA1 Message Date
n1474335
0805a011b9 9.7.17 2019-10-18 13:57:26 +01:00
n1474335
3e3322e1f0 Fork no longer appends its merge delimiter to the end of the output. Closes #692 2019-10-18 13:57:21 +01:00
n1474335
61d40b5a0b 9.7.16 2019-10-18 11:11:17 +01:00
n1474335
d175aa958c DES no longer requires an IV in ECB mode 2019-10-18 11:09:12 +01:00
9 changed files with 12 additions and 12 deletions

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "cyberchef", "name": "cyberchef",
"version": "9.7.15", "version": "9.7.17",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "cyberchef", "name": "cyberchef",
"version": "9.7.15", "version": "9.7.17",
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.", "description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
"author": "n1474335 <n1474335@gmail.com>", "author": "n1474335 <n1474335@gmail.com>",
"homepage": "https://gchq.github.io/CyberChef", "homepage": "https://gchq.github.io/CyberChef",

View File

@@ -73,7 +73,7 @@ class DESDecrypt extends Operation {
DES uses a key length of 8 bytes (64 bits). DES uses a key length of 8 bytes (64 bits).
Triple DES uses a key length of 24 bytes (192 bits).`); Triple DES uses a key length of 24 bytes (192 bits).`);
} }
if (iv.length !== 8) { if (iv.length !== 8 && mode !== "ECB") {
throw new OperationError(`Invalid IV length: ${iv.length} bytes throw new OperationError(`Invalid IV length: ${iv.length} bytes
DES uses an IV length of 8 bytes (64 bits). DES uses an IV length of 8 bytes (64 bits).

View File

@@ -73,7 +73,7 @@ class DESEncrypt extends Operation {
DES uses a key length of 8 bytes (64 bits). DES uses a key length of 8 bytes (64 bits).
Triple DES uses a key length of 24 bytes (192 bits).`); Triple DES uses a key length of 24 bytes (192 bits).`);
} }
if (iv.length !== 8) { if (iv.length !== 8 && mode !== "ECB") {
throw new OperationError(`Invalid IV length: ${iv.length} bytes throw new OperationError(`Invalid IV length: ${iv.length} bytes
DES uses an IV length of 8 bytes (64 bits). DES uses an IV length of 8 bytes (64 bits).

View File

@@ -76,8 +76,8 @@ class Fork extends Operation {
} }
const recipe = new Recipe(); const recipe = new Recipe();
let output = "", const outputs = [];
progress = 0; let progress = 0;
state.forkOffset += state.progress + 1; state.forkOffset += state.progress + 1;
@@ -104,10 +104,10 @@ class Fork extends Operation {
} }
progress = err.progress + 1; progress = err.progress + 1;
} }
output += await dish.get(outputType) + mergeDelim; outputs.push(await dish.get(outputType));
} }
state.dish.set(output, outputType); state.dish.set(outputs.join(mergeDelim), outputType);
state.progress += progress; state.progress += progress;
return state; return state;
} }

View File

@@ -75,7 +75,7 @@ class TripleDESDecrypt extends Operation {
Triple DES uses a key length of 24 bytes (192 bits). Triple DES uses a key length of 24 bytes (192 bits).
DES uses a key length of 8 bytes (64 bits).`); DES uses a key length of 8 bytes (64 bits).`);
} }
if (iv.length !== 8) { if (iv.length !== 8 && mode !== "ECB") {
throw new OperationError(`Invalid IV length: ${iv.length} bytes throw new OperationError(`Invalid IV length: ${iv.length} bytes
Triple DES uses an IV length of 8 bytes (64 bits). Triple DES uses an IV length of 8 bytes (64 bits).

View File

@@ -75,7 +75,7 @@ class TripleDESEncrypt extends Operation {
Triple DES uses a key length of 24 bytes (192 bits). Triple DES uses a key length of 24 bytes (192 bits).
DES uses a key length of 8 bytes (64 bits).`); DES uses a key length of 8 bytes (64 bits).`);
} }
if (iv.length !== 8) { if (iv.length !== 8 && mode !== "ECB") {
throw new OperationError(`Invalid IV length: ${iv.length} bytes throw new OperationError(`Invalid IV length: ${iv.length} bytes
Triple DES uses an IV length of 8 bytes (64 bits). Triple DES uses an IV length of 8 bytes (64 bits).

View File

@@ -42,7 +42,7 @@ TestRegister.addTests([
{ {
name: "Fork, Comment, Base64", name: "Fork, Comment, Base64",
input: "cat\nsat\nmat", input: "cat\nsat\nmat",
expectedOutput: "Y2F0\nc2F0\nbWF0\n", expectedOutput: "Y2F0\nc2F0\nbWF0",
recipeConfig: [ recipeConfig: [
{ {
"op": "Fork", "op": "Fork",

View File

@@ -57,7 +57,7 @@ TestRegister.addTests([
{ {
name: "Fork, Conditional Jump, Encodings", name: "Fork, Conditional Jump, Encodings",
input: "Some data with a 1 in it\nSome data with a 2 in it", input: "Some data with a 1 in it\nSome data with a 2 in it",
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", 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",
recipeConfig: [ recipeConfig: [
{"op": "Fork", "args": ["\\n", "\\n", false]}, {"op": "Fork", "args": ["\\n", "\\n", false]},
{"op": "Conditional Jump", "args": ["1", false, "skipReturn", "10"]}, {"op": "Conditional Jump", "args": ["1", false, "skipReturn", "10"]},