Skip to content

Commit

Permalink
Add more logging in the default scanner to help debug Npcap issues
Browse files Browse the repository at this point in the history
  • Loading branch information
brentvollebregt committed Nov 24, 2023
1 parent 743e50b commit 47cd361
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions whos_on_my_network/scanners/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ def scan(verbose: bool) -> List[DiscoveredDevice]:
answered, _ = arping(config["network_id"], verbose=0)
except Scapy_Exception as exception: # This happens when running the module using python in the cmd
# Interface is invalid (no pcap match found) !
print(f"Got a Scapy_Exception when calling arping: {exception}")
raise ScanException("Npcap must be installed for Windows hosts")
except OSError as exception: # This happens when running the application using the vs code launch config
# b'Error opening adapter: The system cannot find the device specified. (20)'
print(f"Got an OSError when calling arping: {exception}")
raise ScanException("Npcap must be installed for Windows hosts")

for s, r in answered:
Expand Down

0 comments on commit 47cd361

Please sign in to comment.