MNUST (Multithreaded Nmap Up Scan Thing) is a crude lil Python script to perform fast and efficient network sweeps using Nmap. It leverages multithreading to scan multiple targets in parallel and stops scanning individual hosts as soon as an open port is detected.
Not only does it have a name that just rolls off the tongue, it can be used to quickly build lists of live hosts on large networks which you can feed to other tools.
- Scans multiple targets concurrently for maximum efficiency.
- Stops scanning a host as soon as an open port is detected.
- Uses Nmap’s
-v(verbose) mode to process results in real time. - Adjust the number of threads, input files, and output file location via CLI options.
- Saves live hosts to a simple
.txtfile for further processing.
- Python 3.6+
- Nmap (installed and accessible in your PATH)
- Python libraries:
pyfiglet
Install the required Python libraries with:
pip install pyfiglet-
Clone this repository:
git clone https://github.com/SwiftSecur/MNUST.git cd mnust -
Ensure
nmapis installed on your system. You can install it via your package manager:- Ubuntu/Debian:
sudo apt install nmap
- CentOS/RHEL:
sudo yum install nmap
- MacOS:
brew install nmap
- Ubuntu/Debian:
-
Install the required Python libraries:
pip install pyfiglet
Run the script with the following options:
python mnust.py -i <input_file> -o <output_file> -t <threads>-
-i, --input
Path to the target list file (one target per line).
Example:targets.txt -
-o, --output
Output file for live hosts. Default:live_hosts.txt. -
-t, --threads
Number of threads to use for concurrent scans. Default:10.
python mnust.py -i targets.txt -o live_hosts.txt -t 20The input file should contain a list of targets (IP addresses or domain names), one per line:
192.168.1.1
192.168.1.2
example.com
The script outputs live hosts (those with at least one open port) to the specified output file, e.g., live_hosts.txt:
192.168.1.1
example.com
- Reads a list of targets from the input file.
- Scans each target for the top 1000 TCP and UDP ports using Nmap.
- Processes Nmap's verbose output in real-time to detect open ports.
- Stops scanning a host as soon as an open port is found.
- Saves live hosts to the specified output file.
Multithreaded Nmap Up Scan Thing
Starting scans for 3 targets with 3 threads...
[DEBUG] Starting Nmap 7.93 ( https://nmap.org ) at 2024-11-21 12:45 GMT
[DEBUG] Nmap scan report for 192.168.1.1
[DEBUG] 22/tcp open ssh
[LIVE] 192.168.1.1 (Open port found: 22/tcp open ssh)
Progress: 1/3 (33.33%)
[DEBUG] Starting Nmap 7.93 ( https://nmap.org ) at 2024-11-21 12:45 GMT
[DEBUG] Nmap scan report for 192.168.1.2
[DEBUG] No open ports found
[DEAD] 192.168.1.2 (No open ports)
Progress: 2/3 (66.67%)
Scan complete. Live hosts saved to 'live_hosts.txt'.
Contributions are welcome! Feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
🎉 Happy Scanning!