I have been given a file with user and passwords in the format: $id$salt$hashed.
Where ID stands for the type of encryption and id=1 stands for FreeBSD-style MD5.
There is an example in which I know the password= "alice"
jsmith: $1$kDHTx$WKRXXT1P7UtjvU7CQ9eWs/:10063:0:99999:7::: So I have done this in Python to check
import hashlib passw='alice' salt='kDHTx' hashed= hashlib.md5(salt+passw).hexdigest() print('What i get is: '+hashed) print('What i should: '+'WKRXXT1P7UtjvU7CQ9eWs') But I dont even get the format correctly:
What i get is: ba359e6dd36371c4dc5c187aac11e0d8 What i should: WKRXXT1P7UtjvU7CQ9eWs What am I doing wrong? Or even understanding wrong from the begining?
WKRXXT1P7UtjvU7CQ9eWs? The result from python looks correct, because the result has to be hexadecimal (I didn't calculate the hash myself). Maybe that result you provided uses some other encoding.