# perl

$cryptpasswd = crypt($password, $salt);
# python

import crypt
cryptpasswd = crypt.crypt(password, salt)