scan is a shell script designed to simplify scanning tasks using nmap. It provides a convenient shortcut for running common nmap commands with predefined options.
scan IP [PORT]IP: The IP address to scan.PORT(optional): The port(s) to scan. It can be specified as a single port, a range of ports, or a comma-separated list of ports. Use-to scan all ports.- You can not specify additional arguments for nmap using this script, use
nmapdirectly for that, this is meant to speed up initial scans.
Examples:
scan 10.10.10.10: Scans the IP address10.10.10.10using nmap's top 1000 ports.scan 10.10.10.10 -: Scans all 65535 ports.scan 10.10.10.10 80: Scans port80.scan 10.10.10.10 80-443: Scans ports80to443.scan 10.10.10.10 22,80,443: Scans ports22,80and443.
- Quick Scanning: Easily perform default scans on specified IP addresses and optional ports.
- Automatic Directory Creation: The script creates a directory named
nmapif it doesn't already exist, ensuring that scan results are stored in an organized manner. - Flexible Port Specification: Specify individual ports, port ranges, or a combination of both using comma-separated values. Use
-to scan all ports.
The scan script automatically creates log files for each scan performed. The log files are stored in the nmap directory, and the naming syntax for the log files is as follows:
- For scans with only the IP specified:
IP_initial - For scans with both IP and port(s) specified:
IP_ports_PORT
Examples:
scan 10.10.10.10: nmap/10.10.10.10_initialscan 10.10.10.10 -: nmap/10.10.10.10_-scan 10.10.10.10 80: nmap/10.10.10.10_80scan 10.10.10.10 80-443: nmap/10.10.10.10_80-443scan 10.10.10.10 22,80,443: nmap/10.10.10.10_22,80,443
-h,--help: Displays a help message with usage instructions and examples.
nmapmust be installed on the system and accessible in your$PATHfor the script to function properly.
git cloneor download/copy the script and save it asscan.sh.- Copy the
scan.shscript to a directory included in your$PATH, such as/usr/local/bin. - Make the script executable using the command
chmod +x scan.sh. - Rename the
scan.shfile toscan.
git cloneor download/copy the script and save it asscan.shin your preferred location.- Make the script executable using the command
chmod +x scan.sh. - Run
ln -s /path/to/scan.sh /path/to/$PATH/scan.
This project is licensed under the MIT License.