Mr_hEx icon

Crack Hash start with $1$ !!

Mr_hEx | PRO | 09/27/21 12:21:18 PM UTC | 0 ⭐ | 847 πŸ‘οΈ | Never ⏰ | []
text |

1.2 KB

|

None

|

0 πŸ‘

/

0 πŸ‘Ž

# it's working on Linux System only !!
# Dis: get salt from hash and use it agin with password to genrate a hash with same salt 
# last step compare with hash 
# hash e.g. : $1$sm1RceCh$rSd3PygnS/6jlFDfF2J5q. => password is : deadbolt
Β from crypt import *
import sys
Β def crack_password(hash,wordlist):
Β     hashed_pwd = hash
    lindex = hashed_pwd.rfind('$')
    hash_algorithm = hashed_pwd[1:2]
    salt = hashed_pwd[3:lindex]
    salt_format = "${}${}$".format(hash_algorithm, salt)
    Raw_Password  = open(wordlist, "r")
    for rawPass in Raw_Password:
        try:
            hashOutPut = crypt(rawPass.split()[0], salt_format)
            if hashOutPut == hashed_pwd:
                print("[+] Found Pasword : {}".format(rawPass.split()[0]))
                break
        except:
           pass
Β Β if len(sys.argv) !=3:
    print("[!] Usage : {} <Hash> <WordListPath>".format(sys.argv[0]))
    print("[+] Note  : Please don't forget to escape special chars !!")
    print("[+] e.g.  : {} \"\$1\$sm1RceCh\$rSd3PygnS/6jlFDfF2J5q.\" \"./wordlist/rockyou.txt\"".format(sys.argv[0]))
    sys.exit(1)
Β Β Β Hash = sys.argv[1]
WorlListPath = sys.argv[2]
crack_password(Hash,WorlListPath)

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    πŸ‘

    /

    πŸ‘Ž