diff --git a/app/options.py b/app/options.py index 5d61cd44..c8bdd0ef 100644 --- a/app/options.py +++ b/app/options.py @@ -19,13 +19,23 @@ if form.getvalue('token') is None: print("What the fuck?! U r hacker Oo?!") sys.exit() -if form.getvalue('getcert') is not None and serv is not None: +if form.getvalue('getcerts') is not None and serv is not None: + cert_path = funct.get_config_var('haproxy', 'cert_path') commands = [ "ls -1t /etc/ssl/certs/ |grep pem" ] try: funct.ssh_command(serv, commands, ip="1") except: print('
Can not connect to the server
') +if form.getvalue('getcert') is not None and serv is not None: + id = form.getvalue('getcert') + cert_path = funct.get_config_var('haproxy', 'cert_path') + commands = [ "cat "+cert_path+"/"+id ] + try: + funct.ssh_command(serv, commands, ip="1") + except: + print('
Can not connect to the server
') + if form.getvalue('ssh_cert'): fullpath = funct.get_config_var('main', 'fullpath') name = form.getvalue('name') diff --git a/app/templates/add.html b/app/templates/add.html index e1570d71..490e739e 100644 --- a/app/templates/add.html +++ b/app/templates/add.html @@ -469,6 +469,10 @@ {{ conf_add }} {% endif %} + +