OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
pip
/
utils
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
05/09/2024 06:58:02 AM
rwxr-xr-x
📄
__init__.py
27.26 KB
03/02/2023 02:03:51 PM
rw-r--r--
📁
__pycache__
-
05/09/2024 06:58:03 AM
rwxr-xr-x
📄
appdirs.py
8.6 KB
11/06/2016 06:49:45 PM
rw-r--r--
📄
build.py
1.28 KB
11/06/2016 06:49:45 PM
rw-r--r--
📄
deprecation.py
2.18 KB
11/06/2016 06:49:45 PM
rw-r--r--
📄
encoding.py
971 bytes
11/06/2016 06:49:45 PM
rw-r--r--
📄
filesystem.py
899 bytes
11/06/2016 06:49:45 PM
rw-r--r--
📄
glibc.py
2.87 KB
11/06/2016 06:49:45 PM
rw-r--r--
📄
hashes.py
2.8 KB
11/06/2016 06:49:45 PM
rw-r--r--
📄
logging.py
3.25 KB
11/06/2016 06:49:45 PM
rw-r--r--
📄
outdated.py
5.33 KB
11/06/2016 06:49:45 PM
rw-r--r--
📄
packaging.py
2.03 KB
11/06/2016 06:49:45 PM
rw-r--r--
📄
setuptools_build.py
278 bytes
11/06/2016 06:49:45 PM
rw-r--r--
📄
ui.py
11.33 KB
11/06/2016 06:49:45 PM
rw-r--r--
Editing: filesystem.py
Close
import os import os.path from pip.compat import get_path_uid def check_path_owner(path): # If we don't have a way to check the effective uid of this process, then # we'll just assume that we own the directory. if not hasattr(os, "geteuid"): return True previous = None while path != previous: if os.path.lexists(path): # Check if path is writable by current user. if os.geteuid() == 0: # Special handling for root user in order to handle properly # cases where users use sudo without -H flag. try: path_uid = get_path_uid(path) except OSError: return False return path_uid == 0 else: return os.access(path, os.W_OK) else: previous, path = path, os.path.dirname(path)