Nmon is a simple Nmap script that monitors devices on a network and compares the current state with a previously saved reference state. It detects newly connected devices and devices that have been disconnected.
S3RGI09
This project is licensed under the Apache License 2.0.
- Monitors devices in the network.
- Detects new and disconnected devices.
- Saves the current state of devices in a reference file for future comparisons.
- Simple and easy to use.
- Nmap installed on your system.
-
Save the Script: Save the script as
nmon.nse
. -
Move the script to this path /usr/share/nmap/scripts/,
mv nmon.nse /usr/share/nmap/scripts/
- Run the Script: Use the following command in your terminal:
nmap --script nmon.nse -sn <IP_address_or_range>
Replace <IP_address_or_range>
with the IP address or range of the network you want to scan (e.g., 192.168.1.0/24
).
The script creates a reference file named network_state.txt
in the same directory. This file is used to store the current state of devices in the network. Ensure that the script has permission to read from and write to this file.
When you run the script, you will see an output similar to the following:
----- Nmon -----
Nmap Monitor | By S3RGI09
New device found: 192.168.1.10
Device disconnected: 192.168.1.5
Caution
Use this script on your own networks or where you have explicit consent.
Important
The script is not perfect, the information may be inaccurate, if a device is configured not to respond to Pings, it cannot be detected.
Tip
Complement this script with more tools like Netdiscover
Contributions are welcome! If you have suggestions for improvements or new features, feel free to submit a pull request or open an issue.
This script is for educational purposes only. Use it responsibly and ensure you have permission to scan the networks you are monitoring.