mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-02 14:11:02 +01:00
Fixed a few small bugs
This commit is contained in:
parent
b3c52a8601
commit
559741fd07
@ -214,7 +214,7 @@ class Magic {
|
|||||||
const testEnc = async op => {
|
const testEnc = async op => {
|
||||||
for (let i = 0; i < encodings.length; i++) {
|
for (let i = 0; i < encodings.length; i++) {
|
||||||
const conf = {
|
const conf = {
|
||||||
op: "Encode text",
|
op: op,
|
||||||
args: [encodings[i]]
|
args: [encodings[i]]
|
||||||
},
|
},
|
||||||
data = await this._runRecipe([conf], sample.buffer);
|
data = await this._runRecipe([conf], sample.buffer);
|
||||||
@ -343,9 +343,11 @@ class Magic {
|
|||||||
const recipe = new Recipe(recipeConfig);
|
const recipe = new Recipe(recipeConfig);
|
||||||
try {
|
try {
|
||||||
await recipe.execute(dish, 0);
|
await recipe.execute(dish, 0);
|
||||||
} catch (err) {} // Ignore errors
|
|
||||||
|
|
||||||
return dish.get(Dish.ARRAY_BUFFER);
|
return dish.get(Dish.ARRAY_BUFFER);
|
||||||
|
} catch (err) {
|
||||||
|
// If there are errors, return an empty buffer
|
||||||
|
return new ArrayBuffer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user