GRAYBYTE WORDPRESS FILE MANAGER8313

Server IP : 149.255.58.128 / Your IP : 216.73.216.69
System : Linux cloud516.thundercloud.uk 5.14.0-427.26.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 17 15:51:13 EDT 2024 x86_64
PHP Version : 8.2.28
Disable Function : allow_url_include, apache_child_terminate, apache_setenv, exec, passthru, pcntl_exec, posix_kill, posix_mkfifo, posix_getpwuid, posix_setpgid, posix_setsid, posix_setuid, posix_setgid, posix_seteuid, posix_setegid, posix_uname, proc_close, proc_get_status, proc_open, proc_terminate, shell_exec, show_source, system
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /lib/python3.9/site-packages/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /lib/python3.9/site-packages//hwdata.py
#
# Copyright (c) 1999--2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
# along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
#
# Red Hat trademarks are not licensed under GPLv2. No permission is
# granted to use or replicate Red Hat trademarks that are incorporated
# in this software or its documentation.
#
import sys
inPy3k = sys.version_info[0] == 3

""" Query hwdata database and return decription of vendor and/or device. """

# pylint: disable=misplaced-bare-raise

class USB(object):
    """ Interace to usb.ids from hwdata package """
    filename = '/usr/share/hwdata/usb.ids'
    devices = None

    def __init__(self, filename=None):
        """ Load pci.ids from file to internal data structure.
            parameter 'filename' can specify location of this file
        """
        if filename:
            self.filename = filename
        else:
            self.filename = USB.filename
        self.cache = 1

        if self.cache and not USB.devices:
            # parse usb.ids
            USB.devices = {}
            if inPy3k:
                f = open(self.filename, encoding='ISO8859-1')
            else:
                f = open(self.filename)
            lineno = 0
            vendor = None
            device = None
            for line in f.readlines():
                lineno += 1
                l = line.split()
                if line.startswith('#'):
                    if line.startswith('# List of known device classes, subclasses and protocols'):
                        break # end of database of devices, rest is protocols, types etc.
                    else:
                        continue
                elif len(l) == 0:
                    continue
                elif line.startswith('\t\t'):
                    interface_id = l[0].lower()
                    if len(l) > 2:
                        interface_name = ' '.join(l[1:])
                    else:
                        interface_name = ''
                    try:
                        USB.devices[vendor][1][device][0][interface_id] = interface_name
                    except TypeError:
                        sys.stderr.write("Unknown line at line {0} in {1}.\n".format(lineno, self.filename))
                elif line.startswith('\t'):
                    device = l[0].lower()
                    device_name = ' '.join(l[1:])
                    USB.devices[vendor][1][device] = [device_name, {}]
                else:
                    vendor = l[0].lower()
                    vendor_name = ' '.join(l[1:])
                    if vendor not in USB.devices:
                        USB.devices[vendor] = [vendor_name, {}]
                    else: # this should not happen
                        USB.devices[vendor][0] = vendor_name

    def get_vendor(self, vendor):
        """ Return description of vendor. Parameter is two byte code in hexa.
            If vendor is unknown None is returned.
        """
        vendor = vendor.lower()
        if self.cache:
            if vendor in USB.devices:
                return USB.devices[vendor][0]
            else:
                return None
        else:
            raise # not implemented yet

    def get_device(self, vendor, device):
        """ Return description of device. Parameters are two byte code variables in hexa.
            If device is unknown None is returned.
        """
        vendor = vendor.lower()
        device = device.lower()
        if self.cache:
            if vendor in USB.devices:
                if device in USB.devices[vendor][1]:
                    return USB.devices[vendor][1][device][0]
                else:
                    return None
            else:
                return None
        else:
            raise # not implemented yet

class PCI(object):
    """ Interace to pci.ids from hwdata package """
    filename = '/usr/share/hwdata/pci.ids'
    devices = None

    def __init__(self, filename=None):
        """ Load pci.ids from file to internal data structure.
            parameter 'filename' can specify location of this file
        """
        if filename:
            self.filename = filename
        else:
            self.filename = PCI.filename
        self.cache = 1

        if self.cache and not PCI.devices:
            # parse pci.ids
            PCI.devices = {}
            if inPy3k:
                f = open(self.filename, encoding='ISO8859-1')
            else:
                f = open(self.filename)
            vendor = None
            for line in f.readlines():
                l = line.split()
                if line.startswith('#'):
                    continue
                elif len(l) == 0:
                    continue
                elif line.startswith('\t\t'):
                    continue
                elif line.startswith('\t'):
                    device = l[0].lower()
                    device_name = ' '.join(l[1:])
                    PCI.devices[vendor][1][device] = device_name
                else:
                    vendor = l[0].lower()
                    vendor_name = ' '.join(l[1:])
                    if not vendor in  list(PCI.devices.keys()):
                        PCI.devices[vendor] = [vendor_name, {}]
                    else: # this should not happen
                        PCI.devices[vendor][0] = vendor_name

    def get_vendor(self, vendor):
        """ Return description of vendor. Parameter is two byte code in hexa.
            If vendor is unknown None is returned.
        """
        vendor = vendor.lower()
        if self.cache:
            if vendor in list(PCI.devices.keys()):
                return PCI.devices[vendor][0]
            else:
                return None
        else:
            raise # not implemented yet

    def get_device(self, vendor, device):
        """ Return description of device. Parameters are two byte code variables in hexa.
            If device is unknown None is returned.
        """
        vendor = vendor.lower()
        device = device.lower()
        if self.cache:
            if vendor in list(PCI.devices.keys()):
                if device in list(PCI.devices[vendor][1].keys()):
                    return PCI.devices[vendor][1][device]
                else:
                    return None
            else:
                return None
        else:
            raise # not implemented yet

class PNP(object):
    """ Interace to pnp.ids from hwdata package """
    filename = '/usr/share/hwdata/pnp.ids'
    VENDORS = None

    def __init__(self, filename=None):
        """ Load pnp.ids from file to internal data structure.
            parameter 'filename' can specify location of this file
        """
        if filename:
            self.filename = filename
        else:
            self.filename = PNP.filename
        self.cache = 1

        if self.cache and not PNP.VENDORS:
            # parse pnp.ids
            PNP.VENDORS = {}
            if inPy3k:
                f = open(self.filename, encoding='ISO8859-1')
            else:
                f = open(self.filename)
            for line in f.readlines():
                l = line.split()
                if line.startswith('#'):
                    continue
                elif len(l) == 0:
                    continue
                else:
                    vendor_id = l[0].upper()
                    PNP.VENDORS[vendor_id] = ' '.join(l[1:])

    def get_vendor(self, vendor_id):
        """ Return description of vendor. Parameter is 3 character long id of vendor.
            If vendor is unknown None is returned.
        """
        vendor_id = vendor_id.upper()
        if self.cache:
            if vendor_id in list(PNP.VENDORS.keys()):
                return PNP.VENDORS[vendor_id]
            else:
                return None
        else:
            raise # not implemented yet

[ Back ]
Name
Size
Last Modified
Owner / Group
Permissions
Options
..
--
December 12 2024 10:11:36
0 / root
0755
OpenSSL
--
October 13 2023 17:01:36
0 / root
0755
PySocks-1.7.1-py3.9.egg-info
--
October 13 2023 17:01:36
0 / root
0755
__pycache__
--
December 12 2024 10:11:36
0 / root
0755
_distutils_hack
--
December 04 2024 22:44:03
0 / root
0755
chardet
--
October 13 2023 17:01:35
0 / root
0755
chardet-4.0.0.dist-info
--
October 13 2023 17:01:35
0 / root
0755
dateutil
--
February 04 2024 10:27:16
0 / root
0755
distro-1.5.0-py3.9.egg-info
--
October 13 2023 17:01:34
0 / root
0755
dnf
--
December 04 2024 22:44:23
0 / root
0755
dnf-plugins
--
May 14 2025 21:42:23
0 / root
0755
dnfpluginscore
--
December 04 2024 22:44:23
0 / root
0755
dns
--
March 19 2025 22:42:16
0 / root
0755
dnspython-2.6.1-py3.9.egg-info
--
March 19 2025 22:42:16
0 / root
0755
file_magic-0.4.0-py3.9.egg-info
--
May 30 2024 07:43:18
0 / root
0755
firewall
--
February 07 2025 22:43:15
0 / root
0755
gi
--
October 13 2023 17:01:33
0 / root
0755
google
--
February 06 2024 08:17:43
0 / root
0755
html2text
--
March 19 2025 22:42:16
0 / root
0755
html2text-2020.1.16-py3.9.egg-info
--
March 19 2025 22:42:16
0 / root
0755
html5lib
--
February 07 2024 08:30:34
0 / root
0755
html5lib-1.1.dist-info
--
February 07 2024 08:30:34
0 / root
0755
idna
--
June 14 2024 21:42:16
0 / root
0755
idna-2.10-py3.9.egg-info
--
June 14 2024 21:42:16
0 / root
0755
iotop
--
February 05 2024 19:28:44
0 / root
0755
isc
--
February 22 2025 22:42:16
0 / root
0755
nftables
--
December 04 2024 22:44:04
0 / root
0755
nftables-0.1.dist-info
--
December 04 2024 22:44:04
0 / root
0755
pexpect
--
October 13 2023 17:01:36
0 / root
0755
pip
--
February 24 2025 22:47:34
0 / root
0755
pip-21.3.1.dist-info
--
February 24 2025 22:47:34
0 / root
0755
pkg_resources
--
December 04 2024 22:44:03
0 / root
0755
ply
--
October 13 2023 17:01:35
0 / root
0755
ply-3.11-py3.9.egg-info
--
October 13 2023 17:01:35
0 / root
0755
procfs
--
May 30 2024 07:43:18
0 / root
0755
protobuf-3.14.0-py3.9.egg-info
--
February 06 2024 08:17:43
0 / root
0755
ptyprocess
--
October 13 2023 17:01:36
0 / root
0755
pyOpenSSL-21.0.0-py3.9.egg-info
--
October 13 2023 17:01:36
0 / root
0755
pycparser
--
October 13 2023 17:01:35
0 / root
0755
pycparser-2.20-py3.9.egg-info
--
October 13 2023 17:01:35
0 / root
0755
pycriu
--
February 06 2024 08:17:50
0 / root
0755
pygtkcompat
--
October 13 2023 17:01:33
0 / root
0755
pyparsing-2.4.7.dist-info
--
February 05 2024 19:59:43
0 / root
0755
python_dateutil-2.8.1-py3.9.egg-info
--
February 04 2024 10:27:16
0 / root
0755
python_linux_procfs-0.7.3-py3.9.egg-info
--
May 30 2024 07:43:18
0 / root
0755
pyudev
--
October 13 2023 17:01:35
0 / root
0755
pyudev-0.22.0-py3.9.egg-info
--
October 13 2023 17:01:35
0 / root
0755
requests
--
May 30 2024 07:43:18
0 / root
0755
requests-2.25.1.dist-info
--
May 30 2024 07:43:18
0 / root
0755
rhn
--
February 26 2025 11:56:05
0 / root
0755
sepolgen
--
May 30 2024 07:43:41
0 / root
0755
sepolicy
--
May 30 2024 07:43:41
0 / root
0755
sepolicy-3.6-py3.9.egg-info
--
May 30 2024 07:43:41
0 / root
0755
setuptools
--
December 04 2024 22:44:03
0 / root
0755
setuptools-53.0.0.dist-info
--
December 04 2024 22:44:03
0 / root
0755
six-1.15.0.dist-info
--
October 13 2023 17:01:33
0 / root
0755
sos
--
December 05 2024 22:42:22
0 / root
0755
sos-4.7.2-py3.9.egg-info
--
December 05 2024 22:42:22
0 / root
0755
tuned
--
December 04 2024 22:44:57
0 / root
0755
up2date_client
--
March 18 2025 22:42:18
0 / root
0755
urllib3
--
December 04 2024 22:45:20
0 / root
0755
urllib3-1.26.5-py3.9.egg-info
--
December 04 2024 22:45:20
0 / root
0755
webencodings
--
February 07 2024 08:30:34
0 / root
0755
webencodings-0.5.1-py3.9.egg-info
--
February 07 2024 08:30:34
0 / root
0755
crit-0.0.1-py3.9.egg-info
0.226 KB
December 07 2022 08:02:09
0 / root
0644
distro.py
42.605 KB
March 30 2020 20:35:18
0 / root
0644
distutils-precedence.pth
0.148 KB
October 02 2024 19:20:21
0 / root
0644
hwdata.py
7.951 KB
March 23 2018 13:41:48
0 / root
0644
iotop-0.6-py3.9.egg-info
0.34 KB
October 15 2022 09:47:02
0 / root
0644
isc-2.0-py3.9.egg-info
0.261 KB
February 19 2025 16:01:38
0 / root
0644
magic.py
8.731 KB
April 03 2024 11:40:16
0 / root
0644
pciutils-2.3.7-py3.9.egg-info
0.236 KB
December 08 2022 12:41:41
0 / root
0644
pexpect-4.8.0-py3.9.egg-info
2.231 KB
February 14 2022 15:32:11
0 / root
0644
protobuf-3.14.0-py3.9-nspkg.pth
0.526 KB
October 15 2022 12:17:44
0 / root
0644
ptyprocess-0.6.0-py3.9.egg-info
0.258 KB
February 10 2022 23:49:36
0 / root
0644
pyparsing.py
266.958 KB
March 25 2022 18:16:50
0 / root
0644
rhnlib-2.8.6-py3.9.egg-info
0.335 KB
December 07 2022 13:15:24
0 / root
0644
seobject.py
108.671 KB
April 03 2024 15:47:25
0 / root
0644
six.py
33.483 KB
March 24 2022 22:11:54
0 / root
0644
socks.py
30.357 KB
September 20 2019 01:58:31
0 / root
0644
sockshandler.py
3.873 KB
September 20 2019 01:58:31
0 / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF