Skip to content

Commit

Permalink
Merge branch 'master' into chore/update-packages
Browse files Browse the repository at this point in the history
  • Loading branch information
a3957273 authored Feb 4, 2024
2 parents 7310089 + 75c4e19 commit e532248
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions src/core/operations/AnalyseHash.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,17 @@ class AnalyseHash extends Operation {
run(input, args) {
input = input.replace(/\s/g, "");

// analyze hash if it is bcrypt
if (/^\$2[abxy]?\$[0-9]+\$[a-zA-Z0-9/.]{53}$/.test(input)) {
input = input.split("$");
return "Hash algorithm Identifier: $" + input[1] + "$\n" +
"Rounds: " + input[2] + "\n" +
"Base64 encoded Input salt(22 bytes): " + input[3].slice(0, 22) + "\n" +
"Base64 encoded hash(31 bytes): " + input[3].slice(22) + "\n\n" +
"Based on the length, this hash could have been generated by one of the following hashing functions:\n" +
"bcrypt";
}

let output = "",
possibleHashFunctions = [];
const byteLength = input.length / 2,
Expand Down
6 changes: 5 additions & 1 deletion src/web/waiters/RecipeWaiter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,11 @@ class RecipeWaiter {
const item = document.createElement("li");

item.classList.add("operation");
item.innerHTML = name;

if (this.app.operations[name] != null) {
item.innerHTML = name;
}

this.buildRecipeOperation(item);
document.getElementById("rec-list").appendChild(item);

Expand Down

0 comments on commit e532248

Please sign in to comment.