Skip to content

Commit 66c0425

Browse files
authored
Merge branch 'master' into module-charts
2 parents fd7fd9c + 7b3efa7 commit 66c0425

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+4179
-676
lines changed

.eslintrc.json

+1
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@
102102
"$": false,
103103
"jQuery": false,
104104
"log": false,
105+
"app": false,
105106

106107
"COMPILE_TIME": false,
107108
"COMPILE_MSG": false,

package-lock.json

+10-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cyberchef",
3-
"version": "8.24.2",
3+
"version": "8.26.2",
44
"description": "The Cyber Swiss Army Knife for encryption, encoding, compression and data analysis.",
55
"author": "n1474335 <[email protected]>",
66
"homepage": "https://gchq.github.io/CyberChef",
@@ -111,7 +111,7 @@
111111
"jsqr": "^1.1.1",
112112
"jsrsasign": "8.0.12",
113113
"kbpgp": "^2.0.82",
114-
"libyara-wasm": "0.0.11",
114+
"libyara-wasm": "0.0.12",
115115
"lodash": "^4.17.11",
116116
"loglevel": "^1.6.1",
117117
"loglevel-message-prefix": "^3.0.0",

src/core/Ingredient.mjs

+6
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ class Ingredient {
2727
this.toggleValues = [];
2828
this.target = null;
2929
this.defaultIndex = 0;
30+
this.min = null;
31+
this.max = null;
32+
this.step = 1;
3033

3134
if (ingredientConfig) {
3235
this._parseConfig(ingredientConfig);
@@ -50,6 +53,9 @@ class Ingredient {
5053
this.toggleValues = ingredientConfig.toggleValues;
5154
this.target = typeof ingredientConfig.target !== "undefined" ? ingredientConfig.target : null;
5255
this.defaultIndex = typeof ingredientConfig.defaultIndex !== "undefined" ? ingredientConfig.defaultIndex : 0;
56+
this.min = ingredientConfig.min;
57+
this.max = ingredientConfig.max;
58+
this.step = ingredientConfig.step;
5359
}
5460

5561

src/core/Operation.mjs

+3
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ class Operation {
184184
if (ing.disabled) conf.disabled = ing.disabled;
185185
if (ing.target) conf.target = ing.target;
186186
if (ing.defaultIndex) conf.defaultIndex = ing.defaultIndex;
187+
if (typeof ing.min === "number") conf.min = ing.min;
188+
if (typeof ing.max === "number") conf.max = ing.max;
189+
if (ing.step) conf.step = ing.step;
187190
return conf;
188191
});
189192
}

src/core/Utils.mjs

+28-3
Original file line numberDiff line numberDiff line change
@@ -832,8 +832,9 @@ class Utils {
832832
const buff = await Utils.readFile(file);
833833
const blob = new Blob(
834834
[buff],
835-
{type: "octet/stream"}
835+
{type: file.type || "octet/stream"}
836836
);
837+
const blobURL = URL.createObjectURL(blob);
837838

838839
const html = `<div class='card' style='white-space: normal;'>
839840
<div class='card-header' id='heading${i}'>
@@ -848,10 +849,19 @@ class Utils {
848849
<span class='float-right' style="margin-top: -3px">
849850
${file.size.toLocaleString()} bytes
850851
<a title="Download ${Utils.escapeHtml(file.name)}"
851-
href='${URL.createObjectURL(blob)}'
852-
download='${Utils.escapeHtml(file.name)}'>
852+
href="${blobURL}"
853+
download="${Utils.escapeHtml(file.name)}"
854+
data-toggle="tooltip">
853855
<i class="material-icons" style="vertical-align: bottom">save</i>
854856
</a>
857+
<a title="Move to input"
858+
href="#"
859+
blob-url="${blobURL}"
860+
file-name="${Utils.escapeHtml(file.name)}"
861+
class="extract-file"
862+
data-toggle="tooltip">
863+
<i class="material-icons" style="vertical-align: bottom">open_in_browser</i>
864+
</a>
855865
</span>
856866
</h6>
857867
</div>
@@ -1164,6 +1174,21 @@ String.prototype.count = function(chr) {
11641174
};
11651175

11661176

1177+
/**
1178+
* Wrapper for self.sendStatusMessage to handle different environments.
1179+
*
1180+
* @param {string} msg
1181+
*/
1182+
export function sendStatusMessage(msg) {
1183+
if (ENVIRONMENT_IS_WORKER())
1184+
self.sendStatusMessage(msg);
1185+
else if (ENVIRONMENT_IS_WEB())
1186+
app.alert(msg, 10000);
1187+
else if (ENVIRONMENT_IS_NODE())
1188+
log.debug(msg);
1189+
}
1190+
1191+
11671192
/*
11681193
* Polyfills
11691194
*/

src/core/config/Categories.json

+16-1
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,8 @@
254254
"XPath expression",
255255
"JPath expression",
256256
"CSS selector",
257-
"Extract EXIF"
257+
"Extract EXIF",
258+
"Extract Files"
258259
]
259260
},
260261
{
@@ -348,6 +349,7 @@
348349
"ops": [
349350
"Detect File Type",
350351
"Scan for Embedded Files",
352+
"Extract Files",
351353
"Remove EXIF",
352354
"Extract EXIF"
353355
]
@@ -364,6 +366,19 @@
364366
"Scatter chart",
365367
"Series chart",
366368
"Heatmap chart"
369+
"Rotate Image",
370+
"Resize Image",
371+
"Blur Image",
372+
"Dither Image",
373+
"Invert Image",
374+
"Flip Image",
375+
"Crop Image",
376+
"Image Brightness / Contrast",
377+
"Image Opacity",
378+
"Image Filter",
379+
"Contain Image",
380+
"Cover Image",
381+
"Image Hue/Saturation/Lightness"
367382
]
368383
},
369384
{

src/core/lib/BCD.mjs

100755100644
File mode changed.

src/core/lib/Base58.mjs

100755100644
File mode changed.

src/core/lib/Base64.mjs

100755100644
File mode changed.

src/core/lib/CanvasComponents.mjs

100755100644
File mode changed.

0 commit comments

Comments
 (0)