1

I have a large list of plaintext passwords stored in a file pwds.txt and would like to obtain the hashed version of these passwords under various different hash algorithms. I want one file for each hash algorithm. As a minimum I would like to obtain hashes under MD5, SHA1, SHA256, (with and without salts) and bcrypt.

Is there a simple way of obtaining this, without too much scripting?

I thought about leveraging some of the existing password cracking tools, like hashcat or john, but unfortunately (to the best of my knowledge) they all start with the assumption that you already have a list of hashed passwords and that you now want to crack them. Basically, I want the opposite! I have the plaintext passwords, and want to create the hashed passwords. I have been unable to come up with a clever combination of command line options (for these two programs) that trick them to output a list of hashes from plaintexts.

Note

I have already created a short PHP-script that achieves this for smaller files, but it runs out of memory for the size of password file I need it for.

closed as unclear what you're asking by Braiam, Networker, jimmij, Ramesh, slm Nov 7 '14 at 17:36

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    Really, this can be achieved with a simple for loop if you have the plain-text passwords in an array. If you don't, awk would likely be a more-than-capable tool for the job. – HalosGhost Nov 7 '14 at 15:05
  • 1
    see This Question for a hint. – Archemar Nov 7 '14 at 15:12
  • Thanks, but as I noted at the end I already know how to do this (algorithmically). However, I need something that is more efficient than php and also contains a large number of hash algorithms. That is why it would have been so nice to use a tool like hashcat or john since they have optimized implementations of almost any hash algorithm there is. – hakoja Nov 7 '14 at 15:16
  • 4
    Please include your PHP script in the question. And also, consider using a proper language. PHP is an abomination. – Faheem Mitha Nov 8 '14 at 1:05
  • Also, you should post the error message you get when it runs out of memory. Not strictly necessary, but would do no harm. Though I don't understand why that would happen. – Faheem Mitha Nov 8 '14 at 1:12
1

As a minimum I would like to obtain hashes under MD5, SHA1, SHA256

See:

  • man md5sum
  • man sha1sum
  • man sha256sum

Beware of the presence of newlines when you use these!

Not the answer you're looking for? Browse other questions tagged or ask your own question.