#
+from __future__ import print_function
import random, crypt
pwd_file = open("test.pwd", 'w')
pwd_file.write("%s:%s" % ("user", encrypted))
pwd_file.close()
- print "Password file written"
+ print("Password file written")
import string
pwd_file = open("test.pwd", 'r')
pwd_file.close()
if crypt.crypt(encrypted, encrypted):
- print "Password verified Ok"
+ print("Password verified Ok")
else:
- print "BAD password"
+ print("BAD password")
if __name__ == "__main__":
test()