File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,17 @@ class AnalyseHash extends Operation {
35
35
run ( input , args ) {
36
36
input = input . replace ( / \s / g, "" ) ;
37
37
38
+ // analyze hash if it is bcrypt
39
+ if ( / ^ \$ 2 [ a b x y ] ? \$ [ 0 - 9 ] + \$ [ a - z A - Z 0 - 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
+
38
49
let output = "" ,
39
50
possibleHashFunctions = [ ] ;
40
51
const byteLength = input . length / 2 ,
Original file line number Diff line number Diff line change @@ -396,7 +396,11 @@ class RecipeWaiter {
396
396
const item = document . createElement ( "li" ) ;
397
397
398
398
item . classList . add ( "operation" ) ;
399
- item . innerHTML = name ;
399
+
400
+ if ( this . app . operations [ name ] != null ) {
401
+ item . innerHTML = name ;
402
+ }
403
+
400
404
this . buildRecipeOperation ( item ) ;
401
405
document . getElementById ( "rec-list" ) . appendChild ( item ) ;
402
406
You can’t perform that action at this time.
0 commit comments