def get_password(self, argsgiven, numerics=False, leetify=False, symbols=False, special_signs=False, reader=getpass.getpass, length=None): return tools.getpassword("Password (Blank to generate): ", reader=reader, length=length, leetify=leetify, special_signs=special_signs, symbols=symbols, numerics=numerics)
def get_password(self, argsgiven, numerics=False, leetify=False, symbols=False, special_signs=False): """ in the config file: numerics -> numerics leetify -> symbols special_chars -> special_signs """ if argsgiven == 1: length = tools.getinput("Password length (default 7): ", "7") length = int(length) password, dumpme = generator.generate_password(length, length, True, leetify, numerics, special_signs) print "New password: %s" % (password) return password # no args given password = tools.getpassword("Password (Blank to generate): ", tools._defaultwidth, False) if len(password) == 0: length = tools.getinput("Password length (default 7): ", "7") length = int(length) (password, dumpme) = generator.generate_password(length, length, True, leetify, numerics, special_signs) print "New password: %s" % (password) return password