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 /
python2.7 /
dist-packages /
getmailcore /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
923
B
-rwxrwxrwx
2017-11-02 16:52
__init__.pyc
1.08
KB
-rwxrwxrwx
2020-08-24 23:52
_pop3ssl.py
5.8
KB
-rwxrwxrwx
2009-04-05 21:10
_pop3ssl.pyc
5.94
KB
-rwxrwxrwx
2020-08-24 23:52
_retrieverbases.py
70.04
KB
-rwxrwxrwx
2017-11-02 16:52
_retrieverbases.pyc
52.54
KB
-rwxrwxrwx
2020-08-24 23:52
baseclasses.py
14.33
KB
-rwxrwxrwx
2012-06-20 05:27
baseclasses.pyc
16.14
KB
-rwxrwxrwx
2020-08-24 23:52
compatibility.py
2.39
KB
-rwxrwxrwx
2012-06-21 21:24
compatibility.pyc
2.19
KB
-rwxrwxrwx
2020-08-24 23:52
constants.py
222
B
-rwxrwxrwx
2006-01-27 18:13
constants.pyc
348
B
-rwxrwxrwx
2020-08-24 23:52
destinations.py
43.11
KB
-rwxrwxrwx
2016-09-11 17:30
destinations.pyc
37.52
KB
-rwxrwxrwx
2020-08-24 23:52
exceptions.py
2.3
KB
-rwxrwxrwx
2012-06-20 05:27
exceptions.pyc
3.87
KB
-rwxrwxrwx
2020-08-24 23:52
filters.py
19.38
KB
-rwxrwxrwx
2016-10-22 18:46
filters.pyc
17.34
KB
-rwxrwxrwx
2020-08-24 23:52
imap_utf7.py
3.66
KB
-rwxrwxrwx
2012-05-26 20:10
imap_utf7.pyc
5.04
KB
-rwxrwxrwx
2020-08-24 23:52
logging.py
3.47
KB
-rwxrwxrwx
2008-02-17 18:10
logging.pyc
4.84
KB
-rwxrwxrwx
2020-08-24 23:52
message.py
7.69
KB
-rwxrwxrwx
2013-08-03 22:27
message.pyc
6.87
KB
-rwxrwxrwx
2020-08-24 23:52
retrievers.py
20.76
KB
-rwxrwxrwx
2016-10-22 18:46
retrievers.pyc
19.47
KB
-rwxrwxrwx
2020-08-24 23:52
utilities.py
22.36
KB
-rwxrwxrwx
2016-09-11 17:30
utilities.pyc
20.41
KB
-rwxrwxrwx
2020-08-24 23:52
Save
Rename
#!/usr/bin/env python2.3 '''Logging support for getmail. The new standard Python libary module logging didn't cut it for me; it doesn't seem capable of handling some very simple requirements like logging messages of a certain level to one fd, and other messages of higher levels to a different fd (i.e. info to stdout, warnings to stderr). ''' __all__ = [ 'Logger', ] import sys import os.path import traceback from getmailcore.constants import * ####################################### class _Logger(object): '''Class for logging. Do not instantiate directly; use Logger() instead, to keep this a singleton. ''' def __init__(self): '''Create a logger.''' self.handlers = [] self.newline = False def __call__(self): return self def addhandler(self, stream, minlevel, maxlevel=CRITICAL): '''Add a handler for logged messages. Logged messages of at least level <minlevel> (and at most level <maxlevel>, default CRITICAL) will be output to <stream>. If no handlers are specified, messages of all levels will be output to stdout. ''' self.handlers.append({'minlevel' : minlevel, 'stream' : stream, 'newline' : True, 'maxlevel' : maxlevel}) def clearhandlers(self): '''Clear the list of handlers. There should be a way to remove only one handler from a list. But that would require an easy way for the caller to distinguish between them. ''' self.handlers = [] def log(self, msglevel, msgtxt): '''Log a message of level <msglevel> containing text <msgtxt>.''' for handler in self.handlers: if msglevel < handler['minlevel'] or msglevel > handler['maxlevel']: continue if not handler['newline'] and msglevel == DEBUG: handler['stream'].write('\n') handler['stream'].write(msgtxt) handler['stream'].flush() if msgtxt.endswith('\n'): handler['newline'] = True else: handler['newline'] = False if not self.handlers: if not self.newline and msglevel == DEBUG: sys.stdout.write('\n') sys.stdout.write(msgtxt) sys.stdout.flush() if msgtxt.endswith('\n'): self.newline = True else: self.newline = False def trace(self, msg='trace\n'): '''Log a message with level TRACE. The message will be prefixed with filename, line number, and function name of the calling code. ''' trace = traceback.extract_stack()[-2] msg = '%s [%s:%i] %s' % (trace[FUNCNAME] + '()', os.path.basename(trace[FILENAME]), trace[LINENO], msg ) self.log(TRACE, msg) def debug(self, msg): '''Log a message with level DEBUG.''' self.log(DEBUG, msg) def moreinfo(self, msg): '''Log a message with level MOREINFO.''' self.log(MOREINFO, msg) def info(self, msg): '''Log a message with level INFO.''' self.log(INFO, msg) def warning(self, msg): '''Log a message with level WARNING.''' self.log(WARNING, msg) def error(self, msg): '''Log a message with level ERROR.''' self.log(ERROR, msg) def critical(self, msg): '''Log a message with level CRITICAL.''' self.log(CRITICAL, msg) Logger = _Logger()