Linux newlinux5.pouyasazan.org 3.10.0-962.3.2.lve1.5.60.el7.x86_64 #1 SMP Fri Jul 23 07:07:00 EDT 2021 x86_64
LiteSpeed
Server IP : 88.99.66.243 & Your IP : 216.73.216.178
Domains :
Cant Read [ /etc/named.conf ]
User : wdbbsgxf
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-08-25 16:50
__init__.py
196
B
-rw-r--r--
2017-06-01 20:44
__init__.pyc
491
B
-rw-r--r--
2017-06-01 20:44
__init__.pyo
491
B
-rw-r--r--
2017-06-01 20:44
clcagefs.py
6.16
KB
-rw-r--r--
2017-06-01 20:44
clcagefs.pyc
7.56
KB
-rw-r--r--
2017-06-01 20:44
clcagefs.pyo
7.56
KB
-rw-r--r--
2017-06-01 20:44
clconfpars.py
1.68
KB
-rw-r--r--
2017-06-01 20:44
clconfpars.pyc
2.48
KB
-rw-r--r--
2017-06-01 20:44
clconfpars.pyo
2.48
KB
-rw-r--r--
2017-06-01 20:44
cldetect.py
2.93
KB
-rw-r--r--
2017-06-01 20:44
cldetect.pyc
2.96
KB
-rw-r--r--
2017-06-01 20:44
cldetect.pyo
2.96
KB
-rw-r--r--
2017-06-01 20:44
clemail.py
1.86
KB
-rw-r--r--
2017-06-01 20:44
clemail.pyc
2.04
KB
-rw-r--r--
2017-06-01 20:44
clemail.pyo
2.04
KB
-rw-r--r--
2017-06-01 20:44
clfunc.py
2.5
KB
-rw-r--r--
2017-06-01 20:44
clfunc.pyc
3.33
KB
-rw-r--r--
2017-06-01 20:44
clfunc.pyo
3.33
KB
-rw-r--r--
2017-06-01 20:44
clhook.py
3.55
KB
-rw-r--r--
2017-06-01 20:44
clhook.pyc
3.75
KB
-rw-r--r--
2017-06-01 20:44
clhook.pyo
3.75
KB
-rw-r--r--
2017-06-01 20:44
cllog.py
1.11
KB
-rw-r--r--
2017-06-01 20:44
cllog.pyc
1.83
KB
-rw-r--r--
2017-06-01 20:44
cllog.pyo
1.83
KB
-rw-r--r--
2017-06-01 20:44
cloutput.py
447
B
-rw-r--r--
2017-06-01 20:44
cloutput.pyc
697
B
-rw-r--r--
2017-06-01 20:44
cloutput.pyo
697
B
-rw-r--r--
2017-06-01 20:44
clpwd.py
3.53
KB
-rw-r--r--
2017-06-01 20:44
clpwd.pyc
4.65
KB
-rw-r--r--
2017-06-01 20:44
clpwd.pyo
4.65
KB
-rw-r--r--
2017-06-01 20:44
clsec.py
450
B
-rw-r--r--
2017-06-01 20:44
clsec.pyc
1.2
KB
-rw-r--r--
2017-06-01 20:44
clsec.pyo
1.2
KB
-rw-r--r--
2017-06-01 20:44
utils.py
1.45
KB
-rw-r--r--
2017-06-01 20:44
utils.pyc
2.09
KB
-rw-r--r--
2017-06-01 20:44
utils.pyo
2.09
KB
-rw-r--r--
2017-06-01 20:44
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')