Skip to content

Commit e532248

Browse files
authored
Merge branch 'master' into chore/update-packages
2 parents 7310089 + 75c4e19 commit e532248

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/core/operations/AnalyseHash.mjs

+11
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@ class AnalyseHash extends Operation {
3535
run(input, args) {
3636
input = input.replace(/\s/g, "");
3737

38+
// analyze hash if it is bcrypt
39+
if (/^\$2[abxy]?\$[0-9]+\$[a-zA-Z0-9/.]{53}$/.test(input)) {
40+
input = input.split("$");
41+
return "Hash algorithm Identifier: $" + input[1] + "$\n" +
42+
"Rounds: " + input[2] + "\n" +
43+
"Base64 encoded Input salt(22 bytes): " + input[3].slice(0, 22) + "\n" +
44+
"Base64 encoded hash(31 bytes): " + input[3].slice(22) + "\n\n" +
45+
"Based on the length, this hash could have been generated by one of the following hashing functions:\n" +
46+
"bcrypt";
47+
}
48+
3849
let output = "",
3950
possibleHashFunctions = [];
4051
const byteLength = input.length / 2,

src/web/waiters/RecipeWaiter.mjs

+5-1
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,11 @@ class RecipeWaiter {
396396
const item = document.createElement("li");
397397

398398
item.classList.add("operation");
399-
item.innerHTML = name;
399+
400+
if (this.app.operations[name] != null) {
401+
item.innerHTML = name;
402+
}
403+
400404
this.buildRecipeOperation(item);
401405
document.getElementById("rec-list").appendChild(item);
402406

0 commit comments

Comments
 (0)