Skip to content
Snippets Groups Projects
Commit 3c7e0d29 authored by gpotter2's avatar gpotter2 Committed by Guillaume Valadon
Browse files

Better error logs

parent e1339d4a
No related branches found
No related tags found
No related merge requests found
......@@ -461,6 +461,7 @@ class NetworkInterfaceDict(UserDict):
elif _confir in ["no", "n"]:
return False
return False
_error_msg = "No match between your pcap and windows network interfaces found. "
if _detect[0] and not _detect[2] and ((hasattr(self, "restarted_adapter") and not self.restarted_adapter)
or not hasattr(self, "restarted_adapter")):
warning("Scapy has detected that your pcap service is not running !")
......@@ -471,15 +472,11 @@ class NetworkInterfaceDict(UserDict):
log_loading.info("Pcap service started !")
self.load_from_powershell()
return
warning("Could not start the pcap service ! "
"You probably won't be able to send packets. "
"Deactivating unneeded interfaces and restarting Scapy might help. "
"Check your winpcap and powershell installation, and access rights.")
else:
warning("No match between your pcap and windows network interfaces found. "
"You probably won't be able to send packets. "
"Deactivating unneeded interfaces and restarting Scapy might help. "
"Check your winpcap and powershell installation, and access rights.", True)
_error_msg = "Could not start the pcap service ! "
warning(_error_msg +
"You probably won't be able to send packets. "
"Deactivating unneeded interfaces and restarting Scapy might help. "
"Check your winpcap and powershell installation, and access rights.", True)
else:
# Loading state: remove invalid interfaces
self.remove_invalid_ifaces()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment