cyberchef 11.0.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +144 -0
- package/Dockerfile +2 -2
- package/Gruntfile.js +10 -5
- package/README.md +3 -1
- package/SECURITY.md +8 -18
- package/package.json +35 -34
- package/src/core/config/Categories.json +6 -0
- package/src/core/config/OperationConfig.json +140 -16
- package/src/core/config/modules/Default.mjs +8 -0
- package/src/core/config/modules/PGP.mjs +2 -0
- package/src/core/config/scripts/generateOpsIndex.mjs +63 -0
- package/src/core/config/scripts/newOperation.mjs +31 -4
- package/src/core/operations/AESDecrypt.mjs +61 -16
- package/src/core/operations/AESEncrypt.mjs +26 -11
- package/src/core/operations/BLAKE3.mjs +13 -7
- package/src/core/operations/BSONDeserialise.mjs +2 -2
- package/src/core/operations/BSONSerialise.mjs +3 -2
- package/src/core/operations/Bcrypt.mjs +1 -1
- package/src/core/operations/BcryptCompare.mjs +1 -1
- package/src/core/operations/DecodeText.mjs +4 -0
- package/src/core/operations/EncodeText.mjs +4 -0
- package/src/core/operations/EscapeSmartCharacters.mjs +129 -0
- package/src/core/operations/GenerateLoremIpsum.mjs +34 -3
- package/src/core/operations/GeneratePGPKeyPair.mjs +8 -7
- package/src/core/operations/PGPSign.mjs +83 -0
- package/src/core/operations/ParseEthernetFrame.mjs +1 -1
- package/src/core/operations/ParseIPv4Header.mjs +1 -1
- package/src/core/operations/ParseObjectIDTimestamp.mjs +2 -2
- package/src/core/operations/ParseUserAgent.mjs +1 -1
- package/src/core/operations/ROR13.mjs +83 -0
- package/src/core/operations/RemoveANSIEscapeCodes.mjs +41 -0
- package/src/core/operations/SeriesChart.mjs +16 -0
- package/src/core/operations/Wrap.mjs +47 -0
- package/src/core/operations/index.mjs +10 -0
- package/src/node/index.mjs +25 -0
- package/src/web/App.mjs +19 -1
- package/src/web/HTMLIngredient.mjs +1 -0
- package/src/web/html/index.html +3 -3
- package/src/web/static/sitemap.mjs +3 -3
- package/src/web/waiters/RecipeWaiter.mjs +9 -1
- package/tests/browser/02_ops.js +7 -7
- package/tests/browser/03_recipe_load.js +48 -0
- package/tests/browser/browserUtils.js +6 -3
- package/tests/node/index.mjs +1 -0
- package/tests/node/tests/PGP.mjs +69 -0
- package/tests/node/tests/operations.mjs +41 -2
- package/tests/operations/index.mjs +71 -66
- package/tests/operations/tests/BLAKE3.mjs +18 -0
- package/tests/operations/tests/CharEnc.mjs +26 -0
- package/tests/operations/tests/Charts.mjs +11 -0
- package/tests/operations/tests/Crypt.mjs +288 -62
- package/tests/operations/tests/EscapeSmartCharacters.mjs +132 -0
- package/tests/operations/tests/FlaskSession.mjs +11 -8
- package/tests/operations/tests/GenerateLoremIpsum.mjs +80 -0
- package/tests/operations/tests/IPv6Transition.mjs +4 -4
- package/tests/operations/tests/PGP.mjs +178 -154
- package/tests/operations/tests/ParseEthernetFrame.mjs +11 -0
- package/tests/operations/tests/ParseIPv4Header.mjs +23 -0
- package/tests/operations/tests/ParseX509CRL.mjs +16 -16
- package/tests/operations/tests/ROR13.mjs +45 -0
- package/tests/operations/tests/Register.mjs +3 -1
- package/tests/operations/tests/RemoveANSIEscapeCodes.mjs +62 -0
- package/tests/operations/tests/Wrap.mjs +44 -0
|
@@ -79,7 +79,46 @@ TestRegister.addApiTests([
|
|
|
79
79
|
string: "some iv some iv1",
|
|
80
80
|
option: "utf8",
|
|
81
81
|
},
|
|
82
|
+
ivLength: 16,
|
|
82
83
|
mode: "OFB",
|
|
84
|
+
inputType: "Hex",
|
|
85
|
+
outputType: "Raw",
|
|
86
|
+
gcmTag: {
|
|
87
|
+
option: "Hex",
|
|
88
|
+
string: ""
|
|
89
|
+
},
|
|
90
|
+
aad: {
|
|
91
|
+
option: "Hex",
|
|
92
|
+
string: ""
|
|
93
|
+
},
|
|
94
|
+
ivFromInput: "Off"
|
|
95
|
+
});
|
|
96
|
+
assert.equal(result.toString(), "a slightly longer sampleinput?");
|
|
97
|
+
}),
|
|
98
|
+
|
|
99
|
+
it("AES decrypt: IV from input", () => {
|
|
100
|
+
const result = AESDecrypt("4a123af235a507bbc9d5871721d61b98504d569a9a5a7847e2d78315fec7736f6d6520697620736f6d6520697631", {
|
|
101
|
+
key: {
|
|
102
|
+
string: "some longer key1",
|
|
103
|
+
option: "utf8",
|
|
104
|
+
},
|
|
105
|
+
iv: {
|
|
106
|
+
string: "",
|
|
107
|
+
option: "Hex",
|
|
108
|
+
},
|
|
109
|
+
ivLength: 16,
|
|
110
|
+
mode: "OFB",
|
|
111
|
+
inputType: "Hex",
|
|
112
|
+
outputType: "Raw",
|
|
113
|
+
gcmTag: {
|
|
114
|
+
option: "Hex",
|
|
115
|
+
string: ""
|
|
116
|
+
},
|
|
117
|
+
aad: {
|
|
118
|
+
option: "Hex",
|
|
119
|
+
string: ""
|
|
120
|
+
},
|
|
121
|
+
ivFromInput: "From end"
|
|
83
122
|
});
|
|
84
123
|
assert.equal(result.toString(), "a slightly longer sampleinput?");
|
|
85
124
|
}),
|
|
@@ -136,8 +175,8 @@ Tiger-128`;
|
|
|
136
175
|
it("Bcrypt", async () => {
|
|
137
176
|
const result = await chef.bcrypt("Put a Sock In It");
|
|
138
177
|
const strResult = result.toString();
|
|
139
|
-
assert.
|
|
140
|
-
assert.equal(strResult.
|
|
178
|
+
assert.match(strResult, /^\$2b\$10\$[./A-Za-z0-9]{53}$/);
|
|
179
|
+
assert.equal(strResult.split("$").length, 4);
|
|
141
180
|
}),
|
|
142
181
|
|
|
143
182
|
it("bcryptCompare", async() => {
|
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
/* eslint no-console: 0 */
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
* THIS FILE IS AUTOMATICALLY GENERATED BY src/core/config/scripts/generateOpsIndex.mjs
|
|
3
|
+
*
|
|
4
|
+
* @author john [john19696@protonmail.com]
|
|
5
|
+
* @author tlwr [toby@toby.codes]
|
|
6
|
+
* @author n1474335 [n1474335@gmail.com]
|
|
7
|
+
* @copyright Crown Copyright 2026
|
|
8
|
+
* @license Apache-2.0
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
setLongTestFailure,
|
|
13
|
+
logTestReport,
|
|
14
|
+
} from "../lib/utils.mjs";
|
|
13
15
|
|
|
14
16
|
import "../lib/wasmFetchPolyfill.mjs";
|
|
15
|
-
import { setLongTestFailure, logTestReport } from "../lib/utils.mjs";
|
|
16
17
|
|
|
17
18
|
import TestRegister from "../lib/TestRegister.mjs";
|
|
18
19
|
import "./tests/A1Z26CipherDecode.mjs";
|
|
19
20
|
import "./tests/AESKeyWrap.mjs";
|
|
20
|
-
import "./tests/AnalyseUUID.mjs";
|
|
21
21
|
import "./tests/AlternatingCaps.mjs";
|
|
22
|
+
import "./tests/AnalyseUUID.mjs";
|
|
22
23
|
import "./tests/AvroToJSON.mjs";
|
|
24
|
+
import "./tests/BCD.mjs";
|
|
25
|
+
import "./tests/BLAKE2b.mjs";
|
|
26
|
+
import "./tests/BLAKE2s.mjs";
|
|
27
|
+
import "./tests/BLAKE3.mjs";
|
|
28
|
+
import "./tests/BSON.mjs";
|
|
23
29
|
import "./tests/BaconCipher.mjs";
|
|
24
30
|
import "./tests/Base32.mjs";
|
|
25
31
|
import "./tests/Base45.mjs";
|
|
@@ -28,29 +34,26 @@ import "./tests/Base62.mjs";
|
|
|
28
34
|
import "./tests/Base64.mjs";
|
|
29
35
|
import "./tests/Base85.mjs";
|
|
30
36
|
import "./tests/Base92.mjs";
|
|
31
|
-
import "./tests/BCD.mjs";
|
|
32
37
|
import "./tests/Bech32.mjs";
|
|
33
38
|
import "./tests/BitwiseOp.mjs";
|
|
34
|
-
import "./tests/BLAKE2b.mjs";
|
|
35
|
-
import "./tests/BLAKE2s.mjs";
|
|
36
|
-
import "./tests/BLAKE3.mjs";
|
|
37
39
|
import "./tests/Bombe.mjs";
|
|
38
|
-
import "./tests/BSON.mjs";
|
|
39
40
|
import "./tests/ByteRepr.mjs";
|
|
41
|
+
import "./tests/CBORDecode.mjs";
|
|
42
|
+
import "./tests/CBOREncode.mjs";
|
|
43
|
+
import "./tests/CMAC.mjs";
|
|
44
|
+
import "./tests/CRCChecksum.mjs";
|
|
45
|
+
import "./tests/CSV.mjs";
|
|
40
46
|
import "./tests/CaesarBoxCipher.mjs";
|
|
41
47
|
import "./tests/CaretMdecode.mjs";
|
|
42
48
|
import "./tests/CartesianProduct.mjs";
|
|
43
|
-
import "./tests/CBORDecode.mjs";
|
|
44
|
-
import "./tests/CBOREncode.mjs";
|
|
45
49
|
import "./tests/CetaceanCipherDecode.mjs";
|
|
46
50
|
import "./tests/CetaceanCipherEncode.mjs";
|
|
47
51
|
import "./tests/ChaCha.mjs";
|
|
48
52
|
import "./tests/ChangeIPFormat.mjs";
|
|
49
53
|
import "./tests/CharEnc.mjs";
|
|
50
54
|
import "./tests/Charts.mjs";
|
|
51
|
-
import "./tests/Ciphers.mjs";
|
|
52
55
|
import "./tests/CipherSaber2.mjs";
|
|
53
|
-
import "./tests/
|
|
56
|
+
import "./tests/Ciphers.mjs";
|
|
54
57
|
import "./tests/Code.mjs";
|
|
55
58
|
import "./tests/Colossus.mjs";
|
|
56
59
|
import "./tests/Comment.mjs";
|
|
@@ -59,9 +62,7 @@ import "./tests/ConditionalJump.mjs";
|
|
|
59
62
|
import "./tests/ConvertCoordinateFormat.mjs";
|
|
60
63
|
import "./tests/ConvertLeetSpeak.mjs";
|
|
61
64
|
import "./tests/ConvertToNATOAlphabet.mjs";
|
|
62
|
-
import "./tests/CRCChecksum.mjs";
|
|
63
65
|
import "./tests/Crypt.mjs";
|
|
64
|
-
import "./tests/CSV.mjs";
|
|
65
66
|
import "./tests/DateTime.mjs";
|
|
66
67
|
import "./tests/DefangIP.mjs";
|
|
67
68
|
import "./tests/DisassembleARM.mjs";
|
|
@@ -69,64 +70,77 @@ import "./tests/DropNthBytes.mjs";
|
|
|
69
70
|
import "./tests/ECDSA.mjs";
|
|
70
71
|
import "./tests/ELFInfo.mjs";
|
|
71
72
|
import "./tests/Enigma.mjs";
|
|
73
|
+
import "./tests/EscapeSmartCharacters.mjs";
|
|
72
74
|
import "./tests/ExtractAudioMetadata.mjs";
|
|
73
75
|
import "./tests/ExtractEmailAddresses.mjs";
|
|
74
76
|
import "./tests/ExtractHashes.mjs";
|
|
75
77
|
import "./tests/ExtractIPAddresses.mjs";
|
|
76
78
|
import "./tests/Fernet.mjs";
|
|
77
|
-
import "./tests/Float.mjs";
|
|
78
79
|
import "./tests/FileTree.mjs";
|
|
80
|
+
import "./tests/FlaskSession.mjs";
|
|
79
81
|
import "./tests/FletcherChecksum.mjs";
|
|
82
|
+
import "./tests/Float.mjs";
|
|
80
83
|
import "./tests/Fork.mjs";
|
|
81
84
|
import "./tests/FromDecimal.mjs";
|
|
85
|
+
import "./tests/GOST.mjs";
|
|
82
86
|
import "./tests/GenerateAllChecksums.mjs";
|
|
83
87
|
import "./tests/GenerateAllHashes.mjs";
|
|
84
88
|
import "./tests/GenerateDeBruijnSequence.mjs";
|
|
89
|
+
import "./tests/GenerateLoremIpsum.mjs";
|
|
85
90
|
import "./tests/GenerateQRCode.mjs";
|
|
86
91
|
import "./tests/GetAllCasings.mjs";
|
|
87
|
-
import "./tests/GOST.mjs";
|
|
88
92
|
import "./tests/Gunzip.mjs";
|
|
89
93
|
import "./tests/Gzip.mjs";
|
|
90
|
-
import "./tests/Hash.mjs";
|
|
91
94
|
import "./tests/HASSH.mjs";
|
|
95
|
+
import "./tests/HKDF.mjs";
|
|
96
|
+
import "./tests/Hash.mjs";
|
|
92
97
|
import "./tests/HaversineDistance.mjs";
|
|
93
98
|
import "./tests/Hex.mjs";
|
|
94
99
|
import "./tests/Hexdump.mjs";
|
|
95
|
-
import "./tests/
|
|
100
|
+
import "./tests/IPv6Transition.mjs";
|
|
96
101
|
import "./tests/Image.mjs";
|
|
97
102
|
import "./tests/IndexOfCoincidence.mjs";
|
|
98
103
|
import "./tests/JA3Fingerprint.mjs";
|
|
99
|
-
import "./tests/JA4.mjs";
|
|
100
104
|
import "./tests/JA3SFingerprint.mjs";
|
|
101
|
-
import "./tests/
|
|
105
|
+
import "./tests/JA4.mjs";
|
|
102
106
|
import "./tests/JSONBeautify.mjs";
|
|
103
107
|
import "./tests/JSONMinify.mjs";
|
|
104
108
|
import "./tests/JSONtoCSV.mjs";
|
|
105
|
-
import "./tests/
|
|
109
|
+
import "./tests/JSONtoYAML.mjs";
|
|
106
110
|
import "./tests/JWK.mjs";
|
|
107
111
|
import "./tests/JWTDecode.mjs";
|
|
108
112
|
import "./tests/JWTSign.mjs";
|
|
109
113
|
import "./tests/JWTVerify.mjs";
|
|
110
|
-
import "./tests/
|
|
111
|
-
import "./tests/
|
|
114
|
+
import "./tests/Jq.mjs";
|
|
115
|
+
import "./tests/Jsonata.mjs";
|
|
116
|
+
import "./tests/Jump.mjs";
|
|
112
117
|
import "./tests/LS47.mjs";
|
|
113
|
-
import "./tests/LuhnChecksum.mjs";
|
|
114
118
|
import "./tests/LZNT1Decompress.mjs";
|
|
115
119
|
import "./tests/LZString.mjs";
|
|
120
|
+
import "./tests/LevenshteinDistance.mjs";
|
|
121
|
+
import "./tests/Lorenz.mjs";
|
|
122
|
+
import "./tests/LuhnChecksum.mjs";
|
|
123
|
+
import "./tests/MIMEDecoding.mjs";
|
|
124
|
+
import "./tests/MS.mjs";
|
|
116
125
|
import "./tests/Magic.mjs";
|
|
117
126
|
import "./tests/Media.mjs";
|
|
118
|
-
import "./tests/MIMEDecoding.mjs";
|
|
119
127
|
import "./tests/Modhex.mjs";
|
|
120
128
|
import "./tests/MorseCode.mjs";
|
|
121
|
-
import "./tests/MS.mjs";
|
|
122
129
|
import "./tests/MultipleBombe.mjs";
|
|
123
130
|
import "./tests/MurmurHash3.mjs";
|
|
131
|
+
import "./tests/NTLM.mjs";
|
|
124
132
|
import "./tests/NetBIOS.mjs";
|
|
125
133
|
import "./tests/NormaliseUnicode.mjs";
|
|
126
|
-
import "./tests/NTLM.mjs";
|
|
127
134
|
import "./tests/OTP.mjs";
|
|
135
|
+
import "./tests/PEMtoHex.mjs";
|
|
136
|
+
import "./tests/PGP.mjs";
|
|
137
|
+
import "./tests/PHP.mjs";
|
|
138
|
+
import "./tests/PHPSerialize.mjs";
|
|
139
|
+
import "./tests/ParityBit.mjs";
|
|
140
|
+
import "./tests/ParseCSR.mjs";
|
|
128
141
|
import "./tests/ParseEthernetFrame.mjs";
|
|
129
142
|
import "./tests/ParseIPRange.mjs";
|
|
143
|
+
import "./tests/ParseIPv4Header.mjs";
|
|
130
144
|
import "./tests/ParseObjectIDTimestamp.mjs";
|
|
131
145
|
import "./tests/ParseQRCode.mjs";
|
|
132
146
|
import "./tests/ParseSSHHostKey.mjs";
|
|
@@ -134,37 +148,35 @@ import "./tests/ParseTCP.mjs";
|
|
|
134
148
|
import "./tests/ParseTLSRecord.mjs";
|
|
135
149
|
import "./tests/ParseTLV.mjs";
|
|
136
150
|
import "./tests/ParseUDP.mjs";
|
|
137
|
-
import "./tests/
|
|
138
|
-
import "./tests/PGP.mjs";
|
|
139
|
-
import "./tests/PHP.mjs";
|
|
140
|
-
import "./tests/ParityBit.mjs";
|
|
141
|
-
import "./tests/PHPSerialize.mjs";
|
|
151
|
+
import "./tests/ParseX509CRL.mjs";
|
|
142
152
|
import "./tests/PowerSet.mjs";
|
|
143
153
|
import "./tests/Protobuf.mjs";
|
|
144
154
|
import "./tests/PubKeyFromCert.mjs";
|
|
145
155
|
import "./tests/PubKeyFromPrivKey.mjs";
|
|
146
|
-
import "./tests/Rabbit.mjs";
|
|
147
156
|
import "./tests/RAKE.mjs";
|
|
157
|
+
import "./tests/RC6.mjs";
|
|
158
|
+
import "./tests/ROR13.mjs";
|
|
159
|
+
import "./tests/RSA.mjs";
|
|
160
|
+
import "./tests/Rabbit.mjs";
|
|
148
161
|
import "./tests/Regex.mjs";
|
|
149
162
|
import "./tests/Register.mjs";
|
|
150
163
|
import "./tests/RegularExpression.mjs";
|
|
164
|
+
import "./tests/RemoveANSIEscapeCodes.mjs";
|
|
151
165
|
import "./tests/RenderMarkdown.mjs";
|
|
152
166
|
import "./tests/RisonEncodeDecode.mjs";
|
|
153
167
|
import "./tests/Rotate.mjs";
|
|
154
|
-
import "./tests/
|
|
168
|
+
import "./tests/SIGABA.mjs";
|
|
169
|
+
import "./tests/SM2.mjs";
|
|
170
|
+
import "./tests/SM4.mjs";
|
|
171
|
+
import "./tests/SQLBeautify.mjs";
|
|
155
172
|
import "./tests/Salsa20.mjs";
|
|
156
|
-
import "./tests/XSalsa20.mjs";
|
|
157
173
|
import "./tests/SeqUtils.mjs";
|
|
158
174
|
import "./tests/SetDifference.mjs";
|
|
159
175
|
import "./tests/SetIntersection.mjs";
|
|
160
176
|
import "./tests/SetUnion.mjs";
|
|
161
177
|
import "./tests/Shuffle.mjs";
|
|
162
|
-
|
|
163
|
-
import "./tests/
|
|
164
|
-
import "./tests/SM4.mjs";
|
|
165
|
-
import "./tests/RC6.mjs";
|
|
166
|
-
// import "./tests/SplitColourChannels.mjs"; // Cannot test operations that use the File type yet
|
|
167
|
-
import "./tests/SQLBeautify.mjs";
|
|
178
|
+
// Cannot test operations that use the File type yet
|
|
179
|
+
// import "./tests/SplitColourChannels.mjs";
|
|
168
180
|
import "./tests/StrUtils.mjs";
|
|
169
181
|
import "./tests/StripIPv4Header.mjs";
|
|
170
182
|
import "./tests/StripTCPHeader.mjs";
|
|
@@ -179,35 +191,28 @@ import "./tests/TextIntegerConverter.mjs";
|
|
|
179
191
|
import "./tests/ToFromInsensitiveRegex.mjs";
|
|
180
192
|
import "./tests/TranslateDateTimeFormat.mjs";
|
|
181
193
|
import "./tests/Typex.mjs";
|
|
194
|
+
import "./tests/URLEncodeDecode.mjs";
|
|
182
195
|
import "./tests/UnescapeString.mjs";
|
|
183
196
|
import "./tests/Unicode.mjs";
|
|
184
|
-
import "./tests/
|
|
185
|
-
import "./tests/
|
|
186
|
-
import "./tests/
|
|
187
|
-
import "./tests/CBORDecode.mjs";
|
|
188
|
-
import "./tests/JA3Fingerprint.mjs";
|
|
189
|
-
import "./tests/JA3SFingerprint.mjs";
|
|
190
|
-
import "./tests/HASSH.mjs";
|
|
191
|
-
import "./tests/JSONtoYAML.mjs";
|
|
192
|
-
|
|
193
|
-
// Cannot test operations that use the File type yet
|
|
194
|
-
// import "./tests/SplitColourChannels.mjs";
|
|
195
|
-
import "./tests/YARA.mjs";
|
|
196
|
-
import "./tests/ParseCSR.mjs";
|
|
197
|
+
import "./tests/Wrap.mjs";
|
|
198
|
+
import "./tests/XORChecksum.mjs";
|
|
199
|
+
import "./tests/XSalsa20.mjs";
|
|
197
200
|
import "./tests/XXTEA.mjs";
|
|
201
|
+
import "./tests/YARA.mjs";
|
|
202
|
+
|
|
198
203
|
|
|
199
204
|
const testStatus = {
|
|
200
205
|
allTestsPassing: true,
|
|
201
206
|
counts: {
|
|
202
207
|
total: 0,
|
|
203
|
-
}
|
|
208
|
+
}
|
|
204
209
|
};
|
|
205
210
|
|
|
206
211
|
setLongTestFailure();
|
|
207
212
|
|
|
208
213
|
const logOpsTestReport = logTestReport.bind(null, testStatus);
|
|
209
214
|
|
|
210
|
-
(async function
|
|
215
|
+
(async function() {
|
|
211
216
|
const results = await TestRegister.runTests();
|
|
212
217
|
logOpsTestReport(results);
|
|
213
218
|
})();
|
|
@@ -51,5 +51,23 @@ TestRegister.addTests([
|
|
|
51
51
|
{ "op": "BLAKE3",
|
|
52
52
|
"args": [8, "ThiskeyisexactlythirtytwoByteslo"] }
|
|
53
53
|
]
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
name: "BLAKE3: 16390 - test",
|
|
57
|
+
input: "test",
|
|
58
|
+
expectedMatch: /4878.{32760}555fe06b242738d5/,
|
|
59
|
+
recipeConfig: [
|
|
60
|
+
{ "op": "BLAKE3",
|
|
61
|
+
"args": [16390, ""] }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "BLAKE3: 16390 - key test",
|
|
66
|
+
input: "test",
|
|
67
|
+
expectedMatch: /a8d0.{32760}19ccd9b9726b46ae/,
|
|
68
|
+
recipeConfig: [
|
|
69
|
+
{ "op": "BLAKE3",
|
|
70
|
+
"args": [16390, "ThiskeyisexactlythirtytwoBytesLo"] }
|
|
71
|
+
]
|
|
54
72
|
}
|
|
55
73
|
]);
|
|
@@ -68,6 +68,32 @@ TestRegister.addTests([
|
|
|
68
68
|
},
|
|
69
69
|
],
|
|
70
70
|
},
|
|
71
|
+
{
|
|
72
|
+
name: "Encode text: empty encoding",
|
|
73
|
+
input: "hello",
|
|
74
|
+
expectedOutput: "Invalid encoding",
|
|
75
|
+
recipeConfig: [
|
|
76
|
+
{
|
|
77
|
+
"op": "Encode text",
|
|
78
|
+
"args": [""]
|
|
79
|
+
},
|
|
80
|
+
],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: "Decode text: empty encoding",
|
|
84
|
+
input: "68 65 6c 6c 6f",
|
|
85
|
+
expectedOutput: "Invalid encoding",
|
|
86
|
+
recipeConfig: [
|
|
87
|
+
{
|
|
88
|
+
"op": "From Hex",
|
|
89
|
+
"args": ["Space"]
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"op": "Decode text",
|
|
93
|
+
"args": [""]
|
|
94
|
+
},
|
|
95
|
+
],
|
|
96
|
+
},
|
|
71
97
|
{
|
|
72
98
|
name: "Generate Base64 Windows PowerShell",
|
|
73
99
|
input: "ZABpAHIAIAAiAGMAOgBcAHAAcgBvAGcAcgBhAG0AIABmAGkAbABlAHMAIgAgAA==",
|
|
@@ -41,6 +41,17 @@ TestRegister.addTests([
|
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
name: "Series chart escapes x-axis values in serialized SVG",
|
|
46
|
+
input: `s,x"><script>globalThis.seriesChartInjected=1</script><g a=",1`,
|
|
47
|
+
unexpectedMatch: /<script>|__data__=/,
|
|
48
|
+
recipeConfig: [
|
|
49
|
+
{
|
|
50
|
+
"op": "Series chart",
|
|
51
|
+
"args": ["Line feed", "Comma", "", 1, "red"]
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
},
|
|
44
55
|
{
|
|
45
56
|
name: "Heatmap chart",
|
|
46
57
|
input: "100 100\n200 200\n300 300\n400 400\n500 500",
|