views:

796

answers:

3

Let say we have a Wordlist with words

What i want to is to Genate Them to MD5 Hashes. (Have a 30gb Wordlist, i want to make All of they to MD5) I dont care which language.

This say I have The Word "Test" in the wordlist So i want it in this format :

test:098f6bcd4621d373cade4e832627b4f6

098f6bcd4621d373cade4e832627b4f6 = Test in MD5

+3  A: 

bash ftw! \o/

while read word; do
    echo -n $word | md5sum -1 | cut -f 1 -d " "
done < wordlist
Bombe
A: 

in python:

import hashlib
word_list = ['test','word1','word2','third']
hash_dict = dict([(w,hashlib.md5(w).hexdigest()) for w in word_list])
for (k,v) in hash_dict.items(): print '%s:%s' % k,v

Added bonus: hash_dict['word'] gives you back that word's hash.

rz
+2  A: 

In MySql: (might need to make the "TERMINATED BY" be '\n' on unix platforms.)

create table words ( word varchar(255) , hash varchar(32) );
LOAD DATA LOCAL INFILE 'wordlist'
    INTO TABLE words LINES TERMINATED BY '\r\n' (word);
update words set hash=md5(word);
select * from words where word = 'test';
feihtthief