Skip to content

Commit

Permalink
Update rapidenum.sh
Browse files Browse the repository at this point in the history
Resolve issues found by the Security Check.
  • Loading branch information
fulco committed May 10, 2024
1 parent e5ea2d7 commit 233db3b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rapidenum.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ if [ $# -ne 1 ]; then
exit 1
fi

network_range=$1
network_range="$1"

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

if [ "$protocol" = "TCP" ]; then
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"
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"
else
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"
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"
fi

echo "Scan results saved to $output_file"
Expand Down

0 comments on commit 233db3b

Please sign in to comment.