Linux worldls-302.fr.planethoster.net 4.18.0-553.8.1.lve.el7h.x86_64 #1 SMP Thu Jul 4 15:19:33 UTC 2024 x86_64
LiteSpeed
Server IP : 10.185.0.203 & Your IP : 216.73.217.14
Domains :
Cant Read [ /etc/named.conf ]
User : gerathty
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
lib /
python2.7 /
site-packages /
pip /
utils /
Delete
Unzip
Name
Size
Permission
Date
Action
__init__.py
26.89
KB
-rw-r--r--
2016-05-11 02:40
__init__.pyc
27.46
KB
-rw-r--r--
2016-11-21 19:44
__init__.pyo
27.4
KB
-rw-r--r--
2016-11-21 19:44
appdirs.py
7.71
KB
-rw-r--r--
2016-05-11 02:40
appdirs.pyc
7.54
KB
-rw-r--r--
2016-11-21 19:44
appdirs.pyo
7.54
KB
-rw-r--r--
2016-11-21 19:44
build.py
1.28
KB
-rw-r--r--
2016-05-11 02:40
build.pyc
1.68
KB
-rw-r--r--
2016-11-21 19:44
build.pyo
1.68
KB
-rw-r--r--
2016-11-21 19:44
deprecation.py
2.19
KB
-rw-r--r--
2016-05-11 02:40
deprecation.pyc
2.26
KB
-rw-r--r--
2016-11-21 19:44
deprecation.pyo
2.26
KB
-rw-r--r--
2016-11-21 19:44
encoding.py
971
B
-rw-r--r--
2016-05-11 02:40
encoding.pyc
1.25
KB
-rw-r--r--
2016-11-21 19:44
encoding.pyo
1.25
KB
-rw-r--r--
2016-11-21 19:44
filesystem.py
899
B
-rw-r--r--
2016-05-11 02:40
filesystem.pyc
780
B
-rw-r--r--
2016-11-21 19:44
filesystem.pyo
780
B
-rw-r--r--
2016-11-21 19:44
hashes.py
2.8
KB
-rw-r--r--
2016-05-11 02:40
hashes.pyc
3.87
KB
-rw-r--r--
2016-11-21 19:44
hashes.pyo
3.87
KB
-rw-r--r--
2016-11-21 19:44
logging.py
3.25
KB
-rw-r--r--
2016-05-11 02:40
logging.pyc
4.73
KB
-rw-r--r--
2016-11-21 19:44
logging.pyo
4.73
KB
-rw-r--r--
2016-11-21 19:44
outdated.py
5.33
KB
-rw-r--r--
2016-05-11 02:40
outdated.pyc
4.94
KB
-rw-r--r--
2016-11-21 19:44
outdated.pyo
4.94
KB
-rw-r--r--
2016-11-21 19:44
setuptools_build.py
240
B
-rw-r--r--
2016-05-11 02:40
setuptools_build.pyc
323
B
-rw-r--r--
2016-11-21 19:44
setuptools_build.pyo
323
B
-rw-r--r--
2016-11-21 19:44
ui.py
11.33
KB
-rw-r--r--
2016-05-11 02:40
ui.pyc
11.41
KB
-rw-r--r--
2016-11-21 19:44
ui.pyo
11.34
KB
-rw-r--r--
2016-11-21 19:44
Save
Rename
from __future__ import absolute_import import datetime import json import logging import os.path import sys from pip._vendor import lockfile from pip._vendor.packaging import version as packaging_version from pip.compat import total_seconds, WINDOWS from pip.models import PyPI from pip.locations import USER_CACHE_DIR, running_under_virtualenv from pip.utils import ensure_dir, get_installed_version from pip.utils.filesystem import check_path_owner SELFCHECK_DATE_FMT = "%Y-%m-%dT%H:%M:%SZ" logger = logging.getLogger(__name__) class VirtualenvSelfCheckState(object): def __init__(self): self.statefile_path = os.path.join(sys.prefix, "pip-selfcheck.json") # Load the existing state try: with open(self.statefile_path) as statefile: self.state = json.load(statefile) except (IOError, ValueError): self.state = {} def save(self, pypi_version, current_time): # Attempt to write out our version check file with open(self.statefile_path, "w") as statefile: json.dump( { "last_check": current_time.strftime(SELFCHECK_DATE_FMT), "pypi_version": pypi_version, }, statefile, sort_keys=True, separators=(",", ":") ) class GlobalSelfCheckState(object): def __init__(self): self.statefile_path = os.path.join(USER_CACHE_DIR, "selfcheck.json") # Load the existing state try: with open(self.statefile_path) as statefile: self.state = json.load(statefile)[sys.prefix] except (IOError, ValueError, KeyError): self.state = {} def save(self, pypi_version, current_time): # Check to make sure that we own the directory if not check_path_owner(os.path.dirname(self.statefile_path)): return # Now that we've ensured the directory is owned by this user, we'll go # ahead and make sure that all our directories are created. ensure_dir(os.path.dirname(self.statefile_path)) # Attempt to write out our version check file with lockfile.LockFile(self.statefile_path): if os.path.exists(self.statefile_path): with open(self.statefile_path) as statefile: state = json.load(statefile) else: state = {} state[sys.prefix] = { "last_check": current_time.strftime(SELFCHECK_DATE_FMT), "pypi_version": pypi_version, } with open(self.statefile_path, "w") as statefile: json.dump(state, statefile, sort_keys=True, separators=(",", ":")) def load_selfcheck_statefile(): if running_under_virtualenv(): return VirtualenvSelfCheckState() else: return GlobalSelfCheckState() def pip_version_check(session): """Check for an update for pip. Limit the frequency of checks to once per week. State is stored either in the active virtualenv or in the user's USER_CACHE_DIR keyed off the prefix of the pip script path. """ installed_version = get_installed_version("pip") if installed_version is None: return pip_version = packaging_version.parse(installed_version) pypi_version = None try: state = load_selfcheck_statefile() current_time = datetime.datetime.utcnow() # Determine if we need to refresh the state if "last_check" in state.state and "pypi_version" in state.state: last_check = datetime.datetime.strptime( state.state["last_check"], SELFCHECK_DATE_FMT ) if total_seconds(current_time - last_check) < 7 * 24 * 60 * 60: pypi_version = state.state["pypi_version"] # Refresh the version if we need to or just see if we need to warn if pypi_version is None: resp = session.get( PyPI.pip_json_url, headers={"Accept": "application/json"}, ) resp.raise_for_status() pypi_version = [ v for v in sorted( list(resp.json()["releases"]), key=packaging_version.parse, ) if not packaging_version.parse(v).is_prerelease ][-1] # save that we've performed a check state.save(pypi_version, current_time) remote_version = packaging_version.parse(pypi_version) # Determine if our pypi_version is older if (pip_version < remote_version and pip_version.base_version != remote_version.base_version): # Advise "python -m pip" on Windows to avoid issues # with overwriting pip.exe. if WINDOWS: pip_cmd = "python -m pip" else: pip_cmd = "pip" logger.warning( "You are using pip version %s, however version %s is " "available.\nYou should consider upgrading via the " "'%s install --upgrade pip' command.", pip_version, pypi_version, pip_cmd ) except Exception: logger.debug( "There was an error checking the latest version of pip", exc_info=True, )