diff --git a/portradar.sh b/portradar.sh index 3b98dc0..758d332 100755 --- a/portradar.sh +++ b/portradar.sh @@ -163,7 +163,6 @@ cidr_to_ips() { # total live_count["total"]=0 - keyports=([21]=0 [22]=0 [80]=0 [88]=0 [135]=0 [443]=0 [445]=0 [554]=0 [1433]=0 [1521]=0 [2049]=0 [2375]=0 [3000]=0 [3306]=0 [4786]=0 [5000]=0 [5432]=0 [5984]=0 [6379]=0 [8000]=0 [8009]=0 [8080]=0 [8443]=0 [9090]=0 [9100]=0 [9200]=0 [10050]=0 [15672]=0 [27017]=0) # generate list of ip addresses local swing=0 @@ -251,6 +250,8 @@ done cl # Scan TCP ports +keyports=([21]=0 [22]=0 [80]=0 [88]=0 [135]=0 [443]=0 [445]=0 [554]=0 [1433]=0 [1521]=0 [2049]=0 [2375]=0 [3000]=0 [3306]=0 [4786]=0 [5000]=0 [5432]=0 [5984]=0 [6379]=0 [8000]=0 [8009]=0 [8080]=0 [8443]=0 [9090]=0 [9100]=0 [9200]=0 [10050]=0 [15672]=0 [27017]=0) +[[ $POINTERS == true ]] && { a=${!keyports[@]}; mports=${a// /,}; } if [[ $ip ]]; then echo "--> Scanning $ip" if [[ $port ]]; then @@ -262,7 +263,6 @@ if [[ $ip ]]; then fi elif [[ $cidr ]]; then cidr_to_ips $cidr - [[ $POINTERS == true ]] && { a=${!keyports[@]}; mports=${a// /,}; } for ip in ${ips[@]}; do echo "--> Scanning $ip" if [[ $port ]]; then @@ -275,4 +275,4 @@ elif [[ $cidr ]]; then [[ ($RUN_NMAP == true) && -f /tmp/tcp_ports ]] && echo cl done -fi +fi \ No newline at end of file