3 import sys, hmac, hashlib, getopt
6 out.write("usage: vhtpasswd [-h] FILE\n")
8 opts, args = getopt.getopt(sys.argv[1:], "h")
18 dig = hmac.new(pw, digestmod=hashlib.sha1)
20 return dig.hexdigest()
25 usr, pw = line.strip().split(':')
30 usr = sys.stdin.readline().strip()
31 gpw = sys.stdin.readline().strip()
32 if findpw(args[0], usr) == hashpw(usr, gpw):