This Network Scanner Tool is a Python script designed for macOS and Linux systems. It provides information about your local network, such as the SSID, subnet mask, network gateway, and the local machine's IP and hostname. Additionally, it uses nmap
to scan the local network for other devices, listing their IP addresses, hostnames, and open ports.
- Retrieve SSID of the connected Wi-Fi network.
- Display the local machine's IP address and hostname.
- Get the subnet mask and network gateway.
- Perform a network scan using
nmap
. - Resolve hostnames using DNS, mDNS (via
dns-sd
oravahi-browse
), and NetBIOS (nmblookup
).
- Python 3.x
nmap
dns-sd
(pre-installed on macOS)avahi-browse
(for Linux users)nmblookup
(Samba package for Linux)
- Clone the repository:
git clone https://github.com/fmichael1/parse_nmap.git
- Install Dependencies:
- nmap:
- macOS:
brew install nmap
- Linux:
sudo apt-get install nmap
- macOS:
- Avahi (Linux only):
sudo apt-get install avahi-utils
- Samba for nmblookup (Linux only):
sudo apt-get install samba
- nmap:
Run the script using Python:
python network_scanner.py
The script will output network details and a list of detected devices on your network.
Network SSID: MyWifiNetwork Subnet Mask: 255.255.255.0 Network Gateway: 192.168.1.1 My IP: 192.168.1.100 (MyDevice.local)
Host IP Address Hostname Ports 1 192.168.1.1 Router 80/tcp (http), 443/tcp (https) 2 192.168.1.101 DeviceOne 22/tcp (ssh) ...