Linux server.edchosting.com 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
LiteSpeed
Server IP : 75.98.162.185 & Your IP : 216.73.216.163
Domains :
Cant Read [ /etc/named.conf ]
User : goons4good
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
lib /
python2.7 /
site-packages /
clcommon /
Delete
Unzip
Name
Size
Permission
Date
Action
cpapi
[ DIR ]
drwxr-xr-x
2021-09-16 14:49
__init__.py
196
B
-rw-r--r--
2017-06-01 12:14
__init__.pyc
491
B
-rw-r--r--
2017-06-01 12:14
__init__.pyo
491
B
-rw-r--r--
2017-06-01 12:14
clcagefs.py
6.16
KB
-rw-r--r--
2017-06-01 12:14
clcagefs.pyc
7.56
KB
-rw-r--r--
2017-06-01 12:14
clcagefs.pyo
7.56
KB
-rw-r--r--
2017-06-01 12:14
clconfpars.py
1.68
KB
-rw-r--r--
2017-06-01 12:14
clconfpars.pyc
2.48
KB
-rw-r--r--
2017-06-01 12:14
clconfpars.pyo
2.48
KB
-rw-r--r--
2017-06-01 12:14
cldetect.py
2.93
KB
-rw-r--r--
2017-06-01 12:14
cldetect.pyc
2.96
KB
-rw-r--r--
2017-06-01 12:14
cldetect.pyo
2.96
KB
-rw-r--r--
2017-06-01 12:14
clemail.py
1.86
KB
-rw-r--r--
2017-06-01 12:14
clemail.pyc
2.04
KB
-rw-r--r--
2017-06-01 12:14
clemail.pyo
2.04
KB
-rw-r--r--
2017-06-01 12:14
clfunc.py
2.5
KB
-rw-r--r--
2017-06-01 12:14
clfunc.pyc
3.33
KB
-rw-r--r--
2017-06-01 12:14
clfunc.pyo
3.33
KB
-rw-r--r--
2017-06-01 12:14
clhook.py
3.55
KB
-rw-r--r--
2017-06-01 12:14
clhook.pyc
3.75
KB
-rw-r--r--
2017-06-01 12:14
clhook.pyo
3.75
KB
-rw-r--r--
2017-06-01 12:14
cllog.py
1.11
KB
-rw-r--r--
2017-06-01 12:14
cllog.pyc
1.83
KB
-rw-r--r--
2017-06-01 12:14
cllog.pyo
1.83
KB
-rw-r--r--
2017-06-01 12:14
cloutput.py
447
B
-rw-r--r--
2017-06-01 12:14
cloutput.pyc
697
B
-rw-r--r--
2017-06-01 12:14
cloutput.pyo
697
B
-rw-r--r--
2017-06-01 12:14
clpwd.py
3.53
KB
-rw-r--r--
2017-06-01 12:14
clpwd.pyc
4.65
KB
-rw-r--r--
2017-06-01 12:14
clpwd.pyo
4.65
KB
-rw-r--r--
2017-06-01 12:14
clsec.py
450
B
-rw-r--r--
2017-06-01 12:14
clsec.pyc
1.2
KB
-rw-r--r--
2017-06-01 12:14
clsec.pyo
1.2
KB
-rw-r--r--
2017-06-01 12:14
utils.py
1.45
KB
-rw-r--r--
2017-06-01 12:14
utils.pyc
2.09
KB
-rw-r--r--
2017-06-01 12:14
utils.pyo
2.09
KB
-rw-r--r--
2017-06-01 12:14
Save
Rename
# ClEmail - class for generation email messages import os import jinja2 # Subject line prefix in template file SUBJECT_LINE_PREFIX = 'Subject:' class ClEmail: def __init__(self): pass @staticmethod def generate_mail_jinja2(template_dir, templ_filename, templ_data=None, locale_name=None, subject=None): """ Generates email message using jinja2 template engine :param template_dir: Base templates directory :param templ_filename: Template filename :param templ_data: Data to fill template using jinja2 :param locale_name: Locale :param subject: Email subject to use if it not found in template :return: Cortege (email_subject, email_body) """ # default locale is en_US def_locale = 'en_US' locale_name = locale_name or def_locale templ_dir = os.path.join(template_dir, locale_name) if locale_name != def_locale and not os.path.isfile(os.path.join(templ_dir, templ_filename)): templ_dir = os.path.join(template_dir, def_locale) template_file = os.path.join(templ_dir, templ_filename) # Read template file content f_template = open(template_file, "r") template_lines = f_template.readlines() f_template.close() # Search subject string in template content if len(template_lines) > 2 and template_lines[0].startswith(SUBJECT_LINE_PREFIX) and template_lines[1] == '\n': subject = template_lines[0].replace(SUBJECT_LINE_PREFIX, '').strip() # Remove Subject line and separator (empty line) from array template_lines.pop(1) template_lines.pop(0) pass # Create dictionary for jinja2 Dict Loader template_lines = [l.decode('utf-8') for l in template_lines] templ_dict = {templ_filename: ''.join(template_lines)} templ_loader = jinja2.DictLoader(templ_dict) templ_envir = jinja2.Environment(loader=templ_loader) body_message = templ_envir.get_template(templ_filename).render(templ_data) return subject, body_message.encode('utf-8')