2
0
mirror of https://github.com/gchq/CyberChef synced 2025-12-05 23:53:27 +00:00

Compare commits

...

21 Commits

Author SHA1 Message Date
n1474335
a3b873fd96 9.28.0 2021-03-26 14:09:51 +00:00
n1474335
97bd03799e Updated CHANGELOG 2021-03-26 14:09:37 +00:00
n1474335
ffaaaae2b4 Merge branch 'Danh4-issue-991' 2021-03-26 14:07:18 +00:00
n1474335
ff88d30d2f Tidied up CBOR operations 2021-03-26 14:07:02 +00:00
n1474335
88e3c2ccb2 Merge branch 'issue-991' of https://github.com/Danh4/CyberChef into Danh4-issue-991 2021-03-26 13:59:16 +00:00
n1474335
5029356514 Added link to FAQ description about output handling 2021-03-05 10:50:38 +00:00
n1474335
e57d5a7e75 9.27.6 2021-02-23 15:11:22 +00:00
n1474335
2bbe54cdcd Added further deconstruction of IPv6 Multicast Addresses in the 'Parse IPv6 Address' operation 2021-02-23 15:11:16 +00:00
n1474335
0e2423c390 9.27.5 2021-02-22 19:33:56 +00:00
n1474335
8fadad5891 AES Additional data can now be entered in a range of formats. #1011 2021-02-22 19:33:52 +00:00
n1474335
32455cd20f 9.27.4 2021-02-22 19:13:47 +00:00
n1474335
1e0e7f16a7 Added numeric validation for arguments in Binary and Hex operattions. Fixes #1178 2021-02-22 19:13:38 +00:00
n1474335
95884d77cf Extractable file formats are now listed properly in the 'Extract Files' description 2021-02-17 15:01:42 +00:00
n1474335
b69373f5e7 Fixed 'JSON to CSV' data flattening. 2021-02-16 14:48:56 +00:00
n1474335
61e85474d3 9.27.3 2021-02-16 14:36:36 +00:00
n1474335
3a9bdc58af Fixed 'JSON to CSV' handling of complex structures. Closes #637 2021-02-16 14:36:31 +00:00
n1474335
59c1c45d78 Updated dependencies 2021-02-16 14:17:09 +00:00
n1474335
b5f6cedd30 9.27.2 2021-02-16 14:12:18 +00:00
n1474335
c879af6860 Fixed 'Save recipe' URL generation issue. Closes #1176 2021-02-16 14:12:14 +00:00
71819
209fc07eac Issue 991: Add CBOR Decode operation 2020-03-30 11:31:25 +01:00
71819
ae70cb89ed Issue 991: Add CBOR Encode operation 2020-03-30 11:31:25 +01:00
25 changed files with 649 additions and 95 deletions

View File

@@ -13,6 +13,9 @@ All major and minor version changes will be documented in this file. Details of
## Details
### [9.28.0] - 2021-03-26
- 'CBOR Encode' and 'CBOR Decode' operations added [@Danh4] | [#999]
### [9.27.0] - 2021-02-12
- 'Fuzzy Match' operation added [@n1474335] | [8ad18b]
@@ -256,6 +259,7 @@ All major and minor version changes will be documented in this file. Details of
[9.28.0]: https://github.com/gchq/CyberChef/releases/tag/v9.28.0
[9.27.0]: https://github.com/gchq/CyberChef/releases/tag/v9.27.0
[9.26.0]: https://github.com/gchq/CyberChef/releases/tag/v9.26.0
[9.25.0]: https://github.com/gchq/CyberChef/releases/tag/v9.25.0
@@ -363,6 +367,7 @@ All major and minor version changes will be documented in this file. Details of
[@MarvinJWendt]: https://github.com/MarvinJWendt
[@dmfj]: https://github.com/dmfj
[@mattnotmitt]: https://github.com/mattnotmitt
[@Danh4]: https://github.com/Danh4
[8ad18b]: https://github.com/gchq/CyberChef/commit/8ad18bc7db6d9ff184ba3518686293a7685bf7b7
@@ -438,6 +443,7 @@ All major and minor version changes will be documented in this file. Details of
[#965]: https://github.com/gchq/CyberChef/pull/965
[#966]: https://github.com/gchq/CyberChef/pull/966
[#987]: https://github.com/gchq/CyberChef/pull/987
[#999]: https://github.com/gchq/CyberChef/pull/999
[#1006]: https://github.com/gchq/CyberChef/pull/1006
[#1022]: https://github.com/gchq/CyberChef/pull/1022
[#1045]: https://github.com/gchq/CyberChef/pull/1045

71
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "cyberchef",
"version": "9.27.1",
"version": "9.28.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@@ -4553,6 +4553,15 @@
"integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=",
"dev": true
},
"cbor": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/cbor/-/cbor-5.2.0.tgz",
"integrity": "sha512-5IMhi9e1QU76ppa5/ajP1BmMWZ2FHkhAhjeVKQ/EFCgYSEaeVaoGtL7cxJskf9oCCk+XjzaIdc3IuU/dbA/o2A==",
"requires": {
"bignumber.js": "^9.0.1",
"nofilter": "^1.0.4"
}
},
"chai-nightwatch": {
"version": "0.4.0",
"resolved": "https://registry.npmjs.org/chai-nightwatch/-/chai-nightwatch-0.4.0.tgz",
@@ -6351,12 +6360,12 @@
}
},
"eslint": {
"version": "7.19.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.19.0.tgz",
"integrity": "sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg==",
"version": "7.20.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-7.20.0.tgz",
"integrity": "sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"@babel/code-frame": "7.12.11",
"@eslint/eslintrc": "^0.3.0",
"ajv": "^6.10.0",
"chalk": "^4.0.0",
@@ -6368,7 +6377,7 @@
"eslint-utils": "^2.1.0",
"eslint-visitor-keys": "^2.0.0",
"espree": "^7.3.1",
"esquery": "^1.2.0",
"esquery": "^1.4.0",
"esutils": "^2.0.2",
"file-entry-cache": "^6.0.0",
"functional-red-black-tree": "^1.0.1",
@@ -6395,6 +6404,15 @@
"v8-compile-cache": "^2.0.3"
},
"dependencies": {
"@babel/code-frame": {
"version": "7.12.11",
"resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz",
"integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==",
"dev": true,
"requires": {
"@babel/highlight": "^7.10.4"
}
},
"ansi-regex": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz",
@@ -6606,9 +6624,9 @@
"integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A=="
},
"esquery": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz",
"integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==",
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz",
"integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==",
"dev": true,
"requires": {
"estraverse": "^5.1.0"
@@ -9408,9 +9426,9 @@
"integrity": "sha512-zCTP6Qd/WwjrpuHFkJuXc5opRdKprUr7eI7+JCCtcetThJt45qptu82MWQ+eET+FtDrMo7+BYjo3iD0XIq1L9Q=="
},
"jsrsasign": {
"version": "10.1.8",
"resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.1.8.tgz",
"integrity": "sha512-NdMWugkiOXk7dfB8a2PMlnzjf+8mxWgGC9IfWhiYouQa00Qcc4PBrCk4eH+MNB2O/DJ2Cjz1eEzI2usY3BSynQ=="
"version": "10.1.10",
"resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-10.1.10.tgz",
"integrity": "sha512-//Kkza0S/kFbK5fq6eVbwlM36tKes+ak6FfTn8+mFxKlYzN/3bVJDa0ZERGYu78QKWrXPpos+TIC1tTJDNFDRQ=="
},
"jszip": {
"version": "2.5.0",
@@ -10223,9 +10241,9 @@
}
},
"mini-css-extract-plugin": {
"version": "1.3.6",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.6.tgz",
"integrity": "sha512-t86rLnySRQgN2+58gAIARTEtnClLNZoC99shNrvQ960V/wB9n50AUKJyqly76/s4fT0zwaLFIDFZAW7aK25pvg==",
"version": "1.3.7",
"resolved": "https://registry.npmjs.org/mini-css-extract-plugin/-/mini-css-extract-plugin-1.3.7.tgz",
"integrity": "sha512-NDyOUqdfKVIfWTludTcZ6JDOMsIdWgyTEECYbfvZszPpkMRyQLvukqtLr92tfukPQxVZNCKb8TkOilFBvS5RIw==",
"dev": true,
"requires": {
"loader-utils": "^2.0.0",
@@ -10872,6 +10890,11 @@
"resolved": "https://registry.npmjs.org/nodom/-/nodom-2.4.0.tgz",
"integrity": "sha512-qhfYgpoCSi37HLiViMlf94YqMQdvk3n3arI1uGbAWZK9NKCYRSI42W8lATeGloYGLYxb8us1C5rTvtsXjwdWQg=="
},
"nofilter": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/nofilter/-/nofilter-1.0.4.tgz",
"integrity": "sha512-N8lidFp+fCz+TD51+haYdbDGrcBWwuHX40F5+z0qkUjMJ5Tp+rdSuAkMJ9N9eoolDlEVTf6u5icM+cNKkKW2mA=="
},
"nopt": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz",
@@ -13986,9 +14009,9 @@
},
"dependencies": {
"ajv": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz",
"integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==",
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-7.1.0.tgz",
"integrity": "sha512-svS9uILze/cXbH0z2myCK2Brqprx/+JJYK5pHicT/GQiBfzzhUVAIT6MwqJg8y4xV/zoGsUeuPuwtoiKSGE15g==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",
@@ -14061,9 +14084,9 @@
}
},
"terser": {
"version": "5.5.1",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.5.1.tgz",
"integrity": "sha512-6VGWZNVP2KTUcltUQJ25TtNjx/XgdDsBDKGt8nN0MpydU36LmbPPcMBd2kmtZNNGVVDLg44k7GKeHHj+4zPIBQ==",
"version": "5.6.0",
"resolved": "https://registry.npmjs.org/terser/-/terser-5.6.0.tgz",
"integrity": "sha512-vyqLMoqadC1uR0vywqOZzriDYzgEkNJFK4q9GeyOBHIbiECHiWLKcWfbQWAUaPfxkjDhapSlZB9f7fkMrvkVjA==",
"requires": {
"commander": "^2.20.0",
"source-map": "~0.7.2",
@@ -14807,9 +14830,9 @@
}
},
"webpack": {
"version": "5.21.2",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.21.2.tgz",
"integrity": "sha512-xHflCenx+AM4uWKX71SWHhxml5aMXdy2tu/vdi4lClm7PADKxlyDAFFN1rEFzNV0MAoPpHtBeJnl/+K6F4QBPg==",
"version": "5.22.0",
"resolved": "https://registry.npmjs.org/webpack/-/webpack-5.22.0.tgz",
"integrity": "sha512-xqlb6r9RUXda/d9iA6P7YRTP1ChWeP50TEESKMMNIg0u8/Rb66zN9YJJO7oYgJTRyFyYi43NVC5feG45FSO1vQ==",
"dev": true,
"requires": {
"@types/eslint-scope": "^3.7.0",

View File

@@ -1,6 +1,6 @@
{
"name": "cyberchef",
"version": "9.27.1",
"version": "9.28.0",
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
"author": "n1474335 <n1474335@gmail.com>",
"homepage": "https://gchq.github.io/CyberChef",
@@ -48,7 +48,7 @@
"colors": "^1.4.0",
"copy-webpack-plugin": "^7.0.0",
"css-loader": "^5.0.2",
"eslint": "^7.19.0",
"eslint": "^7.20.0",
"exports-loader": "^2.0.0",
"file-loader": "^6.2.0",
"grunt": "^1.3.0",
@@ -64,7 +64,7 @@
"grunt-zip": "^0.18.2",
"html-webpack-plugin": "^5.1.0",
"imports-loader": "^2.0.0",
"mini-css-extract-plugin": "^1.3.6",
"mini-css-extract-plugin": "^1.3.7",
"nightwatch": "^1.5.1",
"node-sass": "^5.0.0",
"postcss": "^8.2.6",
@@ -77,7 +77,7 @@
"style-loader": "^2.0.0",
"svg-url-loader": "^7.1.1",
"url-loader": "^4.1.1",
"webpack": "^5.21.2",
"webpack": "^5.22.0",
"webpack-bundle-analyzer": "^4.4.0",
"webpack-dev-server": "^3.11.2",
"webpack-node-externals": "^2.5.2",
@@ -98,6 +98,7 @@
"browserify-zlib": "^0.2.0",
"bson": "^4.2.2",
"buffer": "^6.0.3",
"cbor": "^5.0.1",
"chi-squared": "^1.1.0",
"codepage": "^1.14.0",
"core-js": "^3.8.3",
@@ -125,7 +126,7 @@
"jsonpath": "^1.1.0",
"jsonwebtoken": "^8.5.1",
"jsqr": "^1.3.1",
"jsrsasign": "10.1.8",
"jsrsasign": "^10.1.10",
"kbpgp": "2.1.15",
"libbzip2-wasm": "0.0.4",
"libyara-wasm": "^1.1.0",
@@ -152,7 +153,7 @@
"split.js": "^1.6.2",
"ssdeep.js": "0.0.2",
"stream-browserify": "^3.0.0",
"terser": "^5.5.1",
"terser": "^5.6.0",
"tesseract.js": "2.1.1",
"ua-parser-js": "^0.7.24",
"unorm": "^1.6.0",

View File

@@ -895,8 +895,8 @@ class Utils {
while ((m = recipeRegex.exec(recipe))) {
// Translate strings in args back to double-quotes
args = m[2]
.replace(/"/g, '\\"') // Escape double quotes // lgtm [js/incomplete-sanitization]
args = m[2] // lgtm [js/incomplete-sanitization]
.replace(/"/g, '\\"') // Escape double quotes
.replace(/(^|,|{|:)'/g, '$1"') // Replace opening ' with "
.replace(/([^\\]|(?:\\\\)+)'(,|:|}|$)/g, '$1"$2') // Replace closing ' with "
.replace(/\\'/g, "'"); // Unescape single quotes

View File

@@ -61,7 +61,9 @@
"Parse TLV",
"CSV to JSON",
"JSON to CSV",
"Avro to JSON"
"Avro to JSON",
"CBOR Encode",
"CBOR Decode"
]
},
{

View File

@@ -7,6 +7,7 @@
*/
import Utils from "../Utils.mjs";
import OperationError from "../errors/OperationError.mjs";
/**
@@ -58,6 +59,9 @@ export function toBinary(data, delim="Space", padding=8) {
* fromBinary("00010000:00100000:00110000", "Colon");
*/
export function fromBinary(data, delim="Space", byteLen=8) {
if (byteLen < 1 || Math.round(byteLen) !== byteLen)
throw new OperationError("Byte length must be a positive integer");
const delimRegex = Utils.regexRep(delim);
data = data.replace(delimRegex, "");

View File

@@ -7,6 +7,7 @@
*/
import Utils from "../Utils.mjs";
import OperationError from "../errors/OperationError.mjs";
/**
@@ -100,6 +101,9 @@ export function toHexFast(data) {
* fromHex("0a:14:1e", "Colon");
*/
export function fromHex(data, delim="Auto", byteLen=2) {
if (byteLen < 1 || Math.round(byteLen) !== byteLen)
throw new OperationError("Byte length must be a positive integer");
if (delim !== "None") {
const delimRegex = delim === "Auto" ? /[^a-f\d]|(0x)/gi : Utils.regexRep(delim);
data = data.replace(delimRegex, "");

View File

@@ -15,7 +15,7 @@ import { toHex, fromHex } from "./Hex.mjs";
* @param {number} indent
* @returns {string}
*/
export function formatDnStr (dnStr, indent) {
export function formatDnStr(dnStr, indent) {
const fields = dnStr.substr(1).replace(/([^\\])\//g, "$1$1/").split(/[^\\]\//);
let output = "",
maxKeyLen = 0,
@@ -54,7 +54,7 @@ export function formatDnStr (dnStr, indent) {
* @param {number} indent
* @returns {string}
*/
export function formatByteStr (byteStr, length, indent) {
export function formatByteStr(byteStr, length, indent) {
byteStr = toHex(fromHex(byteStr), ":");
length = length * 3;
let output = "";

View File

@@ -87,8 +87,9 @@ class AESDecrypt extends Operation {
},
{
"name": "Additional Authenticated Data",
"type": "binaryString",
"value": ""
"type": "toggleString",
"value": "",
"toggleValues": ["Hex", "UTF8", "Latin1", "Base64"]
}
];
}
@@ -107,7 +108,7 @@ class AESDecrypt extends Operation {
inputType = args[3],
outputType = args[4],
gcmTag = Utils.convertToByteString(args[5].string, args[5].option),
aad = args[6];
aad = Utils.convertToByteString(args[6].string, args[6].option);
if ([16, 24, 32].indexOf(key.length) < 0) {
throw new OperationError(`Invalid key length: ${key.length} bytes

View File

@@ -81,8 +81,9 @@ class AESEncrypt extends Operation {
},
{
"name": "Additional Authenticated Data",
"type": "binaryString",
"value": ""
"type": "toggleString",
"value": "",
"toggleValues": ["Hex", "UTF8", "Latin1", "Base64"]
}
];
}
@@ -100,7 +101,7 @@ class AESEncrypt extends Operation {
mode = args[2],
inputType = args[3],
outputType = args[4],
aad = args[5];
aad = Utils.convertToByteString(args[5].string, args[5].option);
if ([16, 24, 32].indexOf(key.length) < 0) {
throw new OperationError(`Invalid key length: ${key.length} bytes

View File

@@ -0,0 +1,41 @@
/**
* @author Danh4 [dan.h4@ncsc.gov.uk]
* @copyright Crown Copyright 2020
* @license Apache-2.0
*/
import Operation from "../Operation.mjs";
import Cbor from "cbor";
/**
* CBOR Decode operation
*/
class CBORDecode extends Operation {
/**
* CBORDecode constructor
*/
constructor() {
super();
this.name = "CBOR Decode";
this.module = "Serialise";
this.description = "Concise Binary Object Representation (CBOR) is a binary data serialization format loosely based on JSON. Like JSON it allows the transmission of data objects that contain namevalue pairs, but in a more concise manner. This increases processing and transfer speeds at the cost of human readability. It is defined in IETF RFC 8949.";
this.infoURL = "https://wikipedia.org/wiki/CBOR";
this.inputType = "ArrayBuffer";
this.outputType = "JSON";
this.args = [];
}
/**
* @param {ArrayBuffer} input
* @param {Object[]} args
* @returns {JSON}
*/
run(input, args) {
return Cbor.decodeFirstSync(Buffer.from(input).toString("hex"));
}
}
export default CBORDecode;

View File

@@ -0,0 +1,41 @@
/**
* @author Danh4 [dan.h4@ncsc.gov.uk]
* @copyright Crown Copyright 2020
* @license Apache-2.0
*/
import Operation from "../Operation.mjs";
import Cbor from "cbor";
/**
* CBOR Encode operation
*/
class CBOREncode extends Operation {
/**
* CBOREncode constructor
*/
constructor() {
super();
this.name = "CBOR Encode";
this.module = "Serialise";
this.description = "Concise Binary Object Representation (CBOR) is a binary data serialization format loosely based on JSON. Like JSON it allows the transmission of data objects that contain namevalue pairs, but in a more concise manner. This increases processing and transfer speeds at the cost of human readability. It is defined in IETF RFC 8949.";
this.infoURL = "https://wikipedia.org/wiki/CBOR";
this.inputType = "JSON";
this.outputType = "ArrayBuffer";
this.args = [];
}
/**
* @param {JSON} input
* @param {Object[]} args
* @returns {ArrayBuffer}
*/
run(input, args) {
return new Uint8Array(Cbor.encodeCanonical(input)).buffer;
}
}
export default CBOREncode;

View File

@@ -21,9 +21,24 @@ class ExtractFiles extends Operation {
constructor() {
super();
// Get the first extension for each signature that can be extracted
let supportedExts = Object.keys(FILE_SIGNATURES).map(cat => {
return FILE_SIGNATURES[cat]
.filter(sig => sig.extractor)
.map(sig => sig.extension.toUpperCase());
});
// Flatten categories and remove duplicates
supportedExts = [].concat(...supportedExts).unique();
this.name = "Extract Files";
this.module = "Default";
this.description = "Performs file carving to attempt to extract files from the input.<br><br>This operation is currently capable of carving out the following formats:<ul><li>JPG</li><li>EXE</li><li>ZIP</li><li>PDF</li><li>PNG</li><li>BMP</li><li>FLV</li><li>RTF</li><li>DOCX, PPTX, XLSX</li><li>EPUB</li><li>GZIP</li><li>ZLIB</li><li>ELF, BIN, AXF, O, PRX, SO</li></ul>";
this.description = `Performs file carving to attempt to extract files from the input.<br><br>This operation is currently capable of carving out the following formats:
<ul>
<li>
${supportedExts.join("</li><li>")}
</li>
</ul>`;
this.infoURL = "https://forensicswiki.xyz/wiki/index.php?title=File_Carving";
this.inputType = "ArrayBuffer";
this.outputType = "List<File>";

View File

@@ -35,7 +35,8 @@ class FromBinary extends Operation {
{
"name": "Byte Length",
"type": "number",
"value": 8
"value": 8,
"min": 1
}
];
this.checks = [

View File

@@ -43,15 +43,16 @@ class JSONToCSV extends Operation {
/**
* Converts JSON to a CSV equivalent.
*
* @param {boolean} force - Whether to force conversion of data to fit in a cell
* @returns {string}
*/
toCSV() {
toCSV(force=false) {
const self = this;
// If the JSON is an array of arrays, this is easy
if (this.flattened[0] instanceof Array) {
return this.flattened
.map(row => row
.map(self.escapeCellContents.bind(self))
.map(d => self.escapeCellContents(d, force))
.join(this.cellDelim)
)
.join(this.rowDelim) +
@@ -61,13 +62,13 @@ class JSONToCSV extends Operation {
// If it's an array of dictionaries...
const header = Object.keys(this.flattened[0]);
return header
.map(self.escapeCellContents.bind(self))
.map(d => self.escapeCellContents(d, force))
.join(this.cellDelim) +
this.rowDelim +
this.flattened
.map(row => header
.map(h => row[h])
.map(self.escapeCellContents.bind(self))
.map(d => self.escapeCellContents(d, force))
.join(this.cellDelim)
)
.join(this.rowDelim) +
@@ -98,7 +99,7 @@ class JSONToCSV extends Operation {
if (!(this.flattened instanceof Array)) {
this.flattened = [this.flattened];
}
return this.toCSV();
return this.toCSV(true);
} catch (err) {
throw new OperationError("Unable to parse JSON to CSV: " + err.toString());
}
@@ -109,15 +110,17 @@ class JSONToCSV extends Operation {
* Correctly escapes a cell's contents based on the cell and row delimiters.
*
* @param {string} data
* @param {boolean} force - Whether to force conversion of data to fit in a cell
* @returns {string}
*/
escapeCellContents(data) {
escapeCellContents(data, force=false) {
if (typeof data === "number") data = data.toString();
if (force && typeof data !== "string") data = JSON.stringify(data);
// Double quotes should be doubled up
data = data.replace(/"/g, '""');
// If the cell contains a cell or row delimiter or a double quote, it mut be enclosed in double quotes
// If the cell contains a cell or row delimiter or a double quote, it must be enclosed in double quotes
if (
data.indexOf(this.cellDelim) >= 0 ||
data.indexOf(this.rowDelim) >= 0 ||

View File

@@ -165,6 +165,89 @@ class ParseIPv6Address extends Operation {
// Multicast
output += "\nThis is a reserved multicast address.";
output += "\nMulticast addresses range: ff00::/8";
switch (ipv6[0]) {
case 0xff01:
output += "\n\nReserved Multicast Block for Interface Local Scope";
break;
case 0xff02:
output += "\n\nReserved Multicast Block for Link Local Scope";
break;
case 0xff03:
output += "\n\nReserved Multicast Block for Realm Local Scope";
break;
case 0xff04:
output += "\n\nReserved Multicast Block for Admin Local Scope";
break;
case 0xff05:
output += "\n\nReserved Multicast Block for Site Local Scope";
break;
case 0xff08:
output += "\n\nReserved Multicast Block for Organisation Local Scope";
break;
case 0xff0e:
output += "\n\nReserved Multicast Block for Global Scope";
break;
}
if (ipv6[6] === 1) {
if (ipv6[7] === 2) {
output += "\nReserved Multicast Address for 'All DHCP Servers and Relay Agents (defined in RFC3315)'";
} else if (ipv6[7] === 3) {
output += "\nReserved Multicast Address for 'All LLMNR Hosts (defined in RFC4795)'";
}
} else {
switch (ipv6[7]) {
case 1:
output += "\nReserved Multicast Address for 'All nodes'";
break;
case 2:
output += "\nReserved Multicast Address for 'All routers'";
break;
case 5:
output += "\nReserved Multicast Address for 'OSPFv3 - All OSPF routers'";
break;
case 6:
output += "\nReserved Multicast Address for 'OSPFv3 - All Designated Routers'";
break;
case 8:
output += "\nReserved Multicast Address for 'IS-IS for IPv6 Routers'";
break;
case 9:
output += "\nReserved Multicast Address for 'RIP Routers'";
break;
case 0xa:
output += "\nReserved Multicast Address for 'EIGRP Routers'";
break;
case 0xc:
output += "\nReserved Multicast Address for 'Simple Service Discovery Protocol'";
break;
case 0xd:
output += "\nReserved Multicast Address for 'PIM Routers'";
break;
case 0x16:
output += "\nReserved Multicast Address for 'MLDv2 Reports (defined in RFC3810)'";
break;
case 0x6b:
output += "\nReserved Multicast Address for 'Precision Time Protocol v2 Peer Delay Measurement Messages'";
break;
case 0xfb:
output += "\nReserved Multicast Address for 'Multicast DNS'";
break;
case 0x101:
output += "\nReserved Multicast Address for 'Network Time Protocol'";
break;
case 0x108:
output += "\nReserved Multicast Address for 'Network Information Service'";
break;
case 0x114:
output += "\nReserved Multicast Address for 'Experiments'";
break;
case 0x181:
output += "\nReserved Multicast Address for 'Precision Time Protocol v2 Messages (exc. Peer Delay)'";
break;
}
}
}

View File

@@ -6,6 +6,7 @@
import Operation from "../Operation.mjs";
import Utils from "../Utils.mjs";
import OperationError from "../errors/OperationError.mjs";
/**
* To Hexdump operation
@@ -28,7 +29,8 @@ class ToHexdump extends Operation {
{
"name": "Width",
"type": "number",
"value": 16
"value": 16,
"min": 1
},
{
"name": "Upper case hex",
@@ -58,6 +60,9 @@ class ToHexdump extends Operation {
const [length, upperCase, includeFinalLength, unixFormat] = args;
const padding = 2;
if (length < 1 || Math.round(length) !== length)
throw new OperationError("Width must be a positive integer");
let output = "";
for (let i = 0; i < data.length; i += length) {
const buff = data.slice(i, i+length);

View File

@@ -725,7 +725,7 @@ class App {
this.progress = 0;
this.autoBake();
this.updateTitle(false, null, true);
this.updateTitle(true, null, true);
}

View File

@@ -686,7 +686,7 @@
<div class="collapse" id="faq-load-files">
<p>Yes! Just drag your file over the input box and drop it.</p>
<p>CyberChef can handle files up to around 2GB (depending on your browser), however some of the operations may take a very long time to run over this much data.</p>
<p>If the output is larger than a certain threshold (default 1MiB), it will be presented to you as a file available for download. Slices of the file can be viewed in the output if you need to inspect them.</p>
<p>If the output is larger than a certain threshold (default <a href="#recipe=Multiply('Line%20feed')Convert_data_units('Bytes%20(B)','Mebibytes%20(MiB)')&input=MTAyNAoxMDI0">1MiB</a>), it will be presented to you as a file available for download. Slices of the file can be viewed in the output if you need to inspect them.</p>
</div>
<br>

View File

@@ -100,7 +100,7 @@ class ControlsWaiter {
const includeRecipe = document.getElementById("save-link-recipe-checkbox").checked;
const includeInput = document.getElementById("save-link-input-checkbox").checked;
const saveLinkEl = document.getElementById("save-link");
const saveLink = this.generateStateUrl(includeRecipe, includeInput, recipeConfig);
const saveLink = this.generateStateUrl(includeRecipe, includeInput, null, recipeConfig);
saveLinkEl.innerHTML = Utils.escapeHtml(Utils.truncate(saveLink, 120));
saveLinkEl.setAttribute("href", saveLink);
@@ -128,11 +128,13 @@ class ControlsWaiter {
includeRecipe = includeRecipe && (recipeConfig.length > 0);
// If we don't get passed an input, get it from the current URI
if (input === null) {
if (input === null && includeInput) {
const params = this.app.getURIParams();
if (params.input) {
includeInput = true;
input = params.input;
} else {
includeInput = false;
}
}

View File

@@ -102,6 +102,9 @@ import "./tests/Colossus.mjs";
import "./tests/ParseObjectIDTimestamp.mjs";
import "./tests/Unicode.mjs";
import "./tests/RSA.mjs";
import "./tests/CBOREncode.mjs";
import "./tests/CBORDecode.mjs";
// Cannot test operations that use the File type yet
// import "./tests/SplitColourChannels.mjs";

View File

@@ -0,0 +1,144 @@
/**
* CBOR Decode Tests
*
* @author Danh4 [dan.h4@ncsc.gov.uk]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
{
name: "CBOR Decode: Can decode integer",
input: "0f",
expectedOutput: "15",
recipeConfig: [
{
op: "From Hex",
args: []
},
{
op: "CBOR Decode",
args: []
}
]
},
{
name: "CBOR Decode: Can decode decimal",
input: "f9 3e 00",
expectedOutput: "1.5",
recipeConfig: [
{
op: "From Hex",
args: []
},
{
op: "CBOR Decode",
args: []
}
]
},
{
name: "From Hex: Can decode text",
input: "64 54 65 78 74",
expectedOutput: "\"Text\"",
recipeConfig: [
{
op: "From Hex",
args: []
},
{
op: "CBOR Decode",
args: []
}
]
},
{
name: "From Hex: Can decode boolean true",
input: "f5",
expectedOutput: "true",
recipeConfig: [
{
op: "From Hex",
args: []
},
{
op: "CBOR Decode",
args: []
}
]
},
{
name: "From Hex: Can decode boolean false",
input: "f4",
expectedOutput: "false",
recipeConfig: [
{
op: "From Hex",
args: []
},
{
op: "CBOR Decode",
args: []
}
]
},
{
name: "From Hex: Can decode map",
input: "a3 61 61 01 61 62 02 61 63 03",
expectedOutput: JSON.stringify({a: 1, b: 2, c: 3}),
recipeConfig: [
{
op: "From Hex",
args: []
},
{
op: "CBOR Decode",
args: []
},
{
op: "JSON Minify",
args: []
}
]
},
{
name: "From Hex: Can decode list",
input: "83 00 01 02",
expectedOutput: "[0,1,2]",
recipeConfig: [
{
op: "From Hex",
args: []
},
{
op: "CBOR Decode",
args: []
},
{
op: "JSON Minify",
args: []
}
]
},
{
name: "From Hex: Can round trip with encode",
input: JSON.stringify({a: 1, b: false, c: [1, 2, 3]}),
expectedOutput: JSON.stringify({a: 1, b: false, c: [1, 2, 3]}),
recipeConfig: [
{
op: "CBOR Encode",
args: []
},
{
op: "CBOR Decode",
args: []
},
{
op: "JSON Minify",
args: []
}
]
}
]);

View File

@@ -0,0 +1,117 @@
/**
* CBOR Encode Tests.
*
* @author Danh4 [dan.h4@ncsc.gov.uk]
* @copyright Crown Copyright 2019
* @license Apache-2.0
*/
import TestRegister from "../../lib/TestRegister.mjs";
TestRegister.addTests([
{
name: "CBOR Encode: Can encode integer",
input: "15",
expectedOutput: "0f",
recipeConfig: [
{
op: "CBOR Encode",
args: []
},
{
op: "To Hex",
args: []
}
]
},
{
name: "CBOR Decode: Can encode decimal",
input: "1.5",
expectedOutput: "f9 3e 00",
recipeConfig: [
{
op: "CBOR Encode",
args: []
},
{
op: "To Hex",
args: []
}
]
},
{
name: "CBOR Encode: Can encode text",
input: "\"Text\"",
expectedOutput: "64 54 65 78 74",
recipeConfig: [
{
op: "CBOR Encode",
args: []
},
{
op: "To Hex",
args: []
}
]
},
{
name: "CBOR Encode: Can encode boolean true",
input: "true",
expectedOutput: "f5",
recipeConfig: [
{
op: "CBOR Encode",
args: []
},
{
op: "To Hex",
args: []
}
]
},
{
name: "CBOR Encode: Can encode boolean false",
input: "false",
expectedOutput: "f4",
recipeConfig: [
{
op: "CBOR Encode",
args: []
},
{
op: "To Hex",
args: []
}
]
},
{
name: "CBOR Encode: Can encode map",
input: JSON.stringify({a: 1, b: 2, c: 3}),
expectedOutput: "a3 61 61 01 61 62 02 61 63 03",
recipeConfig: [
{
op: "CBOR Encode",
args: []
},
{
op: "To Hex",
args: []
}
]
},
{
name: "CBOR Encode: Can encode list",
input: "[0,1,2]",
expectedOutput: "83 00 01 02",
recipeConfig: [
{
op: "CBOR Encode",
args: []
},
{
op: "To Hex",
args: []
}
]
}
]);

View File

@@ -73,7 +73,8 @@ The following algorithms will be used based on the size of the key:
"args": [
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""},
"CBC", "Raw", "Hex"
"CBC", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -88,7 +89,8 @@ The following algorithms will be used based on the size of the key:
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00000000000000000000000000000000"},
"CBC", "Raw", "Hex"
"CBC", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -103,7 +105,8 @@ The following algorithms will be used based on the size of the key:
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00000000000000000000000000000000"},
"CTR", "Raw", "Hex"
"CTR", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -118,7 +121,8 @@ The following algorithms will be used based on the size of the key:
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
"CBC", "Raw", "Hex"
"CBC", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -133,7 +137,8 @@ The following algorithms will be used based on the size of the key:
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
"CFB", "Raw", "Hex"
"CFB", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -148,7 +153,8 @@ The following algorithms will be used based on the size of the key:
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
"OFB", "Raw", "Hex"
"OFB", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -163,7 +169,8 @@ The following algorithms will be used based on the size of the key:
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
"CTR", "Raw", "Hex"
"CTR", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -178,7 +185,8 @@ The following algorithms will be used based on the size of the key:
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": ""},
"ECB", "Raw", "Hex"
"ECB", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -195,7 +203,8 @@ Tag: 16a3e732a605cc9ca29108f742ca0743`,
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": ""},
"GCM", "Raw", "Hex", ""
"GCM", "Raw", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -212,7 +221,8 @@ Tag: 3b5378917f67b0aade9891fc6c291646`,
"args": [
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "ffeeddccbbaa99887766554433221100"},
"GCM", "Raw", "Hex", "additional data"
"GCM", "Raw", "Hex",
{"option": "UTF8", "string": "additional data"}
]
}
],
@@ -227,7 +237,8 @@ Tag: 3b5378917f67b0aade9891fc6c291646`,
"args": [
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CBC", "Hex", "Hex"
"CBC", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -242,7 +253,8 @@ Tag: 3b5378917f67b0aade9891fc6c291646`,
"args": [
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CFB", "Hex", "Hex"
"CFB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -257,7 +269,8 @@ Tag: 3b5378917f67b0aade9891fc6c291646`,
"args": [
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"OFB", "Hex", "Hex"
"OFB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -272,7 +285,8 @@ Tag: 3b5378917f67b0aade9891fc6c291646`,
"args": [
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CTR", "Hex", "Hex"
"CTR", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -289,7 +303,8 @@ Tag: 70fad2ca19412c20f40fd06918736e56`,
"args": [
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex", ""
"GCM", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -306,7 +321,8 @@ Tag: 61cc4b70809452b0b3e38f913fa0a109`,
"args": [
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex", "additional data"
"GCM", "Hex", "Hex",
{"option": "UTF8", "string": "additional data"}
]
}
],
@@ -321,7 +337,8 @@ Tag: 61cc4b70809452b0b3e38f913fa0a109`,
"args": [
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"ECB", "Hex", "Hex"
"ECB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -336,7 +353,8 @@ Tag: 61cc4b70809452b0b3e38f913fa0a109`,
"args": [
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CBC", "Hex", "Hex"
"CBC", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -351,7 +369,8 @@ Tag: 61cc4b70809452b0b3e38f913fa0a109`,
"args": [
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CFB", "Hex", "Hex"
"CFB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -366,7 +385,8 @@ Tag: 61cc4b70809452b0b3e38f913fa0a109`,
"args": [
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"OFB", "Hex", "Hex"
"OFB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -381,7 +401,8 @@ Tag: 61cc4b70809452b0b3e38f913fa0a109`,
"args": [
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CTR", "Hex", "Hex"
"CTR", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -398,7 +419,8 @@ Tag: 86db597d5302595223cadbd990f1309b`,
"args": [
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex", ""
"GCM", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -415,7 +437,8 @@ Tag: aeedf3e6ca4201577c0cf3e9ce58159d`,
"args": [
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex", "additional data"
"GCM", "Hex", "Hex",
{"option": "UTF8", "string": "additional data"}
]
}
],
@@ -430,7 +453,8 @@ Tag: aeedf3e6ca4201577c0cf3e9ce58159d`,
"args": [
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"ECB", "Hex", "Hex"
"ECB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -445,7 +469,8 @@ Tag: aeedf3e6ca4201577c0cf3e9ce58159d`,
"args": [
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CBC", "Hex", "Hex"
"CBC", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -460,7 +485,8 @@ Tag: aeedf3e6ca4201577c0cf3e9ce58159d`,
"args": [
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CFB", "Hex", "Hex"
"CFB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -475,7 +501,8 @@ Tag: aeedf3e6ca4201577c0cf3e9ce58159d`,
"args": [
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"OFB", "Hex", "Hex"
"OFB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -490,7 +517,8 @@ Tag: aeedf3e6ca4201577c0cf3e9ce58159d`,
"args": [
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CTR", "Hex", "Hex"
"CTR", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -507,7 +535,8 @@ Tag: 821b1e5f32dad052e502775a523d957a`,
"args": [
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex", ""
"GCM", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -524,7 +553,8 @@ Tag: a8f04c4d93bbef82bef61a103371aef9`,
"args": [
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex", "additional data"
"GCM", "Hex", "Hex",
{"option": "UTF8", "string": "additional data"}
]
}
],
@@ -539,7 +569,8 @@ Tag: a8f04c4d93bbef82bef61a103371aef9`,
"args": [
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"ECB", "Hex", "Hex"
"ECB", "Hex", "Hex",
{"option": "Hex", "string": ""}
]
}
],
@@ -748,6 +779,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""},
"CBC", "Hex", "Raw",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -764,6 +796,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00000000000000000000000000000000"},
"CBC", "Hex", "Raw",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -780,6 +813,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00000000000000000000000000000000"},
"CTR", "Hex", "Raw",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -796,6 +830,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
"CBC", "Hex", "Raw",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -812,6 +847,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
"CFB", "Hex", "Raw",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -828,6 +864,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
"OFB", "Hex", "Raw",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -844,6 +881,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
"CTR", "Hex", "Raw",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -860,6 +898,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "00112233445566778899aabbccddeeff"},
{"option": "Hex", "string": ""},
"ECB", "Hex", "Raw",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -877,7 +916,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": ""},
"GCM", "Hex", "Raw",
{"option": "Hex", "string": "16a3e732a605cc9ca29108f742ca0743"},
""
{"option": "Hex", "string": ""}
]
}
],
@@ -894,7 +933,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "ffeeddccbbaa99887766554433221100"},
"GCM", "Hex", "Raw",
{"option": "Hex", "string": "3b5378917f67b0aade9891fc6c291646"},
"additional data"
{"option": "UTF8", "string": "additional data"}
]
}
],
@@ -910,6 +949,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CBC", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -926,6 +966,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CFB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -942,6 +983,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"OFB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -958,6 +1000,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CTR", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -975,7 +1018,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex",
{"option": "Hex", "string": "70fad2ca19412c20f40fd06918736e56"},
""
{"option": "Hex", "string": ""}
]
}
],
@@ -992,7 +1035,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex",
{"option": "Hex", "string": "61cc4b70809452b0b3e38f913fa0a109"},
"additional data"
{"option": "UTF8", "string": "additional data"}
]
}
],
@@ -1008,6 +1051,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "51e201d463698ef5f717f71f5b4712af"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"ECB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1024,6 +1068,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CBC", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1040,6 +1085,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CFB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1056,6 +1102,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"OFB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1072,6 +1119,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CTR", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1089,7 +1137,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex",
{"option": "Hex", "string": "86db597d5302595223cadbd990f1309b"},
""
{"option": "Hex", "string": ""}
]
}
],
@@ -1106,7 +1154,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex",
{"option": "Hex", "string": "aeedf3e6ca4201577c0cf3e9ce58159d"},
"additional data"
{"option": "UTF8", "string": "additional data"}
]
}
],
@@ -1122,6 +1170,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "6801ed503c9d96ee5f9d78b07ab1b295dba3c2adf81c7816"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"ECB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1138,6 +1187,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CBC", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1154,6 +1204,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CFB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1170,6 +1221,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"OFB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1186,6 +1238,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"CTR", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}
@@ -1203,7 +1256,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex",
{"option": "Hex", "string": "821b1e5f32dad052e502775a523d957a"},
""
{"option": "Hex", "string": ""}
]
}
],
@@ -1220,7 +1273,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"GCM", "Hex", "Hex",
{"option": "Hex", "string": "a8f04c4d93bbef82bef61a103371aef9"},
"additional data"
{"option": "UTF8", "string": "additional data"}
]
}
],
@@ -1236,6 +1289,7 @@ The following algorithms will be used based on the size of the key:
{"option": "Hex", "string": "2d767f6e9333d1c77581946e160b2b7368c2cdd5e2b80f04ca09d64e02afbfe1"},
{"option": "Hex", "string": "1748e7179bd56570d51fa4ba287cc3e5"},
"ECB", "Hex", "Hex",
{"option": "Hex", "string": ""},
{"option": "Hex", "string": ""}
]
}

View File

@@ -64,7 +64,10 @@ TestRegister.addTests([
"option": "Hex",
"string": ""
},
""
{
"option": "Hex",
"string": ""
}
]
}
]