Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Python bindings for the ethtool kernel interface
The Python ethtool
module allows querying and partially controlling network
interfaces, driver, and hardware settings.
.. warning::
This is the new upstream for python-ethtool maintained by Fedora's
Python SIG. We ported it to Python 3 and only maintain it for the current
tools to keep working. No new development is happening. This is a
deprecated package. If you are considering to start using this, please
don't. We recommend netifaces <https://pypi.org/project/netifaces/>
_ instead.
The easiest way to install ethtool
is to use your distribution packages
repositories. For example:
Fedora: sudo dnf install python3-ethtool
or sudo dnf install python2-ethtool
Ubuntu: sudo apt install python-ethtool
In order to install ethtool
from source or PyPI install its dependencies first:
Fedora: sudo dnf install libnl3-devel gcc redhat-rpm-config python3-devel
Ubuntu: sudo apt install python3 python3-setuptools libpython3.6-dev libnl-route-3-dev
And then install ethtool
:
from PyPI: pip3 install ethtool
from source: python3 setup.py install
ethtool
may be used as a Python library::
>>> import ethtool
>>> ethtool.get_active_devices()
['lo', 'enp0s31f6', 'wlp4s0', 'virbr0', 'docker0', 'virbr1', 'eth0', 'tun0']
>>> ethtool.get_ipaddr('lo')
'127.0.0.1'
The ethtool
package also provides the pethtool
and pifconfig
utilities. More example usage may be gathered from their sources,
pethtool.py <https://github.com/fedora-python/python-ethtool/blob/master/scripts/pethtool>
_
and
pifconfig.py <https://github.com/fedora-python/python-ethtool/blob/master/scripts/pethtool>
_.
pethtool
mimics behavior of the ethtool
utility, but does not
support all options.
e.g., to get driver information on the eth0
interface::
$ pethtool -i eth0
driver: cdc_ether
bus-info: usb-0000:00:14.0-4.1.3
Analogically, pifconfig
mimics ifconfig
in usage. It may be
used to view information on an interface::
$ pifconfig lo
lo
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope: host
UP LOOPBACK RUNNING
Further usage information may be found in the respective manpages for
pethtool <https://github.com/fedora-python/python-ethtool/blob/master/man/pethtool.8.asciidoc>
_
and
pifconfig <https://github.com/fedora-python/python-ethtool/blob/master/man/pifconfig.8.asciidoc>
_.
Tests may be run by tox
.
Feel free to help us with improving test coverage, porting to Python 3
or anything else.
Issues and PRs on GitHub <https://github.com/fedora-python/python-ethtool>
_
are welcome.
The Python ethtool
project is free software distributed under the terms of
the GNU General Public License v2.0, see
COPYING <https://github.com/fedora-python/python-ethtool/blob/master/COPYING>
_.
Thu Jul 29 2021 Lumír Balhar lbalhar@redhat.com
Wed Sep 12 2018 Miro Hrončok mhroncok@redhat.com
Tue Jun 13 2017 Miro Hrončok mhroncok@redhat.com
Tue Mar 21 2017 Charalampos Stratakis cstratak@redhat.com
Thu May 8 2014 David Sommerseth davids@redhat.com
Fri Jan 10 2014 David Sommerseth davids@redhat.com
Wed Dec 11 2013 David Sommerseth davids@redhat.com
Tue Feb 19 2013 David Malcolm dmalcolm@redhat.com
Mon Apr 11 2011 David Sommerseth davids@redhat.com
Wed Jan 19 2011 David Sommerseth davids@redhat.com
Mon Aug 9 2010 David Sommerseth davids@redhat.com
Wed Apr 28 2010 David Sommerseth davids@redhat.com
Tue Aug 26 2008 Arnaldo Carvalho de Melo acme@redhat.com
Wed Aug 20 2008 Arnaldo Carvalho de Melo acme@redhat.com
Tue Dec 18 2007 Arnaldo Carvalho de Melo acme@redhat.com
FAQs
Python module to interface with ethtool
We found that ethtool demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.