Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove netifaces; improve errors for unknown interfaces #27

Merged
merged 2 commits into from
Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion netdumplings/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.5.0'
__version__ = '0.5.1'
13 changes: 10 additions & 3 deletions netdumplings/dumplingkitchen.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
install_requires = [
'click~=7.1',
'colorama',
'netifaces',
'pygments',
'scapy~=2.4.3',
'termcolor',
Expand Down