Skip to content

Commit 233db3b

Browse files
committed
Update rapidenum.sh
Resolve issues found by the Security Check.
1 parent e5ea2d7 commit 233db3b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

rapidenum.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ if [ $# -ne 1 ]; then
3333
exit 1
3434
fi
3535

36-
network_range=$1
36+
network_range="$1"
3737

3838
# Check if Nmap is installed
3939
if ! command -v nmap &> /dev/null; then
@@ -107,9 +107,9 @@ for service in "${services[@]:-${!services_tcp[@]} ${!services_udp[@]}}"; do
107107
output_file="$output_dir/${service}_hosts.txt"
108108

109109
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"
111111
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"
113113
fi
114114

115115
echo "Scan results saved to $output_file"

0 commit comments

Comments
 (0)