File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -116,12 +116,12 @@ for service in "${services[@]:-${!services_tcp[@]} ${!services_udp[@]}}"; do
116
116
output_file=" $output_dir /${service} _hosts.txt"
117
117
118
118
if [[ " $protocol " == " TCP" ]]; then
119
- 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 "
119
+ 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 "
120
120
else
121
- 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 "
121
+ 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 "
122
122
fi
123
123
124
124
log " Scan results saved to $output_file "
125
125
log " Number of live hosts with $service open: $( wc -l < " $output_file " ) "
126
126
log " ---"
127
- done
127
+ done
You can’t perform that action at this time.
0 commit comments