mirror of
https://github.com/gchq/CyberChef
synced 2025-01-09 11:08:47 +00:00
Fix magic button.
Fix download all files not working
This commit is contained in:
parent
f6f60e8203
commit
02bda3250b
1 changed files with 7 additions and 6 deletions
|
@ -414,9 +414,10 @@ class OutputWaiter {
|
||||||
const fileName = window.prompt("Please enter a filename: ", "download.zip");
|
const fileName = window.prompt("Please enter a filename: ", "download.zip");
|
||||||
const fileExt = window.prompt("Please enter a file extension for the files: ", ".txt");
|
const fileExt = window.prompt("Please enter a file extension for the files: ", ".txt");
|
||||||
const zip = new Zlib.Zip();
|
const zip = new Zlib.Zip();
|
||||||
for (let i = 0; i < this.outputs.length; i++) {
|
const inputNums = Object.keys(this.outputs);
|
||||||
const name = Utils.strToByteArray(this.outputs[i].inputNum + fileExt);
|
for (let i = 0; i < inputNums.length; i++) {
|
||||||
let out = this.getOutput(this.outputs[i].inputNum);
|
const name = Utils.strToByteArray(inputNums[i] + fileExt);
|
||||||
|
let out = this.getOutput(inputNums[i]);
|
||||||
if (typeof out === "string") {
|
if (typeof out === "string") {
|
||||||
out = Utils.strToUtf8ByteArray(out);
|
out = Utils.strToUtf8ByteArray(out);
|
||||||
}
|
}
|
||||||
|
@ -479,6 +480,7 @@ class OutputWaiter {
|
||||||
changeTab(inputNum, changeInput = false) {
|
changeTab(inputNum, changeInput = false) {
|
||||||
const currentNum = this.getActiveTab();
|
const currentNum = this.getActiveTab();
|
||||||
if (this.getOutput(inputNum) === -1) return;
|
if (this.getOutput(inputNum) === -1) return;
|
||||||
|
this.hideMagicButton();
|
||||||
|
|
||||||
const tabsWrapper = document.getElementById("output-tabs");
|
const tabsWrapper = document.getElementById("output-tabs");
|
||||||
const tabs = tabsWrapper.children;
|
const tabs = tabsWrapper.children;
|
||||||
|
@ -828,10 +830,9 @@ class OutputWaiter {
|
||||||
*/
|
*/
|
||||||
backgroundMagic() {
|
backgroundMagic() {
|
||||||
this.hideMagicButton();
|
this.hideMagicButton();
|
||||||
if (!this.app.options.autoMagic || this.getActive()) return;
|
if (!this.app.options.autoMagic || !this.getActive()) return;
|
||||||
const sample = this.getActive().slice(0, 1000) || "";
|
const sample = this.getActive().slice(0, 1000) || "";
|
||||||
|
if (sample.length || sample.byteLength) {
|
||||||
if (sample.length) {
|
|
||||||
this.manager.background.magic(sample);
|
this.manager.background.magic(sample);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue