Commit 233db3b 1 parent e5ea2d7 commit 233db3b Copy full SHA for 233db3b
File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ if [ $# -ne 1 ]; then
33
33
exit 1
34
34
fi
35
35
36
- network_range=$1
36
+ network_range=" $1 "
37
37
38
38
# Check if Nmap is installed
39
39
if ! command -v nmap & > /dev/null; then
@@ -107,9 +107,9 @@ for service in "${services[@]:-${!services_tcp[@]} ${!services_udp[@]}}"; do
107
107
output_file=" $output_dir /${service} _hosts.txt"
108
108
109
109
if [ " $protocol " = " TCP" ]; then
110
- nmap -sV --min-rate " $max_rate " --max-retries 2 --host-timeout " ${timeout} s" -p " $port " --open -oG - $live_hosts | awk ' /Status: Open/{print $2}' > " $output_file "
110
+ nmap -sV --min-rate " $max_rate " --max-retries 2 --host-timeout " ${timeout} s" -p " $port " --open -oG - " $live_hosts " | awk ' /Status: Open/{print $2}' > " $output_file "
111
111
else
112
- nmap -sU -sV --min-rate " $max_rate " --max-retries 2 --host-timeout " ${timeout} s" -p " $port " --open -oG - $live_hosts | awk ' /Status: Open/{print $2}' > " $output_file "
112
+ nmap -sU -sV --min-rate " $max_rate " --max-retries 2 --host-timeout " ${timeout} s" -p " $port " --open -oG - " $live_hosts " | awk ' /Status: Open/{print $2}' > " $output_file "
113
113
fi
114
114
115
115
echo " Scan results saved to $output_file "
You can’t perform that action at this time.
0 commit comments