mirror of
https://github.com/gchq/CyberChef
synced 2025-01-09 19:18:47 +00:00
Fix display file slice displaying raw instead of presented data.
Fix errored filter when searching for tabs.
This commit is contained in:
parent
6c711ec211
commit
919c3fd999
1 changed files with 22 additions and 5 deletions
|
@ -1115,13 +1115,18 @@ class OutputWaiter {
|
||||||
sliceToEl = document.getElementById("output-file-slice-to"),
|
sliceToEl = document.getElementById("output-file-slice-to"),
|
||||||
sliceFrom = parseInt(sliceFromEl.value, 10),
|
sliceFrom = parseInt(sliceFromEl.value, 10),
|
||||||
sliceTo = parseInt(sliceToEl.value, 10),
|
sliceTo = parseInt(sliceToEl.value, 10),
|
||||||
dish = this.outputs[this.getActiveTab()].data.dish,
|
output = this.outputs[this.getActiveTab()].data;
|
||||||
dishBuffer = await this.getDishBuffer(dish),
|
|
||||||
str = Utils.arrayBufferToStr(dishBuffer.slice(sliceFrom, sliceTo));
|
let str;
|
||||||
|
if (output.type === "ArrayBuffer") {
|
||||||
|
str = Utils.arrayBufferToStr(output.result.slice(sliceFrom, sliceTo));
|
||||||
|
} else {
|
||||||
|
str = Utils.arrayBufferToStr(await this.getDishBuffer(output.dish).slice(sliceFrom, sliceTo));
|
||||||
|
}
|
||||||
|
|
||||||
outputText.classList.remove("blur");
|
outputText.classList.remove("blur");
|
||||||
showFileOverlay.style.display = "block";
|
showFileOverlay.style.display = "block";
|
||||||
outputText.value = str;
|
outputText.value = Utils.printable(str, true);
|
||||||
|
|
||||||
|
|
||||||
outputText.style.display = "block";
|
outputText.style.display = "block";
|
||||||
|
@ -1343,7 +1348,19 @@ class OutputWaiter {
|
||||||
inputNum: iNum,
|
inputNum: iNum,
|
||||||
textDisplay: outDisplay[output.status]
|
textDisplay: outDisplay[output.status]
|
||||||
});
|
});
|
||||||
} else if (output.status === "baked" && showBaked) {
|
} else if (output.status === "baked" && showBaked && output.progress === false) {
|
||||||
|
let data = this.getOutput(iNum, false).slice(0, 4096);
|
||||||
|
if (typeof data !== "string") {
|
||||||
|
data = Utils.arrayBufferToStr(data);
|
||||||
|
}
|
||||||
|
data = data.replace(/[\r\n]/g, "");
|
||||||
|
if (data.toLowerCase().includes(contentFilter)) {
|
||||||
|
results.push({
|
||||||
|
inputNum: iNum,
|
||||||
|
textDisplay: data.slice(0, 100)
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (output.progress !== false && showErrored) {
|
||||||
let data = this.getOutput(iNum, false).slice(0, 4096);
|
let data = this.getOutput(iNum, false).slice(0, 4096);
|
||||||
if (typeof data !== "string") {
|
if (typeof data !== "string") {
|
||||||
data = Utils.arrayBufferToStr(data);
|
data = Utils.arrayBufferToStr(data);
|
||||||
|
|
Loading…
Reference in a new issue