Linux vmi284606.contaboserver.net 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64
Apache/2.4.57 (Ubuntu)
: 167.86.127.34 | : 216.73.217.31
Cant Read [ /etc/named.conf ]
7.2.24-0ubuntu0.18.04.17
root
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
lib /
python3 /
dist-packages /
certbot_apache /
[ HOME SHELL ]
Name
Size
Permission
Action
__pycache__
[ DIR ]
drwxr-xr-x
augeas_lens
[ DIR ]
drwxr-xr-x
tests
[ DIR ]
drwxr-xr-x
__init__.py
29
B
-rw-r--r--
apache_util.py
3.1
KB
-rw-r--r--
augeas_configurator.py
7.17
KB
-rw-r--r--
centos-options-ssl-apache.conf
1.55
KB
-rw-r--r--
configurator.py
97.69
KB
-rw-r--r--
constants.py
2.5
KB
-rw-r--r--
display_ops.py
4.16
KB
-rw-r--r--
entrypoint.py
1.84
KB
-rw-r--r--
http_01.py
7.78
KB
-rw-r--r--
obj.py
8.92
KB
-rw-r--r--
options-ssl-apache.conf
1.58
KB
-rw-r--r--
override_arch.py
980
B
-rw-r--r--
override_centos.py
2.43
KB
-rw-r--r--
override_darwin.py
982
B
-rw-r--r--
override_debian.py
5.55
KB
-rw-r--r--
override_gentoo.py
2.7
KB
-rw-r--r--
override_suse.py
1011
B
-rw-r--r--
parser.py
30.42
KB
-rw-r--r--
tls_sni_01.py
5.95
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : display_ops.py
"""Contains UI methods for Apache operations.""" import logging import os import zope.component from certbot import errors from certbot import interfaces import certbot.display.util as display_util logger = logging.getLogger(__name__) def select_vhost_multiple(vhosts): """Select multiple Vhosts to install the certificate for :param vhosts: Available Apache VirtualHosts :type vhosts: :class:`list` of type `~obj.Vhost` :returns: List of VirtualHosts :rtype: :class:`list`of type `~obj.Vhost` """ if not vhosts: return list() tags_list = [vhost.display_repr()+"\n" for vhost in vhosts] # Remove the extra newline from the last entry if len(tags_list): tags_list[-1] = tags_list[-1][:-1] code, names = zope.component.getUtility(interfaces.IDisplay).checklist( "Which VirtualHosts would you like to install the wildcard certificate for?", tags=tags_list, force_interactive=True) if code == display_util.OK: return_vhosts = _reversemap_vhosts(names, vhosts) return return_vhosts return [] def _reversemap_vhosts(names, vhosts): """Helper function for select_vhost_multiple for mapping string representations back to actual vhost objects""" return_vhosts = list() for selection in names: for vhost in vhosts: if vhost.display_repr().strip() == selection.strip(): return_vhosts.append(vhost) return return_vhosts def select_vhost(domain, vhosts): """Select an appropriate Apache Vhost. :param vhosts: Available Apache VirtualHosts :type vhosts: :class:`list` of type `~obj.Vhost` :returns: VirtualHost or `None` :rtype: `~obj.Vhost` or `None` """ if not vhosts: return None code, tag = _vhost_menu(domain, vhosts) if code == display_util.OK: return vhosts[tag] else: return None def _vhost_menu(domain, vhosts): """Select an appropriate Apache Vhost. :param vhosts: Available Apache Virtual Hosts :type vhosts: :class:`list` of type `~obj.Vhost` :returns: Display tuple - ('code', tag') :rtype: `tuple` """ # Free characters in the line of display text (9 is for ' | ' formatting) free_chars = display_util.WIDTH - len("HTTPS") - len("Enabled") - 9 if free_chars < 2: logger.debug("Display size is too small for " "certbot_apache.display_ops._vhost_menu()") # This runs the edge off the screen, but it doesn't cause an "error" filename_size = 1 disp_name_size = 1 else: # Filename is a bit more important and probably longer with 000-* filename_size = int(free_chars * .6) disp_name_size = free_chars - filename_size choices = [] for vhost in vhosts: if len(vhost.get_names()) == 1: disp_name = next(iter(vhost.get_names())) elif len(vhost.get_names()) == 0: disp_name = "" else: disp_name = "Multiple Names" choices.append( "{fn:{fn_size}s} | {name:{name_size}s} | {https:5s} | " "{active:7s}".format( fn=os.path.basename(vhost.filep)[:filename_size], name=disp_name[:disp_name_size], https="HTTPS" if vhost.ssl else "", active="Enabled" if vhost.enabled else "", fn_size=filename_size, name_size=disp_name_size) ) try: code, tag = zope.component.getUtility(interfaces.IDisplay).menu( "We were unable to find a vhost with a ServerName " "or Address of {0}.{1}Which virtual host would you " "like to choose?".format(domain, os.linesep), choices, force_interactive=True) except errors.MissingCommandlineFlag: msg = ( "Encountered vhost ambiguity when trying to find a vhost for " "{0} but was unable to ask for user " "guidance in non-interactive mode. Certbot may need " "vhosts to be explicitly labelled with ServerName or " "ServerAlias directives.".format(domain)) logger.warning(msg) raise errors.MissingCommandlineFlag(msg) return code, tag
Close