cyberchef 10.22.0 → 10.23.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 +131 -0
- package/CONTRIBUTING.md +37 -0
- package/Dockerfile +2 -0
- package/Gruntfile.js +0 -12
- package/README.md +1 -1
- package/babel.config.js +0 -6
- package/package.json +63 -62
- 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 +18 -3
- package/src/core/config/OperationConfig.json +22310 -0
- package/src/core/config/modules/Bletchley.mjs +28 -0
- package/src/core/config/modules/Charts.mjs +24 -0
- package/src/core/config/modules/Ciphers.mjs +128 -0
- package/src/core/config/modules/Code.mjs +60 -0
- package/src/core/config/modules/Compression.mjs +52 -0
- package/src/core/config/modules/Crypto.mjs +134 -0
- package/src/core/config/modules/Default.mjs +424 -0
- package/src/core/config/modules/Diff.mjs +16 -0
- package/src/core/config/modules/Encodings.mjs +42 -0
- package/src/core/config/modules/Handlebars.mjs +16 -0
- package/src/core/config/modules/Hashing.mjs +30 -0
- package/src/core/config/modules/Image.mjs +70 -0
- package/src/core/config/modules/Jq.mjs +16 -0
- package/src/core/config/modules/OCR.mjs +16 -0
- package/src/core/config/modules/OpModules.mjs +63 -0
- package/src/core/config/modules/PGP.mjs +26 -0
- package/src/core/config/modules/Protobuf.mjs +18 -0
- package/src/core/config/modules/PublicKey.mjs +36 -0
- package/src/core/config/modules/Regex.mjs +40 -0
- package/src/core/config/modules/Serialise.mjs +26 -0
- package/src/core/config/modules/Shellcode.mjs +18 -0
- package/src/core/config/modules/URL.mjs +20 -0
- package/src/core/config/modules/UserAgent.mjs +16 -0
- package/src/core/config/modules/Yara.mjs +16 -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/Modhex.mjs +2 -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/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/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/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/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 +960 -0
- package/src/node/index.mjs +2423 -0
- package/src/web/HTMLIngredient.mjs +24 -43
- 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/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 +9 -7
- package/tests/operations/index.mjs +8 -0
- package/tests/operations/tests/A1Z26CipherDecode.mjs +33 -0
- package/tests/operations/tests/DisassembleARM.mjs +377 -0
- package/tests/operations/tests/ExtractAudioMetadata.mjs +287 -0
- 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/ParseEthernetFrame.mjs +45 -0
- package/tests/operations/tests/RC6.mjs +487 -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
|
@@ -49,15 +49,14 @@ class HTMLIngredient {
|
|
|
49
49
|
toHtml() {
|
|
50
50
|
let html = "",
|
|
51
51
|
i, m, eventFn;
|
|
52
|
+
const hintHtml = this.hint ? `data-toggle="tooltip" title="${this.hint}"` : "";
|
|
52
53
|
|
|
53
54
|
switch (this.type) {
|
|
54
55
|
case "string":
|
|
55
56
|
case "binaryString":
|
|
56
57
|
case "byteArray":
|
|
57
|
-
html += `<div class="form-group ing-wide">
|
|
58
|
-
<label for="${this.id}"
|
|
59
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
60
|
-
class="bmd-label-floating">${this.name}</label>
|
|
58
|
+
html += `<div class="form-group ing-wide" ${hintHtml}>
|
|
59
|
+
<label for="${this.id}" class="bmd-label-floating">${this.name}</label>
|
|
61
60
|
<input type="text"
|
|
62
61
|
class="form-control arg"
|
|
63
62
|
id="${this.id}"
|
|
@@ -70,10 +69,8 @@ class HTMLIngredient {
|
|
|
70
69
|
break;
|
|
71
70
|
case "shortString":
|
|
72
71
|
case "binaryShortString":
|
|
73
|
-
html += `<div class="form-group ing-short">
|
|
74
|
-
<label for="${this.id}"
|
|
75
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
76
|
-
class="bmd-label-floating inline">${this.name}</label>
|
|
72
|
+
html += `<div class="form-group ing-short" ${hintHtml}>
|
|
73
|
+
<label for="${this.id}" class="bmd-label-floating inline">${this.name}</label>
|
|
77
74
|
<input type="text"
|
|
78
75
|
class="form-control arg inline"
|
|
79
76
|
id="${this.id}"
|
|
@@ -85,11 +82,9 @@ class HTMLIngredient {
|
|
|
85
82
|
</div>`;
|
|
86
83
|
break;
|
|
87
84
|
case "toggleString":
|
|
88
|
-
html += `<div class="form-group input-group ing-wide" data-help-title="Multi-type ingredients" data-help="Selecting a data type from the dropdown will change how the ingredient is interpreted by the operation.">
|
|
85
|
+
html += `<div class="form-group input-group ing-wide" data-help-title="Multi-type ingredients" data-help="Selecting a data type from the dropdown will change how the ingredient is interpreted by the operation." ${hintHtml}>
|
|
89
86
|
<div class="toggle-string">
|
|
90
|
-
<label for="${this.id}"
|
|
91
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
92
|
-
class="bmd-label-floating toggle-string">${this.name}</label>
|
|
87
|
+
<label for="${this.id}" class="bmd-label-floating toggle-string">${this.name}</label>
|
|
93
88
|
<input type="text"
|
|
94
89
|
class="form-control arg toggle-string"
|
|
95
90
|
id="${this.id}"
|
|
@@ -111,10 +106,8 @@ class HTMLIngredient {
|
|
|
111
106
|
</div>`;
|
|
112
107
|
break;
|
|
113
108
|
case "number":
|
|
114
|
-
html += `<div class="form-group inline ing-medium">
|
|
115
|
-
<label for="${this.id}"
|
|
116
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
117
|
-
class="bmd-label-floating inline">${this.name}</label>
|
|
109
|
+
html += `<div class="form-group inline ing-medium" ${hintHtml}>
|
|
110
|
+
<label for="${this.id}" class="bmd-label-floating inline">${this.name}</label>
|
|
118
111
|
<input type="number"
|
|
119
112
|
class="form-control arg inline"
|
|
120
113
|
id="${this.id}"
|
|
@@ -128,9 +121,9 @@ class HTMLIngredient {
|
|
|
128
121
|
</div>`;
|
|
129
122
|
break;
|
|
130
123
|
case "boolean":
|
|
131
|
-
html += `<div class="form-group inline boolean-arg ing-flexible">
|
|
124
|
+
html += `<div class="form-group inline boolean-arg ing-flexible" ${hintHtml}>
|
|
132
125
|
<div class="checkbox">
|
|
133
|
-
<label
|
|
126
|
+
<label>
|
|
134
127
|
<input type="checkbox"
|
|
135
128
|
class="arg"
|
|
136
129
|
id="${this.id}"
|
|
@@ -144,10 +137,8 @@ class HTMLIngredient {
|
|
|
144
137
|
</div>`;
|
|
145
138
|
break;
|
|
146
139
|
case "option":
|
|
147
|
-
html += `<div class="form-group ing-medium">
|
|
148
|
-
<label for="${this.id}"
|
|
149
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
150
|
-
class="bmd-label-floating inline">${this.name}</label>
|
|
140
|
+
html += `<div class="form-group ing-medium" ${hintHtml}>
|
|
141
|
+
<label for="${this.id}" class="bmd-label-floating inline">${this.name}</label>
|
|
151
142
|
<select
|
|
152
143
|
class="form-control arg inline"
|
|
153
144
|
id="${this.id}"
|
|
@@ -168,10 +159,8 @@ class HTMLIngredient {
|
|
|
168
159
|
break;
|
|
169
160
|
case "populateOption":
|
|
170
161
|
case "populateMultiOption":
|
|
171
|
-
html += `<div class="form-group ing-medium" data-help-title="Population dropdowns" data-help="Selecting a value from this dropdown will populate some of the other ingredients for this operation with pre-canned values.">
|
|
172
|
-
<label for="${this.id}"
|
|
173
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
174
|
-
class="bmd-label-floating">${this.name}</label>
|
|
162
|
+
html += `<div class="form-group ing-medium" data-help-title="Population dropdowns" data-help="Selecting a value from this dropdown will populate some of the other ingredients for this operation with pre-canned values." ${hintHtml}>
|
|
163
|
+
<label for="${this.id}" class="bmd-label-floating">${this.name}</label>
|
|
175
164
|
<select
|
|
176
165
|
class="form-control arg no-state-change populate-option"
|
|
177
166
|
id="${this.id}"
|
|
@@ -199,10 +188,8 @@ class HTMLIngredient {
|
|
|
199
188
|
this.manager.addDynamicListener("#" + this.id, "change", eventFn, this);
|
|
200
189
|
break;
|
|
201
190
|
case "editableOption":
|
|
202
|
-
html += `<div class="form-group input-group ing-wide">
|
|
203
|
-
<label for="${this.id}"
|
|
204
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
205
|
-
class="bmd-label-floating">${this.name}</label>
|
|
191
|
+
html += `<div class="form-group input-group ing-wide" ${hintHtml}>
|
|
192
|
+
<label for="${this.id}" class="bmd-label-floating">${this.name}</label>
|
|
206
193
|
<input type="text"
|
|
207
194
|
class="form-control arg"
|
|
208
195
|
id="${this.id}"
|
|
@@ -230,10 +217,8 @@ class HTMLIngredient {
|
|
|
230
217
|
this.manager.addDynamicListener(".editable-option-menu a", "click", this.editableOptionClick, this);
|
|
231
218
|
break;
|
|
232
219
|
case "editableOptionShort":
|
|
233
|
-
html += `<div class="form-group input-group ing-short">
|
|
234
|
-
<label for="${this.id}"
|
|
235
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
236
|
-
class="bmd-label-floating inline">${this.name}</label>
|
|
220
|
+
html += `<div class="form-group input-group ing-short" ${hintHtml}>
|
|
221
|
+
<label for="${this.id}" class="bmd-label-floating inline">${this.name}</label>
|
|
237
222
|
<input type="text"
|
|
238
223
|
class="form-control arg inline"
|
|
239
224
|
id="${this.id}"
|
|
@@ -261,10 +246,8 @@ class HTMLIngredient {
|
|
|
261
246
|
this.manager.addDynamicListener(".editable-option-menu a", "click", this.editableOptionClick, this);
|
|
262
247
|
break;
|
|
263
248
|
case "text":
|
|
264
|
-
html += `<div class="form-group ing-very-wide">
|
|
265
|
-
<label for="${this.id}"
|
|
266
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
267
|
-
class="bmd-label-floating">${this.name}</label>
|
|
249
|
+
html += `<div class="form-group ing-very-wide" ${hintHtml}>
|
|
250
|
+
<label for="${this.id}" class="bmd-label-floating">${this.name}</label>
|
|
268
251
|
<textarea
|
|
269
252
|
class="form-control arg"
|
|
270
253
|
id="${this.id}"
|
|
@@ -275,10 +258,8 @@ class HTMLIngredient {
|
|
|
275
258
|
</div>`;
|
|
276
259
|
break;
|
|
277
260
|
case "argSelector":
|
|
278
|
-
html += `<div class="form-group inline ing-medium" data-help-title="Ingredient selector" data-help="Selecting options in this dropdown will configure which operation ingredients are visible.">
|
|
279
|
-
<label for="${this.id}"
|
|
280
|
-
${this.hint ? `data-toggle="tooltip" title="${this.hint}"` : ""}
|
|
281
|
-
class="bmd-label-floating inline">${this.name}</label>
|
|
261
|
+
html += `<div class="form-group inline ing-medium" data-help-title="Ingredient selector" data-help="Selecting options in this dropdown will configure which operation ingredients are visible." ${hintHtml}>
|
|
262
|
+
<label for="${this.id}" class="bmd-label-floating inline">${this.name}</label>
|
|
282
263
|
<select
|
|
283
264
|
class="form-control arg inline arg-selector"
|
|
284
265
|
id="${this.id}"
|
|
@@ -298,7 +279,7 @@ class HTMLIngredient {
|
|
|
298
279
|
this.manager.addDynamicListener(".arg-selector", "change", this.argSelectorChange, this);
|
|
299
280
|
break;
|
|
300
281
|
case "label":
|
|
301
|
-
html += `<div class="form-group ing-flexible">
|
|
282
|
+
html += `<div class="form-group ing-flexible" ${hintHtml}>
|
|
302
283
|
<label>${this.name}</label>
|
|
303
284
|
<input type="hidden"
|
|
304
285
|
class="form-control arg"
|
package/src/web/Manager.mjs
CHANGED
|
@@ -130,6 +130,7 @@ class Manager {
|
|
|
130
130
|
// Controls
|
|
131
131
|
document.getElementById("bake").addEventListener("click", this.controls.bakeClick.bind(this.controls));
|
|
132
132
|
document.getElementById("auto-bake").addEventListener("change", this.controls.autoBakeChange.bind(this.controls));
|
|
133
|
+
document.getElementById("auto-bake").addEventListener("keydown", this.controls.autoBakeKeyboardHandler.bind(this.controls));
|
|
133
134
|
document.getElementById("step").addEventListener("click", this.controls.stepClick.bind(this.controls));
|
|
134
135
|
document.getElementById("clr-recipe").addEventListener("click", this.controls.clearRecipeClick.bind(this.controls));
|
|
135
136
|
document.getElementById("save").addEventListener("click", this.controls.saveClick.bind(this.controls));
|
package/src/web/html/index.html
CHANGED
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
<button type="button" aria-label="Edit Favourites" class="btn btn-warning bmd-btn-icon" id="edit-favourites" data-toggle="tooltip" title="Edit favourites">
|
|
146
146
|
<i class="material-icons" aria-hidden="true">star</i>
|
|
147
147
|
</button>
|
|
148
|
-
<div id="content-wrapper">
|
|
148
|
+
<div tabindex="0" id="content-wrapper">
|
|
149
149
|
<div id="banner" class="row">
|
|
150
150
|
<div class="col" style="text-align: left; padding-left: 10px;">
|
|
151
151
|
<a href="#" data-toggle="modal" data-target="#download-modal" data-help-title="Downloading CyberChef" data-help="<p>CyberChef can be downloaded to run locally or hosted within your own network. It has no server-side component so all that is required is that the ZIP file is uncompressed and the files are accessible.</p><p>As a user, it is worth noting that unofficial versions of CyberChef could have been modified to introduce Input and/or Recipe exfiltration. We recommend always using the official, open source, up-to-date version of CyberChef hosted at <a href='https://gchq.github.io/CyberChef'>https://gchq.github.io/CyberChef</a> if accessible.</p><p>The Network tab in your browser's Developer console (F12) can be used to inspect the network requests made by a website. This can confirm that no data is uploaded when a CyberChef recipe is baked.</p>">Download CyberChef <i class="material-icons">file_download</i></a>
|
|
@@ -173,7 +173,7 @@
|
|
|
173
173
|
Operations
|
|
174
174
|
<span class="op-count"></span>
|
|
175
175
|
</div>
|
|
176
|
-
<input id="search" type="search" class="form-control" placeholder="Search..." autocomplete="off" tabindex="
|
|
176
|
+
<input id="search" type="search" class="form-control" placeholder="Search..." autocomplete="off" tabindex="0" data-help-title="Searching for operations" data-help="<p>Use the search box to find useful operations.</p><p>Both operation names and descriptions are queried using a fuzzy matching algorithm.</p>">
|
|
177
177
|
<ul id="search-results" class="op-list"></ul>
|
|
178
178
|
<div id="categories" class="panel-group no-select"></div>
|
|
179
179
|
</div>
|
|
@@ -584,22 +584,22 @@
|
|
|
584
584
|
|
|
585
585
|
<ul class="nav nav-tabs" role="tablist">
|
|
586
586
|
<li class="nav-item" role="presentation">
|
|
587
|
-
<a class="nav-link active" href="#faqs" aria-controls="profile" role="tab" data-toggle="tab">
|
|
587
|
+
<a id="tab-1" class="nav-link active" href="#faqs" aria-controls="profile" role="tab" data-toggle="tab">
|
|
588
588
|
FAQs
|
|
589
589
|
</a>
|
|
590
590
|
</li>
|
|
591
591
|
<li class="nav-item" role="presentation">
|
|
592
|
-
<a class="nav-link" href="#report-bug" aria-controls="messages" role="tab" data-toggle="tab">
|
|
592
|
+
<a id="tab-2" class="nav-link" href="#report-bug" aria-controls="messages" role="tab" data-toggle="tab">
|
|
593
593
|
Report a bug
|
|
594
594
|
</a>
|
|
595
595
|
</li>
|
|
596
596
|
<li class="nav-item" role="presentation">
|
|
597
|
-
<a class="nav-link" href="#about" aria-controls="messages" role="tab" data-toggle="tab">
|
|
597
|
+
<a id="tab-3" class="nav-link" href="#about" aria-controls="messages" role="tab" data-toggle="tab">
|
|
598
598
|
About
|
|
599
599
|
</a>
|
|
600
600
|
</li>
|
|
601
601
|
<li class="nav-item" role="presentation">
|
|
602
|
-
<a class="nav-link" href="#keybindings" aria-controls="messages" role="tab" data-toggle="tab">
|
|
602
|
+
<a id="tab-4" class="nav-link" href="#keybindings" aria-controls="messages" role="tab" data-toggle="tab">
|
|
603
603
|
Keybindings
|
|
604
604
|
</a>
|
|
605
605
|
</li>
|