OXIESEC PANEL
- Current Dir:
/
/
opt
/
alt
/
python37
/
lib
/
python3.7
/
site-packages
/
pyroute2
Server IP: 2a02:4780:11:1084:0:327f:3464:10
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
09/05/2025 09:36:16 AM
rwxr-xr-x
📄
__init__.py
3.18 KB
03/16/2023 12:56:30 PM
rw-r--r--
📁
__pycache__
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📄
arp.py
2.42 KB
03/16/2023 12:56:30 PM
rw-r--r--
📁
bsd
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
cli
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📄
common.py
17.42 KB
03/16/2023 12:56:30 PM
rw-r--r--
📁
config
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📄
conntrack.py
6.69 KB
03/16/2023 12:56:30 PM
rw-r--r--
📄
devlink.py
2.02 KB
03/16/2023 12:56:30 PM
rw-r--r--
📁
dhcp
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
ethtool
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
ext
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
inotify
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
ipdb
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
iproute
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📄
ipset.py
23.57 KB
03/16/2023 12:56:30 PM
rw-r--r--
📄
iwutil.py
21.51 KB
03/16/2023 12:56:30 PM
rw-r--r--
📄
lab.py
421 bytes
03/16/2023 12:56:30 PM
rw-r--r--
📁
ndb
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
netlink
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
netns
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
nftables
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
nslink
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
protocols
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
remote
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📁
requests
-
03/16/2023 12:56:30 PM
rwxr-xr-x
📄
wiset.py
19.16 KB
03/16/2023 12:56:30 PM
rw-r--r--
Editing: __init__.py
Close
## # # This module contains all the public symbols from the library. # import importlib import struct import sys ## # # Version # try: from pyroute2.config.version import __version__ except ImportError: __version__ = 'unknown' ## # # Windows platform specific: socket module monkey patching # # To use the library on Windows, run:: # pip install win-inet-pton # if sys.platform.startswith('win'): # noqa: E402 import win_inet_pton # noqa: F401 ## ## # # # Logging setup # # See the history: # * https://github.com/svinota/pyroute2/issues/246 # * https://github.com/svinota/pyroute2/issues/255 # * https://github.com/svinota/pyroute2/issues/270 # * https://github.com/svinota/pyroute2/issues/573 # * https://github.com/svinota/pyroute2/issues/601 # from pyroute2.config import entry_points_aliases, log # # try: from importlib import metadata except ImportError: import importlib_metadata as metadata try: # probe, if the bytearray can be used in struct.unpack_from() struct.unpack_from('I', bytearray((1, 0, 0, 0)), 0) except Exception: if sys.version_info[0] < 3: # monkeypatch for old Python versions log.warning('patching struct.unpack_from()') def wrapped(fmt, buf, offset=0): return struct._u_f_orig(fmt, str(buf), offset) struct._u_f_orig = struct.unpack_from struct.unpack_from = wrapped else: raise # load entry_points modules = [] namespace_inject = {} groups = metadata.entry_points() if hasattr(groups, 'select'): pyroute2_group = groups.select(group='pyroute2') else: pyroute2_group = groups.get('pyroute2', []) for entry_point in pyroute2_group: try: loaded = entry_point.load() except ImportError: if not sys.platform.startswith('win'): raise continue modules.append(entry_point.name) if len(entry_point.value.split(':')) == 1: key = 'pyroute2.%s' % entry_point.name namespace_inject[key] = loaded else: globals()[entry_point.name] = loaded __all__ = [] __all__.extend(modules) # alias exceptions for key, value in entry_points_aliases.items(): if key in sys.modules: sys.modules[value] = sys.modules[key] class PyRoute2ModuleSpec(importlib.machinery.ModuleSpec): def __init__( self, name, loader, *argv, origin=None, loader_state=None, is_package=None ): self.name = name self.loader = loader self.origin = None self.submodule_search_locations = None self.loader_state = None self.cached = None self.has_location = False class PyRoute2ModuleFinder(importlib.abc.MetaPathFinder): @staticmethod def find_spec(fullname, path, target=None): if target is not None: return None if fullname not in namespace_inject: return None return PyRoute2ModuleSpec(fullname, PyRoute2ModuleFinder) @staticmethod def create_module(spec): if spec.name not in namespace_inject: return None return namespace_inject[spec.name] @staticmethod def exec_module(spec): pass sys.meta_path.append(PyRoute2ModuleFinder())