Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netview 🧙‍♂️

A quick little terminal tool that lists every device on your local network with its addresses, MAC, manufacturer and hostname.

 _   _  _____  _____ __     __ ___  _____ __        __
| \ | || ____||_   _|\ \   / /|_ _|| ____|\ \      / /
|  \| ||  _|    | |   \ \ / /  | | |  _|   \ \ /\ / /
| |\  || |___   | |    \ V /   | | | |___   \ V  V /
|_| \_||_____|  |_|     \_/   |___||_____|   \_/\_/
+-----+-----------------+-------------------+-----------------------+--------------------+----------------+------------+
|   # | IP Address      | MAC Address       | Vendor                | Hostname           | Type           | Last Seen  |
+-----+-----------------+-------------------+-----------------------+--------------------+----------------+------------+
|   1 | 192.168.1.254   | 08:c7:f5:ed:0f:f9 | Vantiva Connected Ho  | -                  | Gateway        | active now |
|   2 | 192.168.1.91    | 00:1f:54:52:aa:c8 | Lorex Technology      | ND012009243454     | Camera / NVR   | active now |
|   3 | 192.168.1.92    | 08:8f:c3:91:e0:0b | Compal Information    | Android            | Android device | active now |
|   4 | 192.168.1.146   | 1e:d7:49:4d:7f:46 | Randomized MAC        | -                  | Apple device   | active now |
+-----+-----------------+-------------------+-----------------------+--------------------+----------------+------------+

Install

pip install -r requirements.txt

Or install the package so the netview command lands on your PATH:

pip install -e ".[full]"

Only rich and psutil are required. scapy and mac-vendor-lookup are optional and netview falls back cleanly when they are missing!

Usage

python -m netview
Flag What it does
-r, --range 192.168.1.0/24 Sweep a specific subnet instead of the detected one
-i, --interface "Wi-Fi" Pick the interface for the layer 2 sweep
-t, --timeout 3.0 Seconds to listen for hostname replies
-o, --output path.txt Where to write the text report (default netview_report.txt)
--json out.json Also write a JSON report with every field
--csv out.csv Also write a CSV report
--no-file Skip the text report
--no-ports Skip the TCP port probe, which is on by default
--port-list 80,443,22 Ports to probe instead of the defaults
--all Include devices from history that did not answer this scan
--no-arp Skip the scapy layer 2 sweep
--no-resolve Skip hostname resolution
--no-history Do not read or write the history file
--offline Never download the OUI database
--no-color Plain output
--update-vendors Refresh the OUI database and exit
--doctor Print capability diagnostics and exit

Data locations

Platform Directory
Windows %LOCALAPPDATA%\netview
macOS ~/Library/Application Support/netview
Linux $XDG_DATA_HOME/netview or ~/.local/share/netview

These directories hold oui.csv and history.json

Enabling the layer 2 sweep

Run python -m netview --doctor to see whether it is available. It needs both a packet capture driver and elevated rights:

  • Windows: install Npcap and run from an administrator terminal
  • Linux: sudo python -m netview, or grant cap_net_raw to the interpreter
  • macOS: sudo python -m netview

Without it netview still works through the UDP sweep, which finds the same devices and needs no privileges at all.

Notes

This project was made for educational purposes and to learn more about networking. Only scan networks you are responsible for.

About

A quick little terminal tool that lists every device on your local network with its addresses, MAC, manufacturer and hostname.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages