cyberchef 10.22.1 → 10.24.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 +182 -0
- package/CONTRIBUTING.md +40 -0
- package/Dockerfile +2 -0
- package/Gruntfile.js +2 -28
- package/README.md +1 -1
- package/babel.config.js +0 -6
- package/package.json +64 -63
- package/src/core/Chef.mjs +8 -1
- package/src/core/Ingredient.mjs +5 -2
- package/src/core/Operation.mjs +6 -1
- package/src/core/Recipe.mjs +10 -5
- package/src/core/config/Categories.json +20 -4
- package/src/core/config/OperationConfig.json +550 -26
- package/src/core/config/modules/Ciphers.mjs +6 -0
- package/src/core/config/modules/Crypto.mjs +6 -0
- package/src/core/config/modules/Default.mjs +8 -0
- package/src/core/config/modules/Shellcode.mjs +2 -0
- package/src/core/config/scripts/fixCryptoApiImports.mjs +54 -0
- package/src/core/config/scripts/fixSnackBarMarkup.mjs +28 -0
- package/src/core/lib/AudioBytes.mjs +103 -0
- package/src/core/lib/AudioMetaSchema.mjs +82 -0
- package/src/core/lib/AudioParsers.mjs +630 -0
- package/src/core/lib/BigIntUtils.mjs +73 -0
- package/src/core/lib/Extract.mjs +5 -0
- package/src/core/lib/Modhex.mjs +2 -0
- package/src/core/lib/ParityBit.mjs +50 -0
- package/src/core/lib/QRCode.mjs +30 -10
- package/src/core/lib/RC6.mjs +625 -0
- package/src/core/operations/A1Z26CipherDecode.mjs +1 -1
- package/src/core/operations/AddTextToImage.mjs +116 -64
- package/src/core/operations/AnalyseUUID.mjs +109 -6
- package/src/core/operations/BlurImage.mjs +10 -12
- package/src/core/operations/ContainImage.mjs +50 -40
- package/src/core/operations/ConvertImageFormat.mjs +33 -39
- package/src/core/operations/CoverImage.mjs +39 -37
- package/src/core/operations/CropImage.mjs +35 -21
- package/src/core/operations/DisassembleARM.mjs +193 -0
- package/src/core/operations/DitherImage.mjs +8 -8
- package/src/core/operations/EscapeUnicodeCharacters.mjs +0 -17
- package/src/core/operations/ExtractAudioMetadata.mjs +175 -0
- package/src/core/operations/ExtractEmailAddresses.mjs +2 -3
- package/src/core/operations/ExtractLSB.mjs +17 -11
- package/src/core/operations/ExtractRGBA.mjs +12 -10
- package/src/core/operations/FlaskSessionDecode.mjs +80 -0
- package/src/core/operations/FlaskSessionSign.mjs +89 -0
- package/src/core/operations/FlaskSessionVerify.mjs +136 -0
- package/src/core/operations/FlipImage.mjs +14 -10
- package/src/core/operations/GenerateImage.mjs +39 -32
- package/src/core/operations/ImageBrightnessContrast.mjs +10 -10
- package/src/core/operations/ImageFilter.mjs +14 -13
- package/src/core/operations/ImageHueSaturationLightness.mjs +22 -20
- package/src/core/operations/ImageOpacity.mjs +6 -8
- package/src/core/operations/InvertImage.mjs +4 -6
- package/src/core/operations/Jq.mjs +12 -4
- package/src/core/operations/NormaliseImage.mjs +5 -7
- package/src/core/operations/OffsetChecker.mjs +1 -1
- package/src/core/operations/ParityBit.mjs +128 -0
- package/src/core/operations/ParseEthernetFrame.mjs +112 -0
- package/src/core/operations/ParseIPv4Header.mjs +23 -6
- package/src/core/operations/ParseQRCode.mjs +13 -13
- package/src/core/operations/PseudoRandomIntegerGenerator.mjs +164 -0
- package/src/core/operations/RC6Decrypt.mjs +119 -0
- package/src/core/operations/RC6Encrypt.mjs +119 -0
- package/src/core/operations/RandomizeColourPalette.mjs +11 -11
- package/src/core/operations/RegularExpression.mjs +2 -1
- package/src/core/operations/RenderMarkdown.mjs +35 -4
- package/src/core/operations/ResizeImage.mjs +30 -23
- package/src/core/operations/RotateImage.mjs +8 -9
- package/src/core/operations/SQLBeautify.mjs +21 -3
- package/src/core/operations/SharpenImage.mjs +94 -62
- package/src/core/operations/SplitColourChannels.mjs +47 -21
- package/src/core/operations/TextIntegerConverter.mjs +123 -0
- package/src/core/operations/UnescapeUnicodeCharacters.mjs +17 -0
- package/src/core/operations/ViewBitPlane.mjs +16 -20
- package/src/core/operations/index.mjs +22 -0
- package/src/node/index.mjs +55 -0
- package/src/web/HTMLIngredient.mjs +24 -43
- package/src/web/HTMLOperation.mjs +8 -2
- package/src/web/Manager.mjs +1 -0
- package/src/web/html/index.html +6 -6
- package/src/web/static/fonts/bmfonts/Roboto72White.fnt +491 -485
- package/src/web/static/fonts/bmfonts/RobotoBlack72White.fnt +494 -488
- package/src/web/static/fonts/bmfonts/RobotoMono72White.fnt +110 -103
- package/src/web/static/fonts/bmfonts/RobotoSlab72White.fnt +498 -492
- package/src/web/stylesheets/layout/_banner.css +30 -0
- package/src/web/stylesheets/layout/_modals.css +5 -0
- package/src/web/stylesheets/utils/_overrides.css +7 -0
- package/src/web/waiters/ControlsWaiter.mjs +82 -0
- package/src/web/waiters/InputWaiter.mjs +12 -6
- package/src/web/waiters/OperationsWaiter.mjs +30 -13
- package/src/web/waiters/RecipeWaiter.mjs +2 -2
- package/tests/browser/02_ops.js +23 -3
- package/tests/node/index.mjs +1 -0
- package/tests/node/tests/lib/BigIntUtils.mjs +150 -0
- package/tests/node/tests/operations.mjs +11 -10
- package/tests/operations/index.mjs +13 -0
- package/tests/operations/tests/A1Z26CipherDecode.mjs +33 -0
- package/tests/operations/tests/AnalyseUUID.mjs +66 -0
- package/tests/operations/tests/DisassembleARM.mjs +377 -0
- package/tests/operations/tests/ExtractAudioMetadata.mjs +287 -0
- package/tests/operations/tests/ExtractEmailAddresses.mjs +38 -12
- package/tests/operations/tests/Fernet.mjs +18 -3
- package/tests/operations/tests/FlaskSession.mjs +246 -0
- package/tests/operations/tests/GenerateQRCode.mjs +67 -0
- package/tests/operations/tests/JWTSign.mjs +83 -8
- package/tests/operations/tests/Jq.mjs +32 -0
- package/tests/operations/tests/Modhex.mjs +20 -0
- package/tests/operations/tests/ParityBit.mjs +147 -0
- package/tests/operations/tests/ParseEthernetFrame.mjs +45 -0
- package/tests/operations/tests/RC6.mjs +487 -0
- package/tests/operations/tests/RegularExpression.mjs +75 -0
- package/tests/operations/tests/RenderMarkdown.mjs +110 -0
- package/tests/operations/tests/SQLBeautify.mjs +54 -0
- package/tests/operations/tests/TextIntegerConverter.mjs +199 -0
- package/tests/samples/Audio.mjs +73 -0
- package/tests/samples/Images.mjs +0 -12
- package/webpack.config.js +10 -7
- package/src/core/lib/ImageManipulation.mjs +0 -251
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extract Audio Metadata operation tests.
|
|
3
|
+
*
|
|
4
|
+
* @author d0s1nt
|
|
5
|
+
* @copyright Crown Copyright 2025
|
|
6
|
+
* @license Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
import TestRegister from "../../lib/TestRegister.mjs";
|
|
9
|
+
import {
|
|
10
|
+
MP3_HEX, WAV_HEX, FLAC_HEX, AAC_HEX,
|
|
11
|
+
AC3_HEX, OGG_HEX, OPUS_HEX, WMA_HEX,
|
|
12
|
+
M4A_HEX, AIFF_HEX
|
|
13
|
+
} from "../../samples/Audio.mjs";
|
|
14
|
+
|
|
15
|
+
TestRegister.addTests([
|
|
16
|
+
// ---- MP3 ----
|
|
17
|
+
{
|
|
18
|
+
name: "Extract Audio Metadata: MP3 container and MIME",
|
|
19
|
+
input: MP3_HEX,
|
|
20
|
+
expectedMatch: /Container<\/td><td>mp3<\/td>.*MIME<\/td><td>audio\/mpeg<\/td>/s,
|
|
21
|
+
recipeConfig: [
|
|
22
|
+
{ op: "From Hex", args: ["None"] },
|
|
23
|
+
{ op: "Extract Audio Metadata", args: ["test.mp3", 524288] }
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "Extract Audio Metadata: MP3 common tags (title, artist)",
|
|
28
|
+
input: MP3_HEX,
|
|
29
|
+
expectedMatch: /Title<\/td><td>Galway<\/td>.*Artist<\/td><td>Kevin MacLeod<\/td>/s,
|
|
30
|
+
recipeConfig: [
|
|
31
|
+
{ op: "From Hex", args: ["None"] },
|
|
32
|
+
{ op: "Extract Audio Metadata", args: ["test.mp3", 524288] }
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
name: "Extract Audio Metadata: MP3 ID3v2 frames (TIT2, TPE1, TSSE)",
|
|
37
|
+
input: MP3_HEX,
|
|
38
|
+
expectedMatch: /ID3v2 Frames.*TIT2.*Galway.*TPE1.*Kevin MacLeod.*TSSE.*Lavf56\.40\.101/s,
|
|
39
|
+
recipeConfig: [
|
|
40
|
+
{ op: "From Hex", args: ["None"] },
|
|
41
|
+
{ op: "Extract Audio Metadata", args: ["test.mp3", 524288] }
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "Extract Audio Metadata: MP3 detections (id3v2)",
|
|
46
|
+
input: MP3_HEX,
|
|
47
|
+
expectedMatch: /Metadata systems<\/td><td>id3v2<\/td>/,
|
|
48
|
+
recipeConfig: [
|
|
49
|
+
{ op: "From Hex", args: ["None"] },
|
|
50
|
+
{ op: "Extract Audio Metadata", args: ["test.mp3", 524288] }
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
// ---- WAV ----
|
|
55
|
+
{
|
|
56
|
+
name: "Extract Audio Metadata: WAV container and MIME",
|
|
57
|
+
input: WAV_HEX,
|
|
58
|
+
expectedMatch: /Container<\/td><td>wav<\/td>.*MIME<\/td><td>audio\/wav<\/td>/s,
|
|
59
|
+
recipeConfig: [
|
|
60
|
+
{ op: "From Hex", args: ["None"] },
|
|
61
|
+
{ op: "Extract Audio Metadata", args: ["test.wav", 524288] }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "Extract Audio Metadata: WAV RIFF chunks (fmt)",
|
|
66
|
+
input: WAV_HEX,
|
|
67
|
+
expectedMatch: /RIFF Chunks.*fmt .*16 bytes @ offset 20/s,
|
|
68
|
+
recipeConfig: [
|
|
69
|
+
{ op: "From Hex", args: ["None"] },
|
|
70
|
+
{ op: "Extract Audio Metadata", args: ["test.wav", 524288] }
|
|
71
|
+
]
|
|
72
|
+
},
|
|
73
|
+
|
|
74
|
+
// ---- FLAC ----
|
|
75
|
+
{
|
|
76
|
+
name: "Extract Audio Metadata: FLAC container and common tags",
|
|
77
|
+
input: FLAC_HEX,
|
|
78
|
+
expectedMatch: /Container<\/td><td>flac<\/td>.*Title<\/td><td>Galway<\/td>.*Artist<\/td><td>Kevin MacLeod<\/td>/s,
|
|
79
|
+
recipeConfig: [
|
|
80
|
+
{ op: "From Hex", args: ["None"] },
|
|
81
|
+
{ op: "Extract Audio Metadata", args: ["test.flac", 524288] }
|
|
82
|
+
]
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "Extract Audio Metadata: FLAC metadata blocks (STREAMINFO, VORBIS_COMMENT)",
|
|
86
|
+
input: FLAC_HEX,
|
|
87
|
+
expectedMatch: /FLAC Metadata Blocks.*STREAMINFO<\/td><td>34 bytes<\/td>.*VORBIS_COMMENT<\/td><td>86 bytes<\/td>/s,
|
|
88
|
+
recipeConfig: [
|
|
89
|
+
{ op: "From Hex", args: ["None"] },
|
|
90
|
+
{ op: "Extract Audio Metadata", args: ["test.flac", 524288] }
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
name: "Extract Audio Metadata: FLAC Vorbis comments (vendor, tags)",
|
|
95
|
+
input: FLAC_HEX,
|
|
96
|
+
expectedMatch: /Vorbis Comments.*Vendor<\/td><td>Lavf56\.40\.101<\/td>.*TITLE<\/td><td>Galway<\/td>.*ARTIST<\/td><td>Kevin MacLeod<\/td>.*ENCODER<\/td><td>Lavf56\.40\.101<\/td>/s,
|
|
97
|
+
recipeConfig: [
|
|
98
|
+
{ op: "From Hex", args: ["None"] },
|
|
99
|
+
{ op: "Extract Audio Metadata", args: ["test.flac", 524288] }
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: "Extract Audio Metadata: FLAC detections",
|
|
104
|
+
input: FLAC_HEX,
|
|
105
|
+
expectedMatch: /Metadata systems<\/td><td>flac_metablocks, vorbis_comments<\/td>/,
|
|
106
|
+
recipeConfig: [
|
|
107
|
+
{ op: "From Hex", args: ["None"] },
|
|
108
|
+
{ op: "Extract Audio Metadata", args: ["test.flac", 524288] }
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
// ---- AAC ----
|
|
113
|
+
{
|
|
114
|
+
name: "Extract Audio Metadata: AAC container and MIME",
|
|
115
|
+
input: AAC_HEX,
|
|
116
|
+
expectedMatch: /Container<\/td><td>aac<\/td>.*MIME<\/td><td>audio\/aac<\/td>/s,
|
|
117
|
+
recipeConfig: [
|
|
118
|
+
{ op: "From Hex", args: ["None"] },
|
|
119
|
+
{ op: "Extract Audio Metadata", args: ["test.aac", 524288] }
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: "Extract Audio Metadata: AAC ADTS technical fields",
|
|
124
|
+
input: AAC_HEX,
|
|
125
|
+
expectedMatch: /AAC ADTS.*mpeg_version<\/td><td>MPEG-4<\/td>.*profile<\/td><td>LC<\/td>.*sample_rate<\/td><td>44100<\/td>.*channel_description<\/td><td>stereo<\/td>/s,
|
|
126
|
+
recipeConfig: [
|
|
127
|
+
{ op: "From Hex", args: ["None"] },
|
|
128
|
+
{ op: "Extract Audio Metadata", args: ["test.aac", 524288] }
|
|
129
|
+
]
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
// ---- AC3 ----
|
|
133
|
+
{
|
|
134
|
+
name: "Extract Audio Metadata: AC3 container and MIME",
|
|
135
|
+
input: AC3_HEX,
|
|
136
|
+
expectedMatch: /Container<\/td><td>ac3<\/td>.*MIME<\/td><td>audio\/ac3<\/td>/s,
|
|
137
|
+
recipeConfig: [
|
|
138
|
+
{ op: "From Hex", args: ["None"] },
|
|
139
|
+
{ op: "Extract Audio Metadata", args: ["test.ac3", 524288] }
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: "Extract Audio Metadata: AC3 technical fields (sample rate, bitrate, channels)",
|
|
144
|
+
input: AC3_HEX,
|
|
145
|
+
expectedMatch: /AC3 \(Dolby Digital\).*sample_rate<\/td><td>44100<\/td>.*bitrate_kbps<\/td><td>192<\/td>.*channel_layout<\/td><td>2\.0 \(L R\)<\/td>/s,
|
|
146
|
+
recipeConfig: [
|
|
147
|
+
{ op: "From Hex", args: ["None"] },
|
|
148
|
+
{ op: "Extract Audio Metadata", args: ["test.ac3", 524288] }
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
// ---- OGG Vorbis ----
|
|
153
|
+
{
|
|
154
|
+
name: "Extract Audio Metadata: OGG container and common tags",
|
|
155
|
+
input: OGG_HEX,
|
|
156
|
+
expectedMatch: /Container<\/td><td>ogg<\/td>.*Title<\/td><td>Galway<\/td>.*Artist<\/td><td>Kevin MacLeod<\/td>/s,
|
|
157
|
+
recipeConfig: [
|
|
158
|
+
{ op: "From Hex", args: ["None"] },
|
|
159
|
+
{ op: "Extract Audio Metadata", args: ["test.ogg", 524288] }
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: "Extract Audio Metadata: OGG Vorbis comments (vendor, encoder)",
|
|
164
|
+
input: OGG_HEX,
|
|
165
|
+
expectedMatch: /Vorbis Comments.*Vendor<\/td><td>Lavf56\.40\.101<\/td>.*ENCODER<\/td><td>Lavc56\.60\.100 libvorbis<\/td>/s,
|
|
166
|
+
recipeConfig: [
|
|
167
|
+
{ op: "From Hex", args: ["None"] },
|
|
168
|
+
{ op: "Extract Audio Metadata", args: ["test.ogg", 524288] }
|
|
169
|
+
]
|
|
170
|
+
},
|
|
171
|
+
|
|
172
|
+
// ---- Opus ----
|
|
173
|
+
{
|
|
174
|
+
name: "Extract Audio Metadata: Opus container and common tags",
|
|
175
|
+
input: OPUS_HEX,
|
|
176
|
+
expectedMatch: /Container<\/td><td>opus<\/td>.*Title<\/td><td>Galway<\/td>.*Artist<\/td><td>Kevin MacLeod<\/td>/s,
|
|
177
|
+
recipeConfig: [
|
|
178
|
+
{ op: "From Hex", args: ["None"] },
|
|
179
|
+
{ op: "Extract Audio Metadata", args: ["test.opus", 524288] }
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "Extract Audio Metadata: Opus Vorbis comments (vendor, encoder)",
|
|
184
|
+
input: OPUS_HEX,
|
|
185
|
+
expectedMatch: /Vorbis Comments.*Vendor<\/td><td>Lavf58\.19\.102<\/td>.*ENCODER<\/td><td>Lavc58\.34\.100 libopus<\/td>/s,
|
|
186
|
+
recipeConfig: [
|
|
187
|
+
{ op: "From Hex", args: ["None"] },
|
|
188
|
+
{ op: "Extract Audio Metadata", args: ["test.opus", 524288] }
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
|
|
192
|
+
// ---- WMA/ASF ----
|
|
193
|
+
{
|
|
194
|
+
name: "Extract Audio Metadata: WMA container and MIME",
|
|
195
|
+
input: WMA_HEX,
|
|
196
|
+
expectedMatch: /Container<\/td><td>wma<\/td>.*MIME<\/td><td>audio\/x-ms-wma<\/td>/s,
|
|
197
|
+
recipeConfig: [
|
|
198
|
+
{ op: "From Hex", args: ["None"] },
|
|
199
|
+
{ op: "Extract Audio Metadata", args: ["test.wma", 524288] }
|
|
200
|
+
]
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
name: "Extract Audio Metadata: WMA common tags (title, artist)",
|
|
204
|
+
input: WMA_HEX,
|
|
205
|
+
expectedMatch: /Title<\/td><td>Galway<\/td>.*Artist<\/td><td>Kevin MacLeod<\/td>/s,
|
|
206
|
+
recipeConfig: [
|
|
207
|
+
{ op: "From Hex", args: ["None"] },
|
|
208
|
+
{ op: "Extract Audio Metadata", args: ["test.wma", 524288] }
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
name: "Extract Audio Metadata: WMA ASF Content Description",
|
|
213
|
+
input: WMA_HEX,
|
|
214
|
+
expectedMatch: /ASF Content Description.*title<\/td><td>Galway<\/td>.*author<\/td><td>Kevin MacLeod<\/td>/s,
|
|
215
|
+
recipeConfig: [
|
|
216
|
+
{ op: "From Hex", args: ["None"] },
|
|
217
|
+
{ op: "Extract Audio Metadata", args: ["test.wma", 524288] }
|
|
218
|
+
]
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
name: "Extract Audio Metadata: WMA ASF Extended Content (encoding settings)",
|
|
222
|
+
input: WMA_HEX,
|
|
223
|
+
expectedMatch: /ASF Extended Content.*WM\/EncodingSettings<\/td><td>Lavf56\.40\.101<\/td>/s,
|
|
224
|
+
recipeConfig: [
|
|
225
|
+
{ op: "From Hex", args: ["None"] },
|
|
226
|
+
{ op: "Extract Audio Metadata", args: ["test.wma", 524288] }
|
|
227
|
+
]
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "Extract Audio Metadata: WMA detections",
|
|
231
|
+
input: WMA_HEX,
|
|
232
|
+
expectedMatch: /Metadata systems<\/td><td>asf_header, asf_content_desc, asf_ext_content_desc<\/td>/,
|
|
233
|
+
recipeConfig: [
|
|
234
|
+
{ op: "From Hex", args: ["None"] },
|
|
235
|
+
{ op: "Extract Audio Metadata", args: ["test.wma", 524288] }
|
|
236
|
+
]
|
|
237
|
+
},
|
|
238
|
+
|
|
239
|
+
// ---- M4A ----
|
|
240
|
+
{
|
|
241
|
+
name: "Extract Audio Metadata: M4A container, MIME and brand",
|
|
242
|
+
input: M4A_HEX,
|
|
243
|
+
expectedMatch: /Container<\/td><td>m4a<\/td>.*MIME<\/td><td>audio\/mp4<\/td>.*Brand<\/td><td>M4A <\/td>/s,
|
|
244
|
+
recipeConfig: [
|
|
245
|
+
{ op: "From Hex", args: ["None"] },
|
|
246
|
+
{ op: "Extract Audio Metadata", args: ["test.m4a", 524288] }
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: "Extract Audio Metadata: M4A top-level atoms (ftyp, mdat)",
|
|
251
|
+
input: M4A_HEX,
|
|
252
|
+
expectedMatch: /MP4 Top-Level Atoms.*ftyp<\/td>.*mdat<\/td>/s,
|
|
253
|
+
recipeConfig: [
|
|
254
|
+
{ op: "From Hex", args: ["None"] },
|
|
255
|
+
{ op: "Extract Audio Metadata", args: ["test.m4a", 524288] }
|
|
256
|
+
]
|
|
257
|
+
},
|
|
258
|
+
|
|
259
|
+
// ---- AIFF ----
|
|
260
|
+
{
|
|
261
|
+
name: "Extract Audio Metadata: AIFF container, MIME and brand",
|
|
262
|
+
input: AIFF_HEX,
|
|
263
|
+
expectedMatch: /Container<\/td><td>aiff<\/td>.*MIME<\/td><td>audio\/aiff<\/td>.*Brand<\/td><td>AIFF<\/td>/s,
|
|
264
|
+
recipeConfig: [
|
|
265
|
+
{ op: "From Hex", args: ["None"] },
|
|
266
|
+
{ op: "Extract Audio Metadata", args: ["test.aiff", 524288] }
|
|
267
|
+
]
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
name: "Extract Audio Metadata: AIFF common tag (title from NAME chunk)",
|
|
271
|
+
input: AIFF_HEX,
|
|
272
|
+
expectedMatch: /Title<\/td><td>Galway<\/td>/,
|
|
273
|
+
recipeConfig: [
|
|
274
|
+
{ op: "From Hex", args: ["None"] },
|
|
275
|
+
{ op: "Extract Audio Metadata", args: ["test.aiff", 524288] }
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
name: "Extract Audio Metadata: AIFF chunks (NAME)",
|
|
280
|
+
input: AIFF_HEX,
|
|
281
|
+
expectedMatch: /AIFF Chunks.*NAME<\/td><td>Galway<\/td>/s,
|
|
282
|
+
recipeConfig: [
|
|
283
|
+
{ op: "From Hex", args: ["None"] },
|
|
284
|
+
{ op: "Extract Audio Metadata", args: ["test.aiff", 524288] }
|
|
285
|
+
]
|
|
286
|
+
},
|
|
287
|
+
]);
|
|
@@ -11,44 +11,70 @@ TestRegister.addTests([
|
|
|
11
11
|
{
|
|
12
12
|
name: "Extract email address",
|
|
13
13
|
input: "email@example.com\nfirstname.lastname@example.com\nemail@subdomain.example.com\nfirstname+lastname@example.com\n1234567890@example.com\nemail@example-one.com\n_______@example.com email@example.name\nemail@example.museum email@example.co.jp firstname-lastname@example.com",
|
|
14
|
-
expectedOutput:
|
|
14
|
+
expectedOutput:
|
|
15
|
+
"email@example.com\nfirstname.lastname@example.com\nemail@subdomain.example.com\nfirstname+lastname@example.com\n1234567890@example.com\nemail@example-one.com\n_______@example.com\nemail@example.name\nemail@example.museum\nemail@example.co.jp\nfirstname-lastname@example.com",
|
|
15
16
|
recipeConfig: [
|
|
16
17
|
{
|
|
17
|
-
|
|
18
|
-
|
|
18
|
+
op: "Extract email addresses",
|
|
19
|
+
args: [false],
|
|
19
20
|
},
|
|
20
21
|
],
|
|
21
22
|
},
|
|
22
23
|
{
|
|
23
24
|
name: "Extract email address - Display total",
|
|
24
25
|
input: "email@example.com\nfirstname.lastname@example.com\nemail@subdomain.example.com\nfirstname+lastname@example.com\n1234567890@example.com\nemail@example-one.com\n_______@example.com email@example.name\nemail@example.museum email@example.co.jp firstname-lastname@example.com",
|
|
25
|
-
expectedOutput:
|
|
26
|
+
expectedOutput:
|
|
27
|
+
"Total found: 11\n\nemail@example.com\nfirstname.lastname@example.com\nemail@subdomain.example.com\nfirstname+lastname@example.com\n1234567890@example.com\nemail@example-one.com\n_______@example.com\nemail@example.name\nemail@example.museum\nemail@example.co.jp\nfirstname-lastname@example.com",
|
|
26
28
|
recipeConfig: [
|
|
27
29
|
{
|
|
28
|
-
|
|
29
|
-
|
|
30
|
+
op: "Extract email addresses",
|
|
31
|
+
args: [true],
|
|
30
32
|
},
|
|
31
33
|
],
|
|
32
34
|
},
|
|
33
35
|
{
|
|
34
36
|
name: "Extract email address (Internationalized)",
|
|
35
37
|
input: "\u4f0a\u662d\u5091@\u90f5\u4ef6.\u5546\u52d9 \u093e\u092e@\u092e\u094b\u0939\u0928.\u0908\u0928\u094d\u092b\u094b\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c \u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc Jos\u1ec5Silv\u1ec5@googl\u1ec5.com\nJos\u1ec5Silv\u1ec5@google.com and Jos\u1ec5Silva@google.com\nFoO@BaR.CoM, john@192.168.10.100\ng\xf3mez@junk.br and Abc.123@example.com.\nuser+mailbox/department=shipping@example.com\n\u7528\u6237@\u4f8b\u5b50.\u5e7f\u544a\n\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e@\u0909\u0926\u093e\u0939\u0930\u0923.\u0915\u0949\u092e\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nD\xf6rte@S\xf6rensen.example.com\n\u0430\u0434\u0436\u0430\u0439@\u044d\u043a\u0437\u0430\u043c\u043f\u043b.\u0440\u0443\u0441\ntest@xn--bcher-kva.com",
|
|
36
|
-
expectedOutput:
|
|
38
|
+
expectedOutput:
|
|
39
|
+
"\u4f0a\u662d\u5091@\u90f5\u4ef6.\u5546\u52d9\n\u093e\u092e@\u092e\u094b\u0939\u0928.\u0908\u0928\u094d\u092b\u094b\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nJos\u1ec5Silv\u1ec5@googl\u1ec5.com\nJos\u1ec5Silv\u1ec5@google.com\nJos\u1ec5Silva@google.com\nFoO@BaR.CoM\njohn@192.168.10.100\ng\xf3mez@junk.br\nAbc.123@example.com\nuser+mailbox/department=shipping@example.com\n\u7528\u6237@\u4f8b\u5b50.\u5e7f\u544a\n\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e@\u0909\u0926\u093e\u0939\u0930\u0923.\u0915\u0949\u092e\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nD\xf6rte@S\xf6rensen.example.com\n\u0430\u0434\u0436\u0430\u0439@\u044d\u043a\u0437\u0430\u043c\u043f\u043b.\u0440\u0443\u0441\ntest@xn--bcher-kva.com",
|
|
37
40
|
recipeConfig: [
|
|
38
41
|
{
|
|
39
|
-
|
|
40
|
-
|
|
42
|
+
op: "Extract email addresses",
|
|
43
|
+
args: [false],
|
|
41
44
|
},
|
|
42
45
|
],
|
|
43
46
|
},
|
|
44
47
|
{
|
|
45
48
|
name: "Extract email address - Display total (Internationalized)",
|
|
46
49
|
input: "\u4f0a\u662d\u5091@\u90f5\u4ef6.\u5546\u52d9 \u093e\u092e@\u092e\u094b\u0939\u0928.\u0908\u0928\u094d\u092b\u094b\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c \u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc Jos\u1ec5Silv\u1ec5@googl\u1ec5.com\nJos\u1ec5Silv\u1ec5@google.com and Jos\u1ec5Silva@google.com\nFoO@BaR.CoM, john@192.168.10.100\ng\xf3mez@junk.br and Abc.123@example.com.\nuser+mailbox/department=shipping@example.com\n\u7528\u6237@\u4f8b\u5b50.\u5e7f\u544a\n\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e@\u0909\u0926\u093e\u0939\u0930\u0923.\u0915\u0949\u092e\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nD\xf6rte@S\xf6rensen.example.com\n\u0430\u0434\u0436\u0430\u0439@\u044d\u043a\u0437\u0430\u043c\u043f\u043b.\u0440\u0443\u0441\ntest@xn--bcher-kva.com",
|
|
47
|
-
expectedOutput:
|
|
50
|
+
expectedOutput:
|
|
51
|
+
"Total found: 19\n\n\u4f0a\u662d\u5091@\u90f5\u4ef6.\u5546\u52d9\n\u093e\u092e@\u092e\u094b\u0939\u0928.\u0908\u0928\u094d\u092b\u094b\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nJos\u1ec5Silv\u1ec5@googl\u1ec5.com\nJos\u1ec5Silv\u1ec5@google.com\nJos\u1ec5Silva@google.com\nFoO@BaR.CoM\njohn@192.168.10.100\ng\xf3mez@junk.br\nAbc.123@example.com\nuser+mailbox/department=shipping@example.com\n\u7528\u6237@\u4f8b\u5b50.\u5e7f\u544a\n\u0909\u092a\u092f\u094b\u0917\u0915\u0930\u094d\u0924\u093e@\u0909\u0926\u093e\u0939\u0930\u0923.\u0915\u0949\u092e\n\u044e\u0437\u0435\u0440@\u0435\u043a\u0437\u0430\u043c\u043f\u043b.\u043a\u043e\u043c\n\u03b8\u03c3\u03b5\u03c1@\u03b5\u03c7\u03b1\u03bc\u03c0\u03bb\u03b5.\u03c8\u03bf\u03bc\nD\xf6rte@S\xf6rensen.example.com\n\u0430\u0434\u0436\u0430\u0439@\u044d\u043a\u0437\u0430\u043c\u043f\u043b.\u0440\u0443\u0441\ntest@xn--bcher-kva.com",
|
|
48
52
|
recipeConfig: [
|
|
49
53
|
{
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
op: "Extract email addresses",
|
|
55
|
+
args: [true],
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
name: "Extract email address - IP address",
|
|
61
|
+
input: "yaunwfkb\nexample@[127.0.0.1]\n091nvka",
|
|
62
|
+
expectedOutput: "example@[127.0.0.1]",
|
|
63
|
+
recipeConfig: [
|
|
64
|
+
{
|
|
65
|
+
op: "Extract email addresses",
|
|
66
|
+
args: [false],
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
name: "Extract email address - invalid IP address",
|
|
72
|
+
input: "yaunwfkb\nfalse_positive@[1.2.3.]\n091nvka",
|
|
73
|
+
expectedOutput: "",
|
|
74
|
+
recipeConfig: [
|
|
75
|
+
{
|
|
76
|
+
op: "Extract email addresses",
|
|
77
|
+
args: [false],
|
|
52
78
|
},
|
|
53
79
|
],
|
|
54
80
|
},
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* @copyright Karsten Silkenbäumer 2019
|
|
6
6
|
* @license Apache-2.0
|
|
7
7
|
*/
|
|
8
|
-
import TestRegister from "
|
|
8
|
+
import TestRegister from "../../lib/TestRegister.mjs";
|
|
9
9
|
|
|
10
10
|
TestRegister.addTests([
|
|
11
11
|
{
|
|
@@ -47,7 +47,7 @@ TestRegister.addTests([
|
|
|
47
47
|
{
|
|
48
48
|
name: "Fernet Encrypt: no input",
|
|
49
49
|
input: "",
|
|
50
|
-
expectedMatch: /^
|
|
50
|
+
expectedMatch: /^gAAA[\w-]+={0,2}$/,
|
|
51
51
|
recipeConfig: [
|
|
52
52
|
{
|
|
53
53
|
op: "Fernet Encrypt",
|
|
@@ -69,12 +69,27 @@ TestRegister.addTests([
|
|
|
69
69
|
{
|
|
70
70
|
name: "Fernet Encrypt: valid arguments",
|
|
71
71
|
input: "This is a secret message.\n",
|
|
72
|
-
expectedMatch: /^
|
|
72
|
+
expectedMatch: /^gAAA[\w-]+={0,2}$/,
|
|
73
73
|
recipeConfig: [
|
|
74
74
|
{
|
|
75
75
|
op: "Fernet Encrypt",
|
|
76
76
|
args: ["MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI="]
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
name: "Fernet Encrypt/Decrypt: round trip",
|
|
82
|
+
input: "This is a secret message.\n",
|
|
83
|
+
expectedOutput: "This is a secret message.\n",
|
|
84
|
+
recipeConfig: [
|
|
85
|
+
{
|
|
86
|
+
op: "Fernet Encrypt",
|
|
87
|
+
args: ["MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI="]
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
op: "Fernet Decrypt",
|
|
91
|
+
args: ["MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTI="]
|
|
92
|
+
},
|
|
93
|
+
],
|
|
79
94
|
}
|
|
80
95
|
]);
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Flask Session tests
|
|
3
|
+
*
|
|
4
|
+
* @author ThePlayer372-FR []
|
|
5
|
+
*
|
|
6
|
+
* @license Apache-2.0
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import TestRegister from "../../lib/TestRegister.mjs";
|
|
10
|
+
|
|
11
|
+
const validTokenSha1 = "eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aZ-KEw.E_x6bOhA4GU9t72pMinJUjN-O3I";
|
|
12
|
+
const validTokenSha256 = "eyJyb2xlIjoic3VwZXJ1c2VyIiwidXNlciI6ImFkbWluIn0.aab3Ew.Jsx2DOx_H9anZg0YcvhsASxQ11897EFHeQfS2oja4y8";
|
|
13
|
+
|
|
14
|
+
const validKey = "mysecretkey";
|
|
15
|
+
const wrongKey = "notTheKey";
|
|
16
|
+
|
|
17
|
+
const outputObject = {
|
|
18
|
+
user: "admin",
|
|
19
|
+
role: "superuser",
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const outputVerify = {
|
|
23
|
+
valid: true,
|
|
24
|
+
payload: outputObject,
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
TestRegister.addTests([
|
|
28
|
+
{
|
|
29
|
+
name: "Flask Session: Decode",
|
|
30
|
+
input: validTokenSha1,
|
|
31
|
+
expectedOutput: outputObject,
|
|
32
|
+
recipeConfig: [
|
|
33
|
+
{
|
|
34
|
+
op: "Flask Session Decode",
|
|
35
|
+
args: [
|
|
36
|
+
false
|
|
37
|
+
],
|
|
38
|
+
}
|
|
39
|
+
]
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
name: "Flask Session: Verify Sha1",
|
|
43
|
+
input: validTokenSha1,
|
|
44
|
+
expectedOutput: outputVerify,
|
|
45
|
+
recipeConfig: [
|
|
46
|
+
{
|
|
47
|
+
op: "Flask Session Verify",
|
|
48
|
+
args: [
|
|
49
|
+
{
|
|
50
|
+
string: validKey,
|
|
51
|
+
option: "UTF8"
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
string: "cookie-session",
|
|
55
|
+
option: "UTF8"
|
|
56
|
+
},
|
|
57
|
+
"sha1",
|
|
58
|
+
false,
|
|
59
|
+
],
|
|
60
|
+
}
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "Flask Session: Verify Sha256",
|
|
65
|
+
input: validTokenSha256,
|
|
66
|
+
expectedOutput: outputVerify,
|
|
67
|
+
recipeConfig: [
|
|
68
|
+
{
|
|
69
|
+
op: "Flask Session Verify",
|
|
70
|
+
args: [
|
|
71
|
+
{
|
|
72
|
+
string: validKey,
|
|
73
|
+
option: "UTF8"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
string: "cookie-session",
|
|
77
|
+
option: "UTF8"
|
|
78
|
+
},
|
|
79
|
+
"sha256",
|
|
80
|
+
false,
|
|
81
|
+
],
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "Flask Session: Sign Sha1",
|
|
87
|
+
input: outputObject,
|
|
88
|
+
expectedOutput: outputVerify,
|
|
89
|
+
recipeConfig: [
|
|
90
|
+
{
|
|
91
|
+
op: "Flask Session Sign",
|
|
92
|
+
args: [
|
|
93
|
+
{
|
|
94
|
+
string: validKey,
|
|
95
|
+
option: "UTF8"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
string: "cookie-session",
|
|
99
|
+
option: "UTF8"
|
|
100
|
+
},
|
|
101
|
+
"sha1"
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
op: "Flask Session Verify",
|
|
106
|
+
args: [
|
|
107
|
+
{
|
|
108
|
+
string: validKey,
|
|
109
|
+
option: "UTF8"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
string: "cookie-session",
|
|
113
|
+
option: "UTF8"
|
|
114
|
+
},
|
|
115
|
+
"sha1",
|
|
116
|
+
false,
|
|
117
|
+
],
|
|
118
|
+
}
|
|
119
|
+
]
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
name: "Flask Session: Sign Sha256",
|
|
123
|
+
input: outputObject,
|
|
124
|
+
expectedOutput: outputVerify,
|
|
125
|
+
recipeConfig: [
|
|
126
|
+
{
|
|
127
|
+
op: "Flask Session Sign",
|
|
128
|
+
args: [
|
|
129
|
+
{
|
|
130
|
+
string: validKey,
|
|
131
|
+
option: "UTF8"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
string: "cookie-session",
|
|
135
|
+
option: "UTF8"
|
|
136
|
+
},
|
|
137
|
+
"sha256"
|
|
138
|
+
]
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
op: "Flask Session Verify",
|
|
142
|
+
args: [
|
|
143
|
+
{
|
|
144
|
+
string: validKey,
|
|
145
|
+
option: "UTF8"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
string: "cookie-session",
|
|
149
|
+
option: "UTF8"
|
|
150
|
+
},
|
|
151
|
+
"sha256",
|
|
152
|
+
false,
|
|
153
|
+
],
|
|
154
|
+
}
|
|
155
|
+
]
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
name: "Flask Session: Verify Sha1 Wrong Key",
|
|
159
|
+
input: validTokenSha1,
|
|
160
|
+
expectedOutput: "Invalid signature!",
|
|
161
|
+
recipeConfig: [
|
|
162
|
+
{
|
|
163
|
+
op: "Flask Session Verify",
|
|
164
|
+
args: [
|
|
165
|
+
{
|
|
166
|
+
string: wrongKey,
|
|
167
|
+
option: "UTF8"
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
string: "cookie-session",
|
|
171
|
+
option: "UTF8"
|
|
172
|
+
},
|
|
173
|
+
"sha1",
|
|
174
|
+
false,
|
|
175
|
+
],
|
|
176
|
+
}
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: "Flask Session: Verify Sha256 Wrong Key",
|
|
181
|
+
input: validTokenSha256,
|
|
182
|
+
expectedOutput: "Invalid signature!",
|
|
183
|
+
recipeConfig: [
|
|
184
|
+
{
|
|
185
|
+
op: "Flask Session Verify",
|
|
186
|
+
args: [
|
|
187
|
+
{
|
|
188
|
+
string: wrongKey,
|
|
189
|
+
option: "UTF8"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
string: "cookie-session",
|
|
193
|
+
option: "UTF8"
|
|
194
|
+
},
|
|
195
|
+
"sha256",
|
|
196
|
+
false,
|
|
197
|
+
],
|
|
198
|
+
}
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
name: "Flask Session: Verify Sha1 Wrong Salt",
|
|
203
|
+
input: validTokenSha1,
|
|
204
|
+
expectedOutput: "Invalid signature!",
|
|
205
|
+
recipeConfig: [
|
|
206
|
+
{
|
|
207
|
+
op: "Flask Session Verify",
|
|
208
|
+
args: [
|
|
209
|
+
{
|
|
210
|
+
string: validKey,
|
|
211
|
+
option: "UTF8"
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
string: "notTheSalt",
|
|
215
|
+
option: "UTF8"
|
|
216
|
+
},
|
|
217
|
+
"sha1",
|
|
218
|
+
false,
|
|
219
|
+
],
|
|
220
|
+
}
|
|
221
|
+
]
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
name: "Flask Session: Verify Sha256 Wrong Salt",
|
|
225
|
+
input: validTokenSha256,
|
|
226
|
+
expectedOutput: "Invalid signature!",
|
|
227
|
+
recipeConfig: [
|
|
228
|
+
{
|
|
229
|
+
op: "Flask Session Verify",
|
|
230
|
+
args: [
|
|
231
|
+
{
|
|
232
|
+
string: validKey,
|
|
233
|
+
option: "UTF8"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
string: "notTheSalt",
|
|
237
|
+
option: "UTF8"
|
|
238
|
+
},
|
|
239
|
+
"sha256",
|
|
240
|
+
false,
|
|
241
|
+
],
|
|
242
|
+
}
|
|
243
|
+
]
|
|
244
|
+
},
|
|
245
|
+
|
|
246
|
+
]);
|