/
usr
/
lib
/
python3.9
/
site-packages
/
/usr/lib/python3.9/site-packages
mkdir
upload
Name
Size
Mode
Actions
chardet/
-
0755
rm
chardet-4.0.0.dist-info/
-
0755
rm
dateutil/
-
0755
rm
distro-1.5.0-py3.9.egg-info/
-
0755
rm
dnf/
-
0755
rm
dnf-plugins/
-
0755
rm
dnfpluginscore/
-
0755
rm
dns/
-
0755
rm
dnspython-2.6.1-py3.9.egg-info/
-
0755
rm
firewall/
-
0755
rm
gi/
-
0755
rm
html2text/
-
0755
rm
html2text-2020.1.16-py3.9.egg-info/
-
0755
rm
idna/
-
0755
rm
idna-2.10-py3.9.egg-info/
-
0755
rm
isc/
-
0755
rm
nftables/
-
0755
rm
nftables-0.1.dist-info/
-
0755
rm
OpenSSL/
-
0755
rm
pip/
-
0755
rm
pip-21.3.1.dist-info/
-
0755
rm
pkg_resources/
-
0755
rm
ply/
-
0755
rm
ply-3.11-py3.9.egg-info/
-
0755
rm
procfs/
-
0755
rm
pycparser/
-
0755
rm
pycparser-2.20-py3.9.egg-info/
-
0755
rm
pygtkcompat/
-
0755
rm
pyinotify-0.9.6-py3.9.egg-info/
-
0755
rm
pyOpenSSL-21.0.0-py3.9.egg-info/
-
0755
rm
pyparsing-2.4.7.dist-info/
-
0755
rm
PySocks-1.7.1-py3.9.egg-info/
-
0755
rm
python_dateutil-2.9.0.post0.dist-info/
-
0755
rm
python_linux_procfs-0.7.4-py3.9.egg-info/
-
0755
rm
pyudev/
-
0755
rm
pyudev-0.22.0-py3.9.egg-info/
-
0755
rm
requests/
-
0755
rm
requests-2.25.1.dist-info/
-
0755
rm
rhn/
-
0755
rm
sepolgen/
-
0755
rm
sepolicy/
-
0755
rm
sepolicy-3.6-py3.9.egg-info/
-
0755
rm
setuptools/
-
0755
rm
setuptools-53.0.0.dist-info/
-
0755
rm
six-1.15.0.dist-info/
-
0755
rm
tuned/
-
0755
rm
up2date_client/
-
0755
rm
urllib3/
-
0755
rm
urllib3-1.26.5-py3.9.egg-info/
-
0755
rm
_distutils_hack/
-
0755
rm
__pycache__/
-
0755
rm
distro.py
43628
0644
edit
dl
rm
distutils-precedence.pth
152
0644
edit
dl
rm
hwdata.py
8142
0644
edit
dl
rm
isc-2.0-py3.9.egg-info
267
0644
edit
dl
rm
pciutils-2.3.7-py3.9.egg-info
242
0644
edit
dl
rm
pyinotify.py
89008
0644
edit
dl
rm
pyparsing.py
273365
0644
edit
dl
rm
seobject.py
112840
0644
edit
dl
rm
six.py
34287
0644
edit
dl
rm
socks.py
31086
0644
edit
dl
rm
sockshandler.py
3966
0644
edit
dl
rm
Edit:
/usr/lib/python3.9/site-packages/hwdata.py
(8142B)
# # 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
Save
cmd:
run