OXIESEC PANEL
- Current Dir:
/
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
prospector
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/05/2025 09:34:06 AM
rwxr-xr-x
📄
__init__.py
0 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📄
__main__.py
71 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📁
__pycache__
-
02/07/2025 10:01:34 PM
rwxr-xr-x
📄
autodetect.py
2.89 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
blender.py
4.34 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
blender_combinations.yaml
6.4 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
compat.py
360 bytes
12/18/2024 10:23:16 AM
rw-r--r--
📁
config
-
02/07/2025 10:01:34 PM
rwxr-xr-x
📄
encoding.py
1.51 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
exceptions.py
1.26 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
finder.py
4.61 KB
12/18/2024 10:23:16 AM
rw-r--r--
📁
formatters
-
02/07/2025 10:01:34 PM
rwxr-xr-x
📄
message.py
2.67 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
pathutils.py
1.28 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
postfilter.py
2.18 KB
12/18/2024 10:23:16 AM
rw-r--r--
📁
profiles
-
02/07/2025 10:01:34 PM
rwxr-xr-x
📄
run.py
7.91 KB
12/18/2024 10:23:16 AM
rw-r--r--
📄
suppression.py
4.36 KB
12/18/2024 10:23:16 AM
rw-r--r--
📁
tools
-
02/07/2025 10:01:34 PM
rwxr-xr-x
Editing: pathutils.py
Close
import os from pathlib import Path def is_python_package(path: Path) -> bool: return path.is_dir() and (path / "__init__.py").exists() def is_python_module(path: Path) -> bool: # TODO: is this too simple? return path.suffix == ".py" def is_virtualenv(path: Path) -> bool: if os.name == "nt": # Windows! clues = ("Scripts", "lib", "include") else: clues = ("bin", "lib", "include") try: # just get the name, iterdir returns absolute paths by default dircontents = [obj.name for obj in path.iterdir()] except (OSError, TypeError): # listdir failed, probably due to path length issues in windows return False if not all(clue in dircontents for clue in clues): # we don't have the 3 directories which would imply # this is a virtualenvironment return False if not all((path / clue).is_dir() for clue in clues): # some of them are not actually directories return False # if we do have all three directories, make sure that it's not # just a coincidence by doing some heuristics on the rest of # the directory if len(dircontents) > 7: # if there are more than 7 things it's probably not a virtualenvironment return False return True