I am trying to find an equivalent function to UnixCrypt in Python for Windows. What I have found so far is that python does provide a crypt function, but it is only for Unix os. For Windows os, there are Cairnarvon's crypt.py, and passlib's des_crypt. So just as an example, to hash the password, you just have to pass the password and a salt (2-character string) to the functions:
from passlib import hash
import crypt as cryptC
pwd = "password"
salt = "JQ"
#Cairnarvon's crypt.py
print(cryptC.crypt(pwd,salt))
# passlib's des crypt
print(hash.des_crypt.encrypt(pwd,salt=salt))
Both functions above output the same hash:
JQMuyS6H.AGMo
However this does not prove that they are giving out the same hash as UnixCrypt or Python's crypt. To confirm this, I will need a unix os, but I don't. Can someone kind enough to provide me the hash from UnixCrypt using the password and salt in the above example? Thanks.