-
This commit is contained in:
parent
63f3515fcc
commit
ac7c61618a
2
app.py
2
app.py
@ -68,7 +68,7 @@ def create_conf_post():
|
|||||||
subprocess.run([script_path,"-i "+ini_path, "-c "+conf_path, "-k "+pub_path, "-l "+key_length, "-n "+config_name, "-s "+scripts_path, "-a "+authorized_keys_path, "-d "+sshd_config_path, "-m "+sendmail_path])
|
subprocess.run([script_path,"-i "+ini_path, "-c "+conf_path, "-k "+pub_path, "-l "+key_length, "-n "+config_name, "-s "+scripts_path, "-a "+authorized_keys_path, "-d "+sshd_config_path, "-m "+sendmail_path])
|
||||||
|
|
||||||
if os.path.exists(folder):
|
if os.path.exists(folder):
|
||||||
os.rmdir(folder)
|
shutil.rmtree(folder)
|
||||||
|
|
||||||
db.add_conf_image(config_name, token_name)
|
db.add_conf_image(config_name, token_name)
|
||||||
|
|
||||||
|
2
utils.py
2
utils.py
@ -4,7 +4,7 @@ import string
|
|||||||
import random
|
import random
|
||||||
|
|
||||||
def generate_random_string(length):
|
def generate_random_string(length):
|
||||||
letters = string.ascii_letters + string.digits + string.punctuation
|
letters = string.ascii_letters
|
||||||
random_string = ''.join(random.choice(letters) for i in range(length))
|
random_string = ''.join(random.choice(letters) for i in range(length))
|
||||||
return random_string
|
return random_string
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user