Skip to content

Commit

Permalink
add the cyberchef patch to the release script (arkime#2604)
Browse files Browse the repository at this point in the history
Co-authored-by: erinne23 <[email protected]>
  • Loading branch information
31453 and erinne23 authored Jan 18, 2024
1 parent a94f708 commit a18d7b9
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions release/new_cyber_chef.pl
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,23 @@
}
})
.then((result) => {
data = result.data;
})
.catch((error) => {
console.log('error', error);
}).finally(() => {
interval = setInterval(() => {
if (typeof app !== 'undefined') {
// THIS IS A HACK TO GET AROUND A CYBERCHEF BUG
// https://github.com/gchq/CyberChef/issues/1468
// https://github.com/gchq/CyberChef/pull/1549
// replaces the addOperation function
app.manager.recipe.addOperation = (name) => {
const item = document.createElement('li');
item.classList.add('operation');
if (app.operations[name] != null) {
if (app.operations[name] != null) { // THIS is the fix
item.innerHTML = name;
}
Expand All @@ -68,14 +74,14 @@
return item;
};
app.manager.recipe.addOperation('From Hex');
app.setInput(result.data);
if (data) {
app.manager.recipe.addOperation('From Hex');
app.setInput(data);
}
clearInterval(interval);
}
}, 100);
})
.catch((error) => {
console.log('error', error);
});
setTimeout(() => {
Expand Down

0 comments on commit a18d7b9

Please sign in to comment.