.htpasswd

how to automate the htpasswd password entry in python scripts

how to automate the htpasswd password entry in python scripts Question: This is my python function that creates the htpasswd file and adds the username and password in it . def __adduser(self, passfile, username): command=[“htpasswd”, “-c”, passfile, username] execute=subprocess.Popen(command, stdout=subprocess.PIPE) result=execute.communicate() if execute.returncode==0: return True else: #will return the Exceptions instead return False It is …

Total answers: 2