1
0
mirror of synced 2024-11-28 00:20:48 +01:00

Merge branch 'master' into chore/update-packages

This commit is contained in:
a3957273 2024-02-04 15:20:50 +00:00 committed by GitHub
commit e532248701
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 16 additions and 1 deletions

View File

@ -35,6 +35,17 @@ class AnalyseHash extends Operation {
run(input, args) { run(input, args) {
input = input.replace(/\s/g, ""); 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 = "", let output = "",
possibleHashFunctions = []; possibleHashFunctions = [];
const byteLength = input.length / 2, const byteLength = input.length / 2,

View File

@ -396,7 +396,11 @@ class RecipeWaiter {
const item = document.createElement("li"); const item = document.createElement("li");
item.classList.add("operation"); item.classList.add("operation");
item.innerHTML = name;
if (this.app.operations[name] != null) {
item.innerHTML = name;
}
this.buildRecipeOperation(item); this.buildRecipeOperation(item);
document.getElementById("rec-list").appendChild(item); document.getElementById("rec-list").appendChild(item);