Linux vps-61133.fhnet.fr 4.9.0-19-amd64 #1 SMP Debian 4.9.320-2 (2022-06-30) x86_64
Apache/2.4.25 (Debian)
Server IP : 93.113.207.21 & Your IP : 216.73.216.112
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python3 /
dist-packages /
certbot_apache /
Delete
Unzip
Name
Size
Permission
Date
Action
__pycache__
[ DIR ]
drwxrwxrwx
2020-08-25 15:29
augeas_lens
[ DIR ]
drwxrwxrwx
2020-08-25 15:28
tests
[ DIR ]
drwxrwxrwx
2020-08-25 15:29
__init__.py
29
B
-rwxrwxrwx
2018-11-07 22:14
apache_util.py
3.1
KB
-rwxrwxrwx
2018-11-07 22:14
augeas_configurator.py
7.17
KB
-rwxrwxrwx
2018-11-07 22:14
centos-options-ssl-apache.conf
1.55
KB
-rwxrwxrwx
2018-11-07 22:14
configurator.py
97.6
KB
-rwxrwxrwx
2018-11-07 22:14
constants.py
2.5
KB
-rwxrwxrwx
2018-11-07 22:14
display_ops.py
4.16
KB
-rwxrwxrwx
2018-11-07 22:14
entrypoint.py
1.84
KB
-rwxrwxrwx
2018-11-07 22:14
http_01.py
6.72
KB
-rwxrwxrwx
2018-11-07 22:14
obj.py
8.92
KB
-rwxrwxrwx
2018-11-07 22:14
options-ssl-apache.conf
1.58
KB
-rwxrwxrwx
2018-11-07 22:14
override_arch.py
980
B
-rwxrwxrwx
2018-11-07 22:14
override_centos.py
2.43
KB
-rwxrwxrwx
2018-11-07 22:14
override_darwin.py
982
B
-rwxrwxrwx
2018-11-07 22:14
override_debian.py
5.55
KB
-rwxrwxrwx
2018-11-07 22:14
override_gentoo.py
2.7
KB
-rwxrwxrwx
2018-11-07 22:14
override_suse.py
1011
B
-rwxrwxrwx
2018-11-07 22:14
parser.py
30.42
KB
-rwxrwxrwx
2018-11-07 22:14
tls_sni_01.py
5.95
KB
-rwxrwxrwx
2018-11-07 22:14
Save
Rename
""" Utility functions for certbot-apache plugin """ import binascii import os from certbot import util def get_mod_deps(mod_name): """Get known module dependencies. .. note:: This does not need to be accurate in order for the client to run. This simply keeps things clean if the user decides to revert changes. .. warning:: If all deps are not included, it may cause incorrect parsing behavior, due to enable_mod's shortcut for updating the parser's currently defined modules (`.ApacheParser.add_mod`) This would only present a major problem in extremely atypical configs that use ifmod for the missing deps. """ deps = { "ssl": ["setenvif", "mime"] } return deps.get(mod_name, []) def get_file_path(vhost_path): """Get file path from augeas_vhost_path. Takes in Augeas path and returns the file name :param str vhost_path: Augeas virtual host path :returns: filename of vhost :rtype: str """ if not vhost_path or not vhost_path.startswith("/files/"): return None return _split_aug_path(vhost_path)[0] def get_internal_aug_path(vhost_path): """Get the Augeas path for a vhost with the file path removed. :param str vhost_path: Augeas virtual host path :returns: Augeas path to vhost relative to the containing file :rtype: str """ return _split_aug_path(vhost_path)[1] def _split_aug_path(vhost_path): """Splits an Augeas path into a file path and an internal path. After removing "/files", this function splits vhost_path into the file path and the remaining Augeas path. :param str vhost_path: Augeas virtual host path :returns: file path and internal Augeas path :rtype: `tuple` of `str` """ # Strip off /files file_path = vhost_path[6:] internal_path = [] # Remove components from the end of file_path until it becomes valid while not os.path.exists(file_path): file_path, _, internal_path_part = file_path.rpartition("/") internal_path.append(internal_path_part) return file_path, "/".join(reversed(internal_path)) def parse_define_file(filepath, varname): """ Parses Defines from a variable in configuration file :param str filepath: Path of file to parse :param str varname: Name of the variable :returns: Dict of Define:Value pairs :rtype: `dict` """ return_vars = {} # Get list of words in the variable a_opts = util.get_var_from_file(varname, filepath).split() for i, v in enumerate(a_opts): # Handle Define statements and make sure it has an argument if v == "-D" and len(a_opts) >= i+2: var_parts = a_opts[i+1].partition("=") return_vars[var_parts[0]] = var_parts[2] elif len(v) > 2 and v.startswith("-D"): # Found var with no whitespace separator var_parts = v[2:].partition("=") return_vars[var_parts[0]] = var_parts[2] return return_vars def unique_id(): """ Returns an unique id to be used as a VirtualHost identifier""" return binascii.hexlify(os.urandom(16)).decode("utf-8")