GRAYBYTE WORDPRESS FILE MANAGER5068

Server IP : 198.54.121.189 / Your IP : 216.73.216.34
System : Linux premium69.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
PHP Version : 7.4.33
Disable Function : NONE
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Directory : /usr/lib/python3.6/site-packages/
Upload Files :
Current_dir [ Not Writeable ] Document_root [ Writeable ]

Command :


Current File : /usr/lib/python3.6/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
..
--
July 01 2025 22:14:40
root / root
0755
OpenSSL
--
March 03 2024 19:12:33
root / root
0755
PySocks-1.6.8-py3.6.egg-info
--
March 03 2024 19:12:34
root / root
0755
__pycache__
--
July 01 2025 22:14:40
root / root
0755
chardet
--
March 03 2024 19:12:31
root / root
0755
chardet-3.0.4-py3.6.egg-info
--
March 03 2024 19:12:31
root / root
0755
dateutil
--
March 03 2024 19:11:31
root / root
0755
decorator-4.2.1-py3.6.egg-info
--
March 03 2024 19:11:22
root / root
0755
dnf
--
March 13 2025 08:41:20
root / root
0755
dnf-plugins
--
April 05 2025 06:23:03
root / root
0755
dnfpluginscore
--
June 15 2024 08:34:29
root / root
0755
dns
--
June 15 2024 08:34:43
root / root
0755
dnspython-1.15.0-py3.6.egg-info
--
June 15 2024 08:34:43
root / root
0755
firewall
--
March 13 2025 08:41:19
root / root
0755
html2text
--
April 16 2025 08:59:27
root / root
0755
html2text-2019.9.26-py3.6.egg-info
--
April 16 2025 08:59:27
root / root
0755
idna
--
July 05 2024 08:30:55
root / root
0755
idna-2.5-py3.6.egg-info
--
July 05 2024 08:30:55
root / root
0755
iotop
--
June 15 2024 08:34:43
root / root
0755
isc
--
February 21 2025 08:48:18
root / root
0755
nftables
--
January 30 2025 09:37:58
root / root
0755
pip
--
June 15 2024 08:33:27
root / root
0755
pip-9.0.3.dist-info
--
June 15 2024 08:33:27
root / root
0755
pkg_resources
--
August 20 2024 08:30:55
root / root
0755
ply
--
March 03 2024 19:12:32
root / root
0755
ply-3.9-py3.6.egg-info
--
March 03 2024 19:12:32
root / root
0755
procfs
--
June 15 2024 08:33:29
root / root
0755
pyOpenSSL-19.0.0-py3.6.egg-info
--
March 03 2024 19:12:33
root / root
0755
pycparser
--
March 03 2024 19:12:32
root / root
0755
pycparser-2.14-py3.6.egg-info
--
March 03 2024 19:12:32
root / root
0755
pyparsing-2.1.10.dist-info
--
March 03 2024 19:12:33
root / root
0755
python_dateutil-2.6.1-py3.6.egg-info
--
March 03 2024 19:11:31
root / root
0755
python_linux_procfs-0.7.3-py3.6.egg-info
--
June 15 2024 08:33:29
root / root
0755
pyudev
--
March 03 2024 19:11:31
root / root
0755
pyudev-0.21.0-py3.6.egg-info
--
March 03 2024 19:11:31
root / root
0755
requests
--
January 07 2025 02:48:13
root / root
0755
requests-2.20.0-py3.6.egg-info
--
January 07 2025 02:48:13
root / root
0755
rhn
--
February 26 2025 11:36:16
root / root
0755
setuptools
--
August 20 2024 08:30:55
root / root
0755
setuptools-39.2.0.dist-info
--
August 20 2024 08:30:55
root / root
0755
six-1.11.0.dist-info
--
March 03 2024 19:11:10
root / root
0755
slip
--
March 03 2024 19:12:32
root / root
0755
syspurpose
--
June 15 2024 08:33:30
root / root
0755
syspurpose-1.28.42-py3.6.egg-info
--
June 15 2024 08:33:30
root / root
0755
tuned
--
March 13 2025 08:41:26
root / root
0755
up2date_client
--
March 19 2025 08:31:13
root / root
0755
urllib3
--
August 15 2024 08:33:55
root / root
0755
urllib3-1.24.2-py3.6.egg-info
--
August 15 2024 08:33:55
root / root
0755
decorator.py
16.18 KB
January 14 2018 10:00:21
root / root
0644
easy_install.py
0.123 KB
August 19 2024 07:28:57
root / root
0644
hwdata.py
7.951 KB
February 12 2018 08:49:28
root / root
0644
iotop-0.6-py3.6.egg-info
0.34 KB
April 06 2024 14:56:52
root / root
0644
isc-2.0-py3.6.egg-info
0.261 KB
February 20 2025 09:55:57
root / root
0644
nftables-0.1-py3.6.egg-info
0.608 KB
January 28 2025 01:24:56
root / root
0644
pciutils-2.3.6-py3.6.egg-info
0.236 KB
November 19 2019 06:36:19
root / root
0644
pyparsing.py
224.479 KB
November 13 2019 10:36:46
root / root
0644
rhnlib-2.8.6-py3.6.egg-info
0.335 KB
September 17 2024 10:10:55
root / root
0644
six.py
30.164 KB
November 13 2019 14:45:19
root / root
0644
slip-0.6.4-py3.6.egg-info
0.191 KB
October 08 2022 13:05:12
root / root
0644
slip.dbus-0.6.4-py3.6.egg-info
0.263 KB
October 08 2022 13:05:12
root / root
0644
socks.py
31.524 KB
December 21 2017 04:05:00
root / root
0644
sockshandler.py
2.845 KB
December 21 2017 04:05:00
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025
CONTACT ME
Static GIF