mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-08 06:16:08 +01:00
bug fix in password generation
This commit is contained in:
@@ -2,6 +2,11 @@ import string
|
||||
import random
|
||||
|
||||
def generate_pass(length=14):
|
||||
chars = string.ascii_uppercase + string.ascii_lowercase + string.digits
|
||||
size = length
|
||||
return ''.join(random.choice(chars) for x in range(size))
|
||||
# chars = string.ascii_uppercase + string.ascii_lowercase + string.digits
|
||||
# size = length
|
||||
# return ''.join(random.choice(chars) for x in range(size))
|
||||
import secrets
|
||||
import string
|
||||
|
||||
alphabet = string.ascii_letters + string.digits
|
||||
return ''.join(secrets.choice(alphabet) for _ in range(length))
|
||||
@@ -1,15 +1,6 @@
|
||||
import subprocess
|
||||
import secrets
|
||||
import string
|
||||
|
||||
|
||||
def installCertBot():
|
||||
cmd = []
|
||||
|
||||
cmd.append("yum")
|
||||
cmd.append("-y")
|
||||
cmd.append("install")
|
||||
cmd.append("certbot")
|
||||
|
||||
res = subprocess.call(cmd)
|
||||
|
||||
|
||||
installCertBot()
|
||||
alphabet = string.ascii_letters + string.digits
|
||||
the_password = ''.join(secrets.choice(alphabet) for _ in range(14))
|
||||
print(the_password)
|
||||
Reference in New Issue
Block a user