I am writing a basic Unix password cracker in Python that would work for MD5, SHA-1 and SHA512.
I know that the salt in MD5 correspond to the 2 first chars of the encrypted password, and thus I assumed that it would be the same for SHA.
But after looking at some answers on SO (here for example), it seems that a Salt can be any string you want.
So, my question is how can I determine the salt part from a hashed password in SHA in the
/etc/shadow file ?
I think it is between two
$ but I am not completely sure.
I wondered in which SO site it would be the most usefull (Unix or Security) so pardon me in advance if I mischoose.