From ab778e9cbee3eae4387c1a43b83222d1be3a471e Mon Sep 17 00:00:00 2001 From: Michael Joblin Date: Sun, 19 Jul 2020 20:34:57 -0700 Subject: [PATCH 1/2] Remove netifaces (which was causing install problems); improve detection of unknown interfaces --- netdumplings/_version.py | 2 +- netdumplings/dumplingkitchen.py | 13 ++++++++++--- setup.py | 1 - 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/netdumplings/_version.py b/netdumplings/_version.py index 2b8877c..93b60a1 100644 --- a/netdumplings/_version.py +++ b/netdumplings/_version.py @@ -1 +1 @@ -__version__ = '0.5.0' +__version__ = '0.5.1' diff --git a/netdumplings/dumplingkitchen.py b/netdumplings/dumplingkitchen.py index ec3a922..bdead6a 100644 --- a/netdumplings/dumplingkitchen.py +++ b/netdumplings/dumplingkitchen.py @@ -286,8 +286,15 @@ def run(self): sniff(iface=self.interface, filter=self.filter, prn=self._process_packet, store=0) except Scapy_Exception as e: - self._logger.error(f"Error from scapy: {e}") self._logger.error( - "The sniffer encountered a problem; try running as root if " - "you're not already" + "The sniffer encountered a problem (it might help to run as " + "root if you're not already)" ) + self._logger.error(f"Error from scapy: {e}") + except ValueError as e: + # On Windows an unknown interface is a ValueError (on OS X it's + # picked up by Scapy_Exception). + if "Unknown pypcap network interface" in str(e): + self._logger.error(str(e)) + else: + raise diff --git a/setup.py b/setup.py index 08e52ce..b3ba7ba 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,6 @@ install_requires = [ 'click~=7.1', 'colorama', - 'netifaces', 'pygments', 'scapy~=2.4.3', 'termcolor', From c7b2574d247755e2d1899f2accbdbebed90b9d19 Mon Sep 17 00:00:00 2001 From: Michael Joblin Date: Sun, 19 Jul 2020 20:44:36 -0700 Subject: [PATCH 2/2] Update changelog --- HISTORY.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/HISTORY.rst b/HISTORY.rst index 97d3475..08ac5d0 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -3,6 +3,12 @@ Release History --------------- +0.5.1 (2020-07-19) +++++++++++++++++++ + +* Remove dependency on netifaces +* Improve errors when attempting to sniff on unknown interfaces + 0.5.0 (2020-07-19) ++++++++++++++++++