From 60b83c9c8c87e115fa7d6ec5be3a817793824ca4 Mon Sep 17 00:00:00 2001 From: Aidaho12 Date: Fri, 13 Jul 2018 10:28:21 +0600 Subject: [PATCH] v2.6.2.1 Ability to view SSL certificates --- app/options.py | 12 ++++++++++- app/templates/add.html | 4 ++++ app/templates/base.html | 2 +- inc/script.js | 46 +++++++++++++++++++++++++++++++++++++++-- 4 files changed, 60 insertions(+), 4 deletions(-) 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 %} + +